/* ==============================================
   index.css – Stylesheet trang chủ SUNILIES
   Đặt tại: src/main/resources/static/css/index.css
   ============================================== */

/* -----------------------------------------------
   1. CSS VARIABLES (đồng bộ với base.html)
----------------------------------------------- */
:root {
    --header-h: 0px;
    --mainColor:    #c8986a;
    --supColor:     #c8986a;
    --darkColor:    #3d2e1c;
    --textColor:    #231f20;
    --borderColor:  #e8e4de;
    --bgLight:      #faf2e6;
    --fontDisplay:  'Ysabeau Office', serif;
    --fontBody:     'Lato', sans-serif;
    --transition:   0.3s ease;
}

/* -----------------------------------------------
   2. RESET & BASE
----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--fontBody);
    color: var(--textColor);
    background: #fff;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* -----------------------------------------------
   3. TYPOGRAPHY CHUNG
----------------------------------------------- */
.majortitle {
    font-family: var(--fontDisplay);
    font-weight: 600;
    font-size: 26px;
    color: #000;
    text-align: center;
    margin-bottom: 25px;
}
.majortitle a { color: inherit; }
.majortitle a:hover { color: var(--mainColor); }

/* -----------------------------------------------
   4. HEADER – TOPBAR NOTICE
   (CSS bổ sung cho header.html fragment)
----------------------------------------------- */
.wolf-header-notice {
    background-color: var(--darkColor);
    color: #faf2e6;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
}
.wolf-header-notice .notice-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}
.wolf-header-notice .notice-item + .notice-item::before {
    content: "|";
    margin: 0 15px;
}

/* ── Header ──────────────────────────────────────────────────── */
header.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
    transition: none;
}

/* Topbar ẩn khi scroll */
header.header.header--scrolled .wolf-header-notice {
    display: none;
}

/* Khoảng trống để body không bị nhảy khi header chuyển fixed */
.header-placeholder {
    display: none;
}
body.header-fixed .header-placeholder {
    display: block;
    height: var(--header-h, 0px);
}

.wolf-main-header {
    border-bottom: 1px solid rgba(255,255,255,.15);
    padding-top: 15px;
    transition: border-color 0.35s ease;
}
header.header.header--scrolled .wolf-main-header {
    border-bottom-color: var(--borderColor);
}

.wolf-main-header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

/* Header left */
.wolf-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 2 0 0;
}
.wolf-header-left .header-nav-secondary { list-style: none; display: flex; gap: 8px; }
.wolf-header-left .header-nav-secondary li a {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--textColor);
    transition: color var(--transition);
}
.wolf-header-left .header-nav-secondary li a:hover { color: var(--mainColor); }
.wolf-header-left .header-nav-secondary svg { flex-shrink: 0; }

/* Header center – logo */
.wolf-header-center { text-align: center; flex: 0 0 auto; }
.wolf-header-center .logo-wrapper { display: inline-block; }

/* Header right */
.wolf-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 2 0 0;
}
.wolf-header-right .header-nav-secondary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.wolf-header-right .header-nav-secondary li { position: relative; }
.wolf-header-right .header-nav-secondary li a {
    display: flex; align-items: center;
    padding: 6px 8px; color: var(--textColor);
    transition: color var(--transition); cursor: pointer;
}
.wolf-header-right .header-nav-secondary li a:hover { color: var(--mainColor); }

