/*
Theme Name: K-Tech Flatsome Child
Theme URI: 
Description: Flatsome Child Theme for K-Tech (Optimized for Flatsome 3.20.7)
Author: Master WP
Author URI: 
Template: flatsome
Version: 1.0.0
Text Domain: k-tech
*/

:root {
    --fs-100: clamp(32px, 8vw, 100px);
}

/* ==========================================================================
   Common
   ========================================================================== */

body #content {
    background-color: #FAF8F1 !important;
}

.flickity-page-dots .dot {
    height: 15px !important;
    width: 15px !important;
}


/* ==========================================================================
   Header
   ========================================================================== */
.header-nav {
    gap: 1rem;
}

#header .menu-item a {
    font-size: 1rem !important;
    color: var(--fs-color-primary) !important;
}

#main-menu .menu-item a {
    color: var(--fs-color-primary) !important;
    font-weight: bold;
}

#main-menu li.html.custom.html_topbar_left {
    justify-content: center;
}

.icon-menu:before {
    color: var(--fs-color-primary);
}

/* ==========================================================================
   Page
   ========================================================================== */
/*  */
/*  */
/* Hero Slider */
/*  */
.hero-slider .flickity-page-dots .dot {
    opacity: 1 !important;
    background-color: #ffffff !important;
}

.hero-slider .flickity-page-dots .dot.is-selected {
    border: var(--fs-color-secondary) !important;
    background-color: var(--fs-color-secondary) !important;
}

.hero-title {
    line-height: 1.2 !important;
}

/*  */
/*  */
/*  STORY  */
/*  */
/*  */
.story-number>.col>.col-inner {
    padding: 20px;
    background: #FAF8F1;
}

/* Slider */
.story-slider>.slider {
    padding-bottom: 2rem;
}

.story-slider .flickity-page-dots {
    bottom: 0 !important;
}

.story-slider .flickity-page-dots .dot {
    opacity: 1 !important;
    border-color: #D9D9D9 !important;
    background-color: #D9D9D9 !important;
}

.story-slider .flickity-page-dots .dot.is-selected {
    border: var(--fs-color-primary) !important;
    background-color: var(--fs-color-primary) !important;
}

/* Story Image */

.story-img-custom {
    width: 105% !important;
    margin-bottom: 0 !important;
}

.story-img-custom img {
    opacity: .07;
}

/*  */
/*  */
/* Partner */
/*  */
/*  */
.partner-gallery {
    padding: 1px !important;
}

.partner-gallery>* {
    border: 1px solid var(--fs-color-secondary);
    margin: -1px 0 0 -1px !important;
}

.row.partner-gallery img {
    object-fit: contain;
    padding: 1rem !important;
}

/*  */
/*  */
/* Contact */
/*  */
/*  */
.sec-contact {
    font-family: 'Montserrat', sans-serif !important;
}


