/* ===========================
   BASE STYLES (De-duplicated)
   =========================== */

body {
    font-family: 'Inter', sans-serif;
    background-color: #F9F9F7;
}

.hero-title {
    letter-spacing: -0.04em;
    line-height: 1.1;
    text-wrap: balance;
}

/* ===========================
   TYPOGRAPHY POLISH
   =========================== */

/* Balanced heading wrap - prevents awkward single-word last lines */
h1, h2, h3 {
    text-wrap: balance;
}

/* Justified body text for clean, editorial look in content sections */
.content-prose p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
    line-height: 1.85;
}

/* Founder story text - justified for clean block feel */
.founder-text p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    line-height: 1.85;
}

/* Section lead text (centered sections) - balanced wrap */
.section-lead {
    text-wrap: balance;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

/* Product description in feature cards - clean left-aligned */
.feature-card-desc {
    text-align: left;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Uniform card content alignment */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ===========================
   LAYOUT CONSISTENCY 
   =========================== */

/* Consistent section inner max-width for readability */
.section-inner {
    max-width: 72ch;
    margin-left: auto;
    margin-right: auto;
}

/* Clean divider between sections */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(44, 62, 53, 0.1), transparent);
    margin: 0 auto;
    max-width: 80%;
}

.soft-shadow {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

.smooth-transition {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-gradient {
    background: linear-gradient(to right, #F9F9F7 0%, rgba(249, 249, 247, 0) 100%);
}

.hero-gradient {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('Assets/Image/hero_banner.png');
    background-size: cover;
    background-position: center;
}


/* ===========================
   BLOG CONTENT
   =========================== */

.blog-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    opacity: 0.85;
}

.blog-content h2 {
    font-size: 1.875rem;
    font-weight: 800;
    color: #2C3E35;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}


/* ===========================
   PRODUCT RICH CONTENT
   =========================== */

#product-specs-table tr:nth-child(odd) { background-color: #f9fafb; }
#product-specs-table tr:nth-child(even) { background-color: #ffffff; }
#product-specs-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
#product-specs-table td:first-child { font-weight: 700; color: #555; width: 40%; white-space: nowrap; }
#product-specs-table td:last-child { color: #1A1A1A; }

html.dark #product-specs-table tr:nth-child(odd) { background-color: #1a1a1a; }
html.dark #product-specs-table tr:nth-child(even) { background-color: #222; }
html.dark #product-specs-table td { border-bottom-color: #333; }
html.dark #product-specs-table td:first-child { color: #aaa; }
html.dark #product-specs-table td:last-child { color: #e5e5e5; }

.product-rich-content { font-size: 15px; line-height: 1.85; color: #333; }
.product-rich-content h4 { font-size: 1.2rem; font-weight: 800; margin: 2rem 0 0.75rem; color: #2C3E35; }
.product-rich-content p { margin-bottom: 1rem; opacity: 0.85; text-align: justify; }
.product-rich-content ul { list-style: none; padding-left: 0; margin-bottom: 1.25rem; }
.product-rich-content ul li { position: relative; padding-left: 1.5rem; margin-bottom: 0.6rem; opacity: 0.85; }
.product-rich-content ul li::before { content: '✓'; position: absolute; left: 0; color: #B45309; font-weight: 700; }
.product-rich-content blockquote { border-left: 4px solid #B45309; padding: 1rem 1.5rem; background: #FFFBEB; margin: 1.5rem 0; border-radius: 0 12px 12px 0; font-style: italic; color: #78350F; }
.product-rich-content .highlight-box { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border: 1px solid #bbf7d0; border-radius: 16px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }

html.dark .product-rich-content { color: #ccc; }
html.dark .product-rich-content h4 { color: #b0c4b1; }
html.dark .product-rich-content blockquote { background: #1a2620; border-color: #B45309; color: #fbbf24; }
html.dark .product-rich-content .highlight-box { background: #1a2620; border-color: #333; }


/* ===========================
   POLICY ACCORDION
   =========================== */

.policy-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.policy-content.open {
    max-height: 2000px;
}

.policy-toggle i {
    transition: transform 0.3s ease;
}

.policy-toggle.open i {
    transform: rotate(180deg);
}


/* ===========================
   SHOP FILTER
   =========================== */

.filter-btn.active {
    background-color: #2C3E35;
    color: white;
    border-color: #2C3E35;
}


/* ===========================
   SWIPER CUSTOMIZATIONS
   =========================== */

.hero-swiper {
    width: 100%;
    height: 100vh;
}

.hero-swiper .swiper-slide {
    background-size: cover !important;
    background-position: center !important;
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-swiper {
    width: 100%;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.feature-swiper .swiper-slide {
    height: auto;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.95);
}

.feature-swiper .swiper-slide-active {
    opacity: 1 !important;
    transform: scale(1) !important;
    z-index: 10;
}

.feedback-swiper .swiper-slide {
    transition: transform 0.5s ease;
    opacity: 1;
    transform: scale(0.92);
}

.feedback-swiper .swiper-slide-active {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.feedback-swiper .swiper-slide-prev,
.feedback-swiper .swiper-slide-next {
    opacity: 1;
    transform: scale(0.95);
}

.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
}


/* ===========================
   PRODUCT IMAGE HOVER EFFECT
   =========================== */

.product-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.product-image-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    transition: left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-image-hover {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    transition: left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-item:hover .product-image-main {
    left: -100%;
}

.product-item:hover .product-image-hover {
    left: 0;
}

.group:hover .product-image-main {
    left: -100%;
}

.group:hover .product-image-hover {
    left: 0;
}


/* ===========================
   PRODUCT DETAIL THUMBNAILS
   =========================== */

.product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-color: #F9F9F7;
    flex-shrink: 0;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.product-thumbnail.active {
    border-color: #B45309;
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.product-thumbnail:hover:not(.active) {
    border-color: rgba(180, 83, 9, 0.3);
}


/* ===========================
   LIGHT SWEEP ANIMATIONS
   =========================== */

@keyframes light-sweep {
    0%, 20% { transform: translateX(-150%) skewX(-45deg); }
    80%, 100% { transform: translateX(200%) skewX(-45deg); }
}

.light-sweep-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
    animation: light-sweep 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 1;
}

.green-sweep-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(74,222,128,0) 0%, rgba(74,222,128,0.3) 50%, rgba(74,222,128,0) 100%);
    animation: light-sweep 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 1;
}


/* ===========================
   FLOATING CONTACT BUTTONS
   =========================== */

.contact-btn {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: transform 0.3s ease;
}

.contact-btn:hover {
    transform: scale(1.05);
}

.contact-btn .icon-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: contact-shake 2.2s infinite;
}

.contact-btn .ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 1;
    opacity: 0;
    animation: contact-ripple 2.2s infinite;
}

@keyframes contact-shake {
    0%, 71% { transform: rotate(0) scale(1); }
    77% { transform: rotate(-15deg) scale(1.1); }
    83% { transform: rotate(15deg) scale(1.1); }
    89% { transform: rotate(-15deg) scale(1.1); }
    95% { transform: rotate(15deg) scale(1.1); }
    100% { transform: rotate(0) scale(1); }
}

@keyframes contact-ripple {
    0%, 71% { transform: scale(1); opacity: 0; }
    72% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.2); opacity: 0; }
}


/* ===========================
   MOBILE HAMBURGER MENU
   =========================== */

#mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #F9F9F7;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

#mobile-menu-drawer.active {
    transform: translateX(0);
}

html.dark #mobile-menu-drawer {
    background: #1a1a1a;
}

#mobile-menu-drawer .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

html.dark #mobile-menu-drawer .mobile-nav-link {
    color: #e5e5e5;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

#mobile-menu-drawer .mobile-nav-link:hover,
#mobile-menu-drawer .mobile-nav-link.active-link {
    color: #B45309;
    background: rgba(180, 83, 9, 0.05);
}

#mobile-menu-drawer .mobile-nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}


/* ===========================
   DARK MODE GLOBAL OVERRIDES
   =========================== */

html.dark {
    color-scheme: dark;
}

html.dark body {
    background-color: #111111 !important;
    color: #e5e5e5 !important;
}

html.dark nav {
    background-color: rgba(17, 17, 17, 0.95) !important;
    border-color: #333 !important;
}

html.dark section {
    background-color: #111111 !important;
}

html.dark section.bg-white,
html.dark div.bg-white {
    background-color: #1a1a1a !important;
}

html.dark header {
    background-color: #111111 !important;
}

html.dark footer {
    background-color: #0a0a0a !important;
}

html.dark .bg-white,
html.dark .bg-white\/90 {
    background-color: #1e1e1e !important;
}

html.dark [class*="bg-[#F9F9F7]"] {
    background-color: #151515 !important;
}

html.dark [class*="bg-amber-50"] {
    background-color: #1e1e1e !important;
}

html.dark [class*="bg-white/"] {
    background-color: rgba(30, 30, 30, 0.9) !important;
}

html.dark [class*="text-[#1A1A1A]"] {
    color: #e5e5e5 !important;
}

html.dark [class*="text-[#2C3E35]"] {
    color: #b0c4b1 !important;
}

html.dark h1, html.dark h2, html.dark h3, html.dark h4 {
    color: #f0f0f0 !important;
}

html.dark p {
    color: #cccccc !important;
}

html.dark a:not([class*="bg-"]):not([class*="text-white"]):not([class*="text-amber"]) {
    color: #d4d4d4 !important;
}

html.dark a:hover {
    color: #d4a017 !important;
}

html.dark input,
html.dark select,
html.dark textarea {
    background-color: #222 !important;
    border-color: #444 !important;
    color: #e5e5e5 !important;
}

html.dark input::placeholder {
    color: #888 !important;
}

html.dark [class*="border-gray"] {
    border-color: #333 !important;
}

html.dark [class*="border-white/10"] {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .feature-swiper .swiper-slide > div,
html.dark .product-item {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
}

html.dark .hero-swiper .swiper-slide,
html.dark .hero-swiper .swiper-slide > div {
    background-color: transparent !important;
}

html.dark .mix-blend-multiply,
html.dark .product-image-main,
html.dark .product-image-hover {
    mix-blend-mode: normal !important;
}

html.dark nav a.mix-blend-multiply {
    mix-blend-mode: screen !important;
}

html.dark nav a.mix-blend-multiply img[src*="logo.webp"],
html.dark #mobile-menu-drawer img[src*="logo.webp"] {
    filter: invert(1) hue-rotate(180deg);
}

html.dark #mobile-menu-drawer a:has(img[src*="logo.webp"]) {
    mix-blend-mode: screen;
} /* If :has fails here it's fine, drawer doesn't use mix-blend-multiply */

html.dark .product-image-container {
    background-color: #f0f0f0 !important;
}

html.dark .feedback-card {
    background-color: #1e1e1e !important;
}

html.dark .swiper-button-prev-custom,
html.dark .swiper-button-next-custom,
html.dark .feedback-prev,
html.dark .feedback-next {
    background-color: rgba(30, 30, 30, 0.9) !important;
    color: #e5e5e5 !important;
}

html.dark section [class*="divide-gray"] > div {
    border-color: #333 !important;
}

html.dark #promo-popup .bg-white {
    background-color: #1e1e1e !important;
}

html.dark #search-overlay {
    background-color: rgba(17, 17, 17, 0.95) !important;
}

html.dark .soft-shadow {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4) !important;
}

html.dark section[class*="bg-[#2C3E35]"],
html.dark div[class*="bg-[#2C3E35]"] {
    background-color: #1a2620 !important;
}

html.dark [class*="opacity-70"],
html.dark [class*="opacity-60"],
html.dark [class*="opacity-50"] {
    opacity: 0.7 !important;
}

html.dark .keep-dark-text,
html.dark .keep-dark-text p,
html.dark .keep-dark-text span {
    color: #1A1A1A !important;
}


/* ===========================
   MOBILE RESPONSIVE OVERRIDES
   =========================== */

@media (max-width: 767px) {
    /* Dark mode toggle: move to bottom-left, make smaller */
    .floating-theme-toggle {
        left: 12px !important;
        top: auto !important;
        bottom: 16px !important;
        transform: none !important;
    }

    .floating-theme-toggle button {
        width: 40px !important;
        height: 40px !important;
    }

    .floating-theme-toggle button i {
        font-size: 18px !important;
    }

    /* Floating contact buttons: smaller on mobile */
    .floating-contact-actions {
        right: 12px !important;
        bottom: 16px !important;
        gap: 10px !important;
    }

    .floating-contact-actions .contact-btn {
        width: 2.5rem;
        height: 2.5rem;
    }

    .floating-contact-actions .contact-btn .icon-circle i {
        font-size: 16px !important;
    }

    .floating-contact-actions .contact-btn .icon-circle svg {
        width: 100% !important;
        height: 100% !important;
    }

    /* Suppress ripple on mobile to reduce clutter */
    .floating-contact-actions .contact-btn .ripple {
        display: none;
    }

    /* Blog page simple contact buttons */
    .floating-contact-simple {
        right: 12px !important;
        bottom: 16px !important;
        gap: 8px !important;
    }

    .floating-contact-simple a {
        width: 40px !important;
        height: 40px !important;
    }

    .floating-contact-simple a i {
        font-size: 16px !important;
    }

    .floating-contact-simple a img {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 480px) {
    /* Even smaller on very small screens */
    .floating-theme-toggle {
        left: 8px !important;
        bottom: 12px !important;
    }

    .floating-theme-toggle button {
        width: 34px !important;
        height: 34px !important;
    }

    .floating-theme-toggle button i {
        font-size: 16px !important;
    }

    .floating-contact-actions {
        right: 8px !important;
        bottom: 12px !important;
        gap: 8px !important;
    }

    .floating-contact-actions .contact-btn {
        width: 2.25rem;
        height: 2.25rem;
    }
}