/* Wishlist badge */
.wolf-wishlist { position: relative; }
.wolf-wishlist .js-wishlist-count {
    position: absolute; top: -2px; right: -4px;
    background: var(--darkColor); color: #fff;
    font-size: 10px; font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Cart badge */
.wolf-header-cart { position: relative; }
.wolf-header-cart .count_item {
    position: absolute; top: -2px; right: -4px;
    background: var(--mainColor); color: #fff;
    font-size: 10px; font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Account dropdown */
.wolf-header-account ul {
    display: none;
    position: absolute; top: 100%; right: 0;
    background: #fff; border: 1px solid #eee;
    border-radius: 4px; min-width: 140px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    list-style: none; padding: 6px 0; z-index: 100;
}
.wolf-header-account:hover ul { display: block; }
.wolf-header-account ul li a {
    display: block; padding: 10px 16px;
    font-size: 13px; color: var(--textColor);
}
.wolf-header-account ul li a:hover { background: #f9f9f9; color: var(--mainColor); }

/* Search bar */
.wolf-main-search {
    display: none;
    border-top: 1px solid var(--borderColor);
    padding: 12px 0;
}
.wolf-main-search.active { display: block; }
.wolf-main-search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wolf-main-search-close {
    background: none; border: none; font-size: 20px;
    cursor: pointer; color: #555; flex-shrink: 0;
}
.header-search-form {
    display: flex; flex: 1; border: 1px solid var(--borderColor);
    border-radius: 4px; overflow: hidden;
}
.header-search-form input {
    flex: 1; padding: 10px 14px; border: none; outline: none;
    font-size: 14px; font-family: var(--fontBody); background: #fafafa;
}
.wolf-btn-search {
    padding: 10px 16px; background: var(--mainColor);
    border: none; cursor: pointer; color: #fff;
    transition: background var(--transition);
}
.wolf-btn-search:hover { background: var(--darkColor); }

/* ── Site navigation ──────────────────────────────────────────
   Mặc định (trang thường): nền trắng, nằm trong flow bình thường
   Hero pages (index & collection): position:absolute đè lên hero,
   semi-transparent – giống hệt behavior ban đầu
──────────────────────────────────────────────────────────── */

/* Trang thường: nền trắng, nằm trên section đầu tiên */
.site-nav {
    position: relative;
    z-index: 10;
    background: #fff;
    border-top: 1px solid var(--borderColor);
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Hero pages: giữ nguyên behavior gốc – absolute + semi-transparent */
body.has-hero-page .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.20);
    border-top: 1px solid rgba(255,255,255,.2);
    box-shadow: none;
}

/* Khi scroll qua hero: về relative + nền trắng */
.site-nav.nav--scrolled {
    position: relative;
    background: #fff;
    border-top: 1px solid var(--borderColor);
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* Tăng specificity để thắng body.has-hero-page .site-nav khi đã scroll */
body.has-hero-page .site-nav.nav--scrolled {
    position: relative;
    background: #fff;
    border-top: 1px solid var(--borderColor);
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* Nav menu */
.site-nav .nav-menu {
    display: flex; list-style: none;
    justify-content: center; margin: 0;
}
.site-nav .nav-menu li a {
    display: block;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    position: relative;
    transition: color var(--transition);
}
.site-nav .nav-menu li a::after {
    content: '';
    position: absolute; bottom: 8px; left: 18px; right: 18px; height: 1px;
    background: var(--mainColor);
    transform: scaleX(0);
    transition: transform var(--transition);
}
.site-nav .nav-menu li a:hover { color: var(--mainColor); }
.site-nav .nav-menu li a:hover::after { transform: scaleX(1); }

/* Scrolled: chữ tối trên nền trắng */
.site-nav.nav--scrolled .nav-menu li a { color: #1a1a1a; }
.site-nav.nav--scrolled .nav-menu li a::after { background: var(--mainColor); }

/* Hero pages chưa scroll: chữ trắng */
body.has-hero-page .site-nav:not(.nav--scrolled) .nav-menu li a {
    color: rgba(255,255,255,.92);
}
body.has-hero-page .site-nav:not(.nav--scrolled) .nav-menu li a::after {
    background: #fff;
}
body.has-hero-page .site-nav:not(.nav--scrolled) .nav-menu li a:hover {
    color: #fff;
}

/* Mobile menu (hamburger drawer) */
.mobile-menu-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 1999; opacity: 0; visibility: hidden;
    transition: var(--transition);
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu {
    position: fixed; top: 0; left: 0; width: 280px; height: 100%;
    background: #fff; z-index: 2000;
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; padding: 24px 0;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-head {
    padding: 0 24px 20px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu-head .logo-text { font-family: var(--fontDisplay); font-size: 20px; font-weight: 700; }
.mobile-menu-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #555; }
.mobile-menu ul { list-style: none; padding: 16px 0; }
.mobile-menu ul li a {
    display: block; padding: 12px 24px;
    font-size: 14px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 1px solid #f5f5f5; color: #1a1a1a;
}
.mobile-menu ul li a:hover { background: var(--bgLight); }

/* Hamburger button */
.btn-hamburger {
    display: none;
    background: none; border: none; cursor: pointer;
    padding: 4px; flex-direction: column; gap: 5px;
}
.btn-hamburger span {
    display: block; width: 22px; height: 2px;
    background: #333; border-radius: 2px; transition: var(--transition);
}

/* -----------------------------------------------
   5. SECTION: HERO SLIDER
----------------------------------------------- */
.section_slider { margin-bottom: 0; position: relative; }

.section_slider .swiper-slide {
    background: #ebebeb;
    aspect-ratio: 1920/700;
    overflow: hidden;
    position: relative;
}
.section_slider .swiper-slide img {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(1);
    transition: transform 6s ease-out;
}
.section_slider .swiper-slide-active img {
    transform: scale(1.08);
}

.slide-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.28); z-index: 1;
}
.slide-content {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column;
    align-items: flex-start; justify-content: center;
    padding: 0 80px;
}
.slide-content .slide-sub {
    font-size: 13px; letter-spacing: 4px;
    text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 12px;
}
.slide-content .slide-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(32px, 5vw, 72px);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.slide-content .btn-slide {
    display: inline-block; padding: 14px 36px;
    border: 1px solid rgba(255, 255, 255, 0.5); color: #fff;
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px);
    font-size: 12px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}
.slide-content .btn-slide::before {
    content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}
.slide-content .btn-slide:hover::before { left: 100%; }
.slide-content .btn-slide:hover { background: #fff; color: #1a1a1a; border-color: #fff; box-shadow: 0 4px 15px rgba(255,255,255,0.3); }

.section_slider .swiper-pagination-bullet {
    width: 12px; height: 12px;
    border: 2px solid #fff; background: rgba(255,255,255,.4); opacity: 1;
}
.section_slider .swiper-pagination-bullet-active { background: #fff; }

.section_slider .swiper-button-next,
.section_slider .swiper-button-prev {
    width: 40px; height: 40px;
    background: rgba(255,255,255,.15); backdrop-filter: blur(4px);
    border-radius: 50%; color: #fff;
}
.section_slider .swiper-button-next::after,
.section_slider .swiper-button-prev::after { font-size: 14px; font-weight: 900; }

/* -----------------------------------------------
   6. SECTION: DANH MỤC GALLERY
----------------------------------------------- */
.section_services { margin: 10px 0 50px; }

.section_services .title-gallery { text-align: center; margin-bottom: 50px; }
.section_services .title-gallery h2 {
    font-family: var(--fontDisplay); font-size: 13px;
    letter-spacing: 5px; text-transform: uppercase; color: #888; margin-bottom: 10px;
}
.section_services .title-gallery p {
    font-family: var(--fontDisplay); font-size: 36px;
    font-weight: 700; color: #1a1a1a;
}

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.gallery-item {
    position: relative; display: block;
    overflow: hidden; border-radius: 12px;
    aspect-ratio: 350/500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
    opacity: 0.8; transition: opacity 0.4s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-title {
    position: absolute; bottom: 20px; left: 0; right: 0;
    z-index: 2; text-align: center; padding: 0 15px; color: #fff;
    transition: padding-bottom var(--transition);
}
.gallery-item:hover .gallery-title { padding-bottom: 30px; }
.gallery-title p:first-child {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 2px; opacity: .8; margin-bottom: 4px;
}
.gallery-title p:last-child {
    font-family: var(--fontDisplay); font-size: 20px; font-weight: 700;
}
.gallery-button {
    display: inline-block; margin-top: 12px;
    padding: 8px 20px; background: #fff; color: #000;
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; border-radius: 4px;
    opacity: 0; transform: translateY(8px); transition: all .3s ease;
}
.gallery-item:hover .gallery-button { opacity: 1; transform: translateY(0); }

/* -----------------------------------------------
   7. SECTION: PRODUCT GRID (sản phẩm bán chạy)
----------------------------------------------- */
.section-index { padding: 60px 0; }
.section-index.bg-light { background: var(--bgLight); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.item_product_main { position: relative; transition: transform 0.3s ease; }
.item_product_main:hover { transform: translateY(-5px); }

.product-thumbnail {
    position: relative; overflow: hidden;
    border-radius: 10px; aspect-ratio: 3/4; background: #f5f5f5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}
.product-thumbnail img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.item_product_main:hover .product-thumbnail img { transform: scale(1.06); }

.badge-sale, .badge-new {
    position: absolute; top: 10px; left: 10px;
    font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 20px; z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.badge-sale { background: #e74c3c; color: #fff; }
.badge-new  { background: var(--darkColor); color: #faf2e6; }

.product-actions {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; gap: 8px; padding: 15px;
    transform: translateY(100%); opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); z-index: 3;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}
.item_product_main:hover .product-actions { transform: translateY(0); opacity: 1; }

.btn-quickview, .btn-wishlist {
    flex: 1; padding: 12px 8px;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); border: none; cursor: pointer;
    font-size: 12px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; border-radius: 6px; transition: all 0.3s ease;
    color: #1a1a1a;
}
.btn-quickview:hover { background: var(--darkColor); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.btn-wishlist {
    flex: 0 0 44px;
    display: flex; align-items: center; justify-content: center;
}
.btn-wishlist svg { width: 18px; height: 18px; }
.btn-wishlist:hover { background: #e74c3c; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(231,76,60,0.3); }

.product-info { padding: 12px 4px 0; }
.product-name {
    font-size: 14px; font-weight: 600; margin-bottom: 6px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.product-name a:hover { color: var(--mainColor); }

.price-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-size: 15px; font-weight: 700; color: var(--mainColor); }
.price.sale-price { color: #e74c3c; }
.old-price { font-size: 13px; color: #aaa; text-decoration: line-through; }

.view-more { text-align: center; margin-top: 35px; }
.view-more a {
    display: inline-block; padding: 13px 40px;
    border: 1.5px solid #1a1a1a; color: #1a1a1a;
    font-size: 12px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    transition: var(--transition);
}
.view-more a:hover { background: #1a1a1a; color: #fff; }

/* -----------------------------------------------
   8. SECTION: 3 BANNER PARALLAX
----------------------------------------------- */
.section-index-three-banner { padding: 60px 0; }
.image-parallax-items + .image-parallax-items { margin-top: 10px; }
.image-parallax-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.image-parallax-item {
    border-radius: 20px; padding: 60px 80px;
    color: #fff; display: flex; align-items: center;
    position: relative; overflow: hidden;
    background-attachment: fixed;
    background-position: center; background-size: cover;
    min-height: 280px;
}
.image-parallax-item::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,.30); z-index: 0;
}
.image-parallax-item-content { position: relative; z-index: 1; max-width: 500px; }
.image-parallax-item-content .sub-title {
    font-size: 12px; letter-spacing: 4px;
    text-transform: uppercase; opacity: .8; margin-bottom: 10px;
}
.image-parallax-item-content h3 {
    font-family: var(--fontDisplay);
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 700; line-height: 1.15; margin-bottom: 15px;
}
.image-parallax-item-content p {
    font-size: 15px; opacity: .85; margin-bottom: 24px; line-height: 1.6;
}
.btn-banner {
    display: inline-block; padding: 13px 32px;
    border: 2px solid #fff; color: #fff;
    font-size: 12px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    transition: var(--transition);
}
.btn-banner:hover { background: #fff; color: #1a1a1a; }
.btn-banner.sm { padding: 10px 22px; font-size: 11px; }

/* -----------------------------------------------
   9. SECTION: PRODUCT SLIDER (Có thể bạn thích)
----------------------------------------------- */
.section-product-slider { background: #faf7f2; padding: 70px 0 50px; }  /* ← sửa lỗi cú pháp */

.product-slider-nav {
    display: flex; align-items: center;
    justify-content: center; gap: 30px; margin-bottom: 30px;
}
.product-slider-nav .swiper-button-next,
.product-slider-nav .swiper-button-prev {
    position: static; width: 36px; height: 36px;
    background: #fff; border-radius: 50%;
    margin: 0; color: #333; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.product-slider-nav .swiper-button-next::after,
.product-slider-nav .swiper-button-prev::after { font-size: 12px; font-weight: 900; }
.product-slider-nav .swiper-button-next:hover,
.product-slider-nav .swiper-button-prev:hover { background: var(--darkColor); color: #fff; }
.product-slider-nav .majortitle { margin-bottom: 0; }

.block-product-slider .swiper-slide { height: auto; }

/* -----------------------------------------------
   10. SECTION: BRANDS
----------------------------------------------- */
.section-brands { padding: 50px 0; border-top: 1px solid var(--borderColor); }

.brands-grid {
    display: flex; align-items: center;
    justify-content: center; gap: 40px; flex-wrap: wrap;
}
.brand-item { opacity: .5; filter: grayscale(1); transition: var(--transition); }
.brand-item:hover { opacity: 1; filter: grayscale(0); }
.brand-item img { height: 40px; width: auto; }
.brand-box {
    width: 120px; height: 50px; background: #f5f5f5; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--fontDisplay); font-size: 14px;
    font-weight: 700; letter-spacing: 1px; color: #888;
}

/* -----------------------------------------------
   11. SECTION: SUBSCRIBE
----------------------------------------------- */
.section-subscribe { background: var(--darkColor); padding: 60px 0; text-align: center; }
.section-subscribe h3 {
    font-family: var(--fontDisplay); font-size: 30px;
    font-weight: 700; color: #faf2e6; margin-bottom: 10px;
}
.section-subscribe p { color: rgba(250,242,230,.7); font-size: 15px; margin-bottom: 28px; }

.subscribe-form {
    display: flex; max-width: 460px; margin: 0 auto;
    border: 1px solid rgba(255,255,255,.3); border-radius: 4px; overflow: hidden;
}
.subscribe-form input {
    flex: 1; padding: 14px 18px; background: transparent;
    border: none; outline: none; color: #fff;
    font-size: 14px; font-family: var(--fontBody);
}
.subscribe-form input::placeholder { color: rgba(255,255,255,.5); }
.subscribe-form button {
    padding: 14px 24px; background: #faf2e6; border: none; cursor: pointer;
    font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: var(--darkColor); transition: var(--transition);
}
.subscribe-form button:hover { background: #fff; }

/* -----------------------------------------------
   12. SIDE CART DRAWER
----------------------------------------------- */
.cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 3000; opacity: 0; visibility: hidden; transition: var(--transition);
}
.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-drawer {
    position: fixed; top: 0; right: 0; width: 380px; height: 100%;
    background: #fff; z-index: 3001;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
}
.cart-drawer.active { transform: translateX(0); }

.cart-drawer-head {
    padding: 20px 24px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.cart-drawer-head h3 { font-family: var(--fontDisplay); font-size: 18px; font-weight: 700; }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #555; }

.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.cart-item img { width: 72px; height: 90px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info .name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cart-item-info .variant { font-size: 12px; color: #888; margin-bottom: 8px; }
.cart-item-info .qty-row { display: flex; align-items: center; justify-content: space-between; }

.qty-control {
    display: flex; align-items: center;
    border: 1px solid #ddd; border-radius: 4px; overflow: hidden;
}
.qty-control button { width: 28px; height: 28px; background: none; border: none; cursor: pointer; font-size: 16px; color: #555; }
.qty-control input { width: 36px; text-align: center; border: none; outline: none; font-size: 13px; }
.cart-item-price { font-size: 14px; font-weight: 700; }

.cart-footer { padding: 16px 24px; border-top: 1px solid #eee; }
.cart-total-row { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 14px; }

.btn-checkout {
    display: block; width: 100%; padding: 15px;
    background: var(--darkColor); color: #faf2e6;
    border: none; cursor: pointer; text-align: center;
    font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    border-radius: 4px; transition: var(--transition);
    text-decoration: none;
}
.btn-checkout:hover { background: #1a1a1a; color: #faf2e6; }

.cart-empty { text-align: center; padding: 60px 24px; color: #aaa; }
.cart-empty svg { width: 48px; height: 48px; margin: 0 auto 14px; opacity: .3; }
.cart-empty p { font-size: 15px; }

/* -----------------------------------------------
   13. BACK TO TOP
----------------------------------------------- */
.back-to-top {
    position: fixed; bottom: 28px; right: 28px;
    width: 44px; height: 44px;
    background: var(--darkColor); color: #faf2e6;
    border: none; border-radius: 50%; cursor: pointer; z-index: 999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,.2);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }

/* -----------------------------------------------
   14. ANIMATIONS
----------------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeInUp .6s ease forwards; opacity: 0; }
.animate-up:nth-child(1) { animation-delay: 0s; }
.animate-up:nth-child(2) { animation-delay: .1s; }
.animate-up:nth-child(3) { animation-delay: .2s; }
.animate-up:nth-child(4) { animation-delay: .3s; }

/* -----------------------------------------------
   15. RESPONSIVE
----------------------------------------------- */
@media (max-width: 992px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .site-nav { display: none; }
    .btn-hamburger { display: flex; }
    .wolf-hide-mobile { display: none !important; }

    /* Hero slider: cao hơn trên mobile để thấy nội dung */
    .section_slider .swiper-slide { aspect-ratio: 4/3; }
    .slide-content { padding: 0 24px; }
    .slide-content .slide-title { font-size: clamp(24px, 7vw, 40px); }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .section_services { margin: 40px 0 30px; }

    .section-index { padding: 40px 0; }
    .section-index-three-banner { padding: 30px 0; }
    .image-parallax-item { padding: 40px 30px; background-attachment: scroll; min-height: 200px; }
    .image-parallax-two { grid-template-columns: 1fr; }

    .cart-drawer { width: 100%; }
    .section-subscribe { padding: 40px 0; }

    /* Back-to-top: nhấc lên trên footer nav mobile (cao 60px) */
    .back-to-top { bottom: 80px; right: 16px; }

    /* Section story: giảm padding, ẩn cây trang trí */
    .section-story { padding: 56px 20px; }
    .story-tree-left, .story-tree-right { display: none; }
    .story-bg-text { font-size: clamp(50px, 15vw, 80px); }
    .stat-item { padding: 0 20px; }
    .stat-num { font-size: 32px; }
}

@media (max-width: 480px) {
    /* Hero: vuông hơn trên điện thoại nhỏ */
    .section_slider .swiper-slide { aspect-ratio: 1/1; }
    .slide-content { padding: 0 16px; }

    /* Story stats xếp dọc */
    .story-stats { flex-direction: column; gap: 20px; }
    .stat-item { border-right: none; border-bottom: 1px solid #e0d8ce; padding-bottom: 20px; }
    .stat-item:last-child { border-bottom: none; padding-bottom: 0; }

    /* Product slider nav: ẩn mũi tên trên màn hình rất nhỏ */
    .product-slider-nav .swiper-button-next,
    .product-slider-nav .swiper-button-prev { display: none; }
}

@media (max-width: 640px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery-grid { gap: 8px; }
    .brands-grid { gap: 20px; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr 1fr; }
}

/* -----------------------------------------------
   SECTION: CÂU CHUYỆN THƯƠNG HIỆU
----------------------------------------------- */
.section-story {
    background: #faf7f2;
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.section-story::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, rgba(200,152,106,0.05) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

.story-tree-left, .story-tree-right {
    position: absolute; top: 0; width: 350px; height: 100%;
    background-repeat: no-repeat; background-size: contain; background-position: center;
    pointer-events: none; z-index: 1;
    transition: transform 0.1s linear;
}
.story-tree-left { left: -50px; background-image: url('/image/left_tree.png'); opacity: 0.55; }
.story-tree-right { right: -50px; background-image: url('/image/right_tree.png'); opacity: 0.55; }

.story-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--fontDisplay);
    font-size: clamp(80px, 12vw, 160px);
    font-weight: 400;
    color: rgba(200,152,106,0.04);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.story-content { position: relative; z-index: 1; }

.story-eyebrow {
    font-size: 11px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--mainColor);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.story-headline {
    font-family: var(--fontDisplay);
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 400;
    line-height: 1.25;
    color: #1a1a1a;
    margin-bottom: 12px;
}
.story-headline span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.section-story.visible .story-headline span:nth-child(1) { transition-delay: 0.1s; }
.section-story.visible .story-headline span:nth-child(2) { transition-delay: 0.25s; }
.section-story.visible .story-headline span:nth-child(3) { transition-delay: 0.4s; }
.section-story.visible .story-headline span { opacity: 1; transform: translateY(0); }

.story-headline em {
    font-style: italic;
    color: var(--mainColor);
}

.story-divider {
    width: 0;
    height: 1px;
    background: var(--mainColor);
    margin: 28px auto;
    transition: width 1.2s ease 0.3s;
}

.story-body {
    max-width: 560px;
    margin: 0 auto 48px;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.9;
    color: #555;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.9s ease 0.5s, transform 0.9s ease 0.5s;
}

.story-body .highlight {
    font-weight: 400;
    color: var(--darkColor);
}

.story-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 48px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.9s ease 0.7s, transform 0.9s ease 0.7s;
}

.stat-item {
    padding: 0 40px;
    border-right: 1px solid #e0d8ce;
}
.stat-item:last-child { border-right: none; }

.stat-num {
    font-family: var(--fontDisplay);
    font-size: 42px;
    font-weight: 400;
    color: var(--darkColor);
    line-height: 1;
    margin-bottom: 8px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.3s ease;
}
.stat-item:hover .stat-num { transform: scale(1.1) translateY(-2px); color: var(--mainColor); }

.stat-label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #999;
}

.story-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.9s ease 0.9s, transform 0.9s ease 0.9s;
}

.story-tags .tag {
    padding: 8px 20px;
    border: 1px solid rgba(200,152,106,0.4);
    border-radius: 100px;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    cursor: default;
}
.story-tags .tag:hover { background: var(--mainColor); color: #fff; transform: translateY(-3px); box-shadow: 0 4px 15px rgba(200,152,106,0.3); border-color: var(--mainColor); }

.section-story.visible .story-eyebrow,
.section-story.visible .story-headline,
.section-story.visible .story-body,
.section-story.visible .story-stats,
.section-story.visible .story-tags {
    opacity: 1;
    transform: translateY(0);
}

.section-story.visible .story-divider {
    width: 60px;
}

@media (max-width: 640px) {
    .story-stats { flex-direction: column; gap: 24px; }
    .stat-item { border-right: none; border-bottom: 1px solid #e0d8ce; padding: 0 0 24px; }
    .stat-item:last-child { border-bottom: none; padding-bottom: 0; }
    .story-bg-text { font-size: 60px; }
}

/* -----------------------------------------------
   MARQUEE BANNER
----------------------------------------------- */
.marquee-banner {
    background: transparent;
    color: var(--darkColor);
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
}
.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 32px;
    animation: marquee-scroll 25s linear infinite;
}

.marquee-track span {
    font-size: 40px;
    font-family: 'Cormorant', serif;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    flex-shrink: 0;
    color: var(--darkColor);
}

.marquee-dot {
    color: var(--mainColor);
    font-size: 10px !important;
    letter-spacing: 0 !important;
}

.marquee-banner:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* -----------------------------------------------
   16. PRELOADER (MÀN HÌNH CHỜ SANG TRỌNG)
----------------------------------------------- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bgLight);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.85, 0, 0.15, 1);
}

/* Hiệu ứng trượt lên như cánh màn sân khấu mở ra */
.preloader.preloader-hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
}

.preloader-logo {
    font-family: var(--fontDisplay);
    font-size: clamp(36px, 8vw, 54px);
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--darkColor);
    margin-bottom: 8px;
    text-transform: uppercase;
    animation: preloader-logo-pulse 2s ease-in-out infinite;
    text-indent: 0.3em; /* Cân bằng letter-spacing ở chữ cuối */
}

.preloader-tagline {
    font-family: var(--fontBody);
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--mainColor);
    margin-bottom: 32px;
    text-transform: uppercase;
    opacity: 0;
    animation: preloader-fade-in 1.2s ease-out 0.3s forwards;
}

.preloader-bar-wrap {
    height: 2px;
    width: 220px;
    background: rgba(61, 46, 28, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

.preloader-bar {
    height: 100%;
    width: 0%;
    background: var(--darkColor);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.preloader-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(61, 46, 28, 0.1);
    border-top-color: var(--darkColor);
    border-radius: 50%;
    animation: preloader-spin 1s linear infinite;
    opacity: 0.8;
}

/* Animations */
@keyframes preloader-logo-pulse {
    0%, 100% {
        transform: scale(1);
        letter-spacing: 0.3em;
        opacity: 0.95;
    }
    50% {
        transform: scale(1.02);
        letter-spacing: 0.33em;
        opacity: 1;
        text-shadow: 0 0 10px rgba(200, 152, 106, 0.15);
    }
}

@keyframes preloader-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 0.85; transform: translateY(0); }
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

/* Ẩn scroll bar của body khi preloader đang chạy */
body.preloader-active {
    overflow: hidden !important;
}

/* Hiệu ứng mượt mà cho Hero Slider khi xuất hiện */
.section_slider {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-ready .section_slider {
    opacity: 1;
    transform: scale(1);
}

/* Slide content animation ban đầu */
.slide-content .slide-sub,
.slide-content .slide-title,
.slide-content .btn-slide {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-ready .swiper-slide-active .slide-content .slide-sub {
    opacity: 0.85;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.hero-ready .swiper-slide-active .slide-content .slide-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.hero-ready .swiper-slide-active .slide-content .btn-slide {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
}

html {
    scroll-behavior: smooth;
}