.row.contact-wrapper {
    max-width: calc(1280px - 6rem) !important;
    margin: 0 auto;
    padding: 50px 34px 50px 50px;
    background-color: #B184490A;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/*  */
/* CF7 - Contact Form 7 */
/*  */
/* Bố cục và khoảng cách (Gap: 32px hàng, 24px cột) */
.custom-cf7-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-row.form-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Style cho Label */
.custom-cf7-form label {
    color: var(--fs-color-primary);
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 600;
}

/* Style cho Input và Textarea */
.custom-cf7-form input[type="text"],
.custom-cf7-form input[type="tel"],
.custom-cf7-form input[type="email"],
.custom-cf7-form textarea {
    height: 42px;
    border: none;
    border-bottom: 1px solid var(--fs-color-primary);
    background: transparent;
    color: #7F7979;
    padding: 0 0 .5rem 0;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    font-size: 15px;
}

.custom-cf7-form textarea {
    min-height: 100px;
    resize: none;
}

.custom-cf7-form input::placeholder,
.custom-cf7-form textarea::placeholder {
    color: #7F7979;
}

.custom-cf7-form input:focus,
.custom-cf7-form textarea:focus {
    outline: none;
}

/* Footer: Chữ lưu ý và Nút Submit */
.form-footer>p {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-note {
    color: #7F7979;
    font-size: 14px;
    padding-right: 1.5rem;
}

/* Nút Submit 56px tỷ lệ 1:1 với icon 18px */
.custom-cf7-form input[type="submit"],
.custom-cf7-form button[type="submit"],
.custom-cf7-form .wpcf7-submit {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--fs-color-primary);
    background-image: url('../../uploads/2026/08/arrow-right.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0 !important;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

/* Pseudo-element ::before dành cho thẻ <button> hoặc container */
.custom-cf7-form button[type="submit"]::before,
.custom-cf7-form .wpcf7-submit-wrap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background-image: url('../../uploads/2026/08/arrow-right.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}

.wpcf7-spinner {
    display: none !important;
}


/* ==========================================================================
   Page - 3 Product Layouts
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO SLIDER
   -------------------------------------------------------------------------- */
.agro-hero-section {
    background-color: var(--vafs-color-primary);
    position: relative;
    overflow: hidden;
}

.hero-swiper-container {
    padding: 40px 0 60px 0;
    position: relative;
}

.hero-slide-item {
    position: relative;
    min-height: 675px;

}

.hero-watermark-title {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    font-size: var(--fs-100);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.54);
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    letter-spacing: 2px;
}

.hero-bottle-wrap {
    flex: 0 0 45%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-bottle-img {
    position: absolute;
    top: 0;
    left: 40%;
    height: 50vw;
    max-height: 550px;
    width: auto;
    object-fit: contain;
    transform: translateX(-50%) rotate(15deg);
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
    transition: transform 0.5s ease;
    z-index: 1;
}

.hero-content-box {
    color: #ffffff;
    position: absolute;
    bottom: 10%;
    right: 5%;
}

.hero-product-title {
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
}

.hero-product-desc {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 2rem;
    max-width: 450px;
}

.hero-contact-btn {
    display: inline-block;
    padding: 14px 40px;
    background-color: #ffffff;
    color: #2A1208 !important;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hero-contact-btn:hover {
    background-color: var(--fs-color-secondary, #B18449);
    color: #ffffff !important;
}

.hero-drag-badge {
    position: absolute;
    top: 10%;
    right: 5%;
    transform: translateY(-50%);
    width: 62px;
    height: 62px;
    background: rgba(255, 255, 255, 1);
    color: #000;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

.swiper-pagination.hero-swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
    width: 90% !important;
}

.hero-swiper-pagination .swiper-pagination-bullet {
    border: 1px solid #fff;
    background: transparent;
    opacity: 1;
    width: 14px;
    height: 14px;
}

.hero-swiper-pagination .swiper-pagination-bullet-active {
    background: #ffffff;
}


/* --------------------------------------------------------------------------
   2. MÓN NƯỚC CAROUSEL
   -------------------------------------------------------------------------- */
.drinks-section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-transform: uppercase;
    color: var(--fs-color-primary);
}

.drinks-swiper-container {
    padding: 10px 10px 40px 10px;
    position: relative;
}

.drinks-swiper-container::before {
    content: "";
    position: absolute;
    top: 0;
    right: -1%;
    width: 5%;
    min-width: 50px;
    height: 100%;
    background: linear-gradient(to right, rgba(250, 248, 241, 0) 0%, rgba(250, 248, 241, 0.85) 60%, #FAF8F1 100%);
    z-index: 10;
    pointer-events: none;
}

.drink-card-wrapper {
    display: flex;
    flex-direction: column;
}

.drink-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 3px 12px 5px rgba(0, 0, 0, 0.2);
}

.drink-card-bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    aspect-ratio: 2 / 3;
}

/* Decor: Vertical Bar (::before) & Handle Hole (::after) */
.drink-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 100%;
    background-color: var(--fs-color-secondary);
    border-radius: 8px;
    z-index: 2;
}

.drink-card::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 8px;
    background-color: var(--fs-color-secondary);
    border-radius: 8px;
    z-index: 2;
}

.drink-card-bottle {
    position: absolute;
    left: 5%;
    bottom: -6%;
    width: calc(100% / 4);
    height: auto;
    aspect-ratio: 1 / 4;
    object-fit: cover;
    z-index: 3;
    filter: drop-shadow(3px 8px 12px rgba(0, 0, 0, 0.35));
}

.drink-product-name {
    font-size: 1.5rem;
    font-weight: 400;
    text-align: left;
    margin-top: 1.5rem;
    color: var(--fs-color-primary);
}

.drinks-nav-prev,
.drinks-nav-next {
    color: #eeeeee !important;
    width: 50px !important;
    height: 50px !important;
    background: transparent;
    border: 2px solid #eeeeee;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.drinks-nav-prev::after,
.drinks-nav-next::after {
    font-size: 28px !important;
    font-weight: bold;
}

.drinks-nav-prev:hover,
.drinks-nav-next:hover {
    background-color: #eeeeee !important;
}

.drinks-nav-prev:hover::after,
.drinks-nav-next:hover::after {
    color: var(--fs-color-secondary) !important;
}


/* --------------------------------------------------------------------------
   3. ĐÔNG TRÙNG HẠ THẢO 3-COLUMN SHOWCASE
   -------------------------------------------------------------------------- */

.dtht-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4.5rem;
    align-items: center;
    margin: 0 auto;
}

.dtht-col {
    text-align: center;
    transition: all 0.2s linear;
}

.dtht-col:hover {
    scale: 1.1;
}

.dtht-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.dtht-card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.dtht-col-center {
    z-index: 2;
}

.dtht-col-center .dtht-card {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.dtht-product-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.25rem;
    color: var(--fs-color-primary);
}

/* certificate-gallery */
.certificate-gallery .flickity-button {
    display: none;
}

.certificate-gallery img {
    object-fit: contain !important;
}


/* ==========================================================================
   Product Modal Popup
   ========================================================================== */
body.agro-modal-open {
    overflow: hidden !important;
}

.agro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.agro-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.agro-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0.65;
}

.agro-modal-container {
    position: relative;
    z-index: 2;
    width: 80%;
    max-width: 1000px;
    height: 80vh;
    background-color: #FAF8F1;
    border-radius: 16px;
    border: 2px solid var(--fs-color-secondary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.agro-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--fs-color-primary);
    color: #fff;
    border: none;
    font-size: 24px;
    margin: 0 !important;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.agro-modal-close:hover {
    background-color: var(--fs-color-secondary);
    color: #000;
}

.agro-modal-body {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Spinner Loader */
.agro-modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.agro-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #F4EFE6;
    border-top: 4px solid var(--fs-color-primary);
    border-radius: 50%;
    animation: agro-spin 0.8s linear infinite;
}

@keyframes agro-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.agro-modal-content-wrap {
    display: flex;
    width: 100%;
    height: 100%;
}

.agro-modal-image-col {
    flex: 0 0 45%;
    background-color: #F4EFE6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    height: 100%;
}

.agro-modal-image-col img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.agro-modal-info-col {
    flex: 0 0 55%;
    padding: 40px;
    background-color: #FAF8F1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    position: relative;
}

.agro-modal-info-col>* {
    position: relative;
    z-index: 2;
}

.agro-modal-single-bg-img {
    position: absolute !important;
    right: -15px;
    bottom: -20px;
    height: 80%;
    max-width: 55%;
    object-fit: contain;
    transform: rotate(15deg);
    opacity: 0.22;
    z-index: 1 !important;
    pointer-events: none;
    transition: transform 0.4s ease;
}

.agro-modal-cat {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--fs-color-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.agro-modal-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--fs-color-primary);
    margin-bottom: 20px;
    line-height: 1.25;
}

.agro-modal-desc {
    font-size: 15px;
    color: #000;
    line-height: 1.7;
}

.agro-modal-desc p {
    color: #000;
    margin-bottom: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.absolute-footer {
    background-color: var(--fs-color-primary) !important;
}

.absolute-footer>.container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   MAX-WIDTH (Desktop First - Ưu tiên từ cao xuống thấp)
   ========================================================================== */

@media (max-width: 821px) {

    /* HERO */
    .hero-slide-item {
        min-height: 600px;
    }

    .hero-content-box {
        max-width: 45% !important;
        right: 1% !important;
    }

    .hero-bottle-img {
        max-height: 400px;
    }

    /* Max Tablet L */
    .yang-row {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
    }

    /* Đưa cột 12 (hoặc phần tử thứ 3) lên đầu hàng */
    .yang-row>div:nth-child(3),
    .yang-row>.medium-12,
    .yang-row>.small-12 {
        order: -1;
    }

    /* Giữ 2 cột 6 (phần tử 1 & 2) nằm chung 1 hàng bên dưới */
    .yang-row>div:nth-child(1),
    .yang-row>div:nth-child(2),
    .yang-row>.medium-6,
    .yang-row>.small-6 {
        order: 1;
    }

    .dtht-grid-container {
        gap: 3rem;
    }

}

/* Responsive cho Mobile */
@media (max-width: 768px) {
    .form-row.form-cols-2 {
        grid-template-columns: 1fr;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .agro-modal-container {
        width: 92%;
        height: 85vh;
    }

    .agro-modal-content-wrap {
        flex-direction: column;
        overflow-y: auto;
    }

    .agro-modal-image-col {
        flex: 0 0 auto;
        height: 240px;
        padding: 20px;
    }

    .agro-modal-image-col img {
        aspect-ratio: 3/4;
        object-fit: cover !important;
    }

    .agro-modal-info-col {
        flex: 1 1 auto;
        height: auto;
        padding: 24px;
        justify-content: flex-start;
        overflow-y: scroll;
    }

    .agro-modal-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 22px;
    }
}

@media (max-width: 559px) {

    /* Max Mobile XL */
    .hero-title.fs-56 {
        font-size: 2.25rem !important;
    }

    .hero-content-box {
        max-width: 95% !important;
    }

    .hero-watermark-title {
        top: 20% !important;
        font-size: 52px !important;
        text-wrap: wrap;
    }

    .hero-bottle-img {
        max-height: 260px;
    }

    .hero-drag-badge {
        top: 5%;
    }


    /* DTHT */
    .dtht-grid-container {
        gap: 1rem;
    }

    .dtht-product-title {
        font-size: .875rem;
        margin-top: 0.75rem;
    }

    .dtht-col-center .dtht-product-title {
        font-size: 1.5rem;
    }

    /* Contact */
    .row.contact-wrapper {
        padding: 5rem 1rem 2rem;
    }

    .contact-title {
        font-size: 1.375rem !important;
    }

    .sec-contact .section-bg.fill img {
        width: 100%;
        height: auto !important;
        object-fit: cover;
        top: auto;
        bottom: 0;
    }
}

@media (max-width: 376px) {
    .hero-bottle-img {
        height: 60vw;
    }

    .hero-watermark-title {
        font-size: 42px !important;
    }

    .hero-drag-badge {
        width: 50px;
        height: 50px;
        font-size: 12px;
    }
}