/* Winner Cosmed — production visual system
   Loaded last to align legacy page-level styles without breaking content. */

:root {
    --brand-green: #075e20;
    --brand-green-deep: #034817;
    --brand-gold: #b6924b;
    --brand-gold-soft: #d8c59a;
    --surface: #ffffff;
    --surface-soft: #f7f8f4;
    --ink: #263129;
    --muted: #667069;
    --line: rgba(7, 94, 32, 0.12);
    --shadow-sm: 0 8px 24px rgba(20, 51, 30, 0.07);
    --shadow-md: 0 18px 50px rgba(20, 51, 30, 0.11);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --content: 1200px;
}

html { scroll-padding-top: 96px; }

body {
    color: var(--ink);
    background: var(--surface);
    font-weight: 300;
    overflow-x: hidden;
}

body::selection {
    color: #fff;
    background: var(--brand-green);
}

img { max-width: 100%; }

a,
button,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(182, 146, 75, 0.48);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 9999;
    padding: 10px 16px;
    color: #fff;
    background: var(--brand-green-deep);
    border-radius: 6px;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

#main-content { scroll-margin-top: 96px; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    backdrop-filter: blur(18px);
}

.site-header.scrolled {
    padding: 8px 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 35px rgba(20, 51, 30, 0.08);
}

.site-header .navbar {
    position: relative;
    max-width: var(--content);
    min-height: 58px;
    padding: 0;
}

.site-header .logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.site-header .logo img {
    width: auto;
    height: 58px;
    object-fit: contain;
}

.site-header.scrolled .logo img { height: 50px; }

.site-header .menu {
    margin: 0;
    padding: 0;
    gap: clamp(14px, 1.75vw, 27px);
}

.site-header .menu li { animation: none; opacity: 1; }

.site-header .menu li a {
    color: #38423b;
    font-size: 0.94rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.4;
    text-transform: none;
    white-space: nowrap;
}

.site-header .menu li a::after {
    bottom: -7px;
    height: 2px;
    background: var(--brand-gold);
}

.site-header .menu li a:hover,
.site-header .menu li a.active { color: var(--brand-green); }

.site-header .language-switch {
    flex: 0 0 auto;
    border: 1px solid rgba(7, 94, 32, 0.2);
    border-radius: 999px;
    background: var(--surface-soft);
}

.site-header .language-switch button {
    min-width: 34px;
    padding: 6px 8px;
    color: var(--brand-green);
    background: transparent;
    font-size: 0.72rem;
    font-weight: 500;
}

.site-header .language-switch button.active {
    color: #fff;
    background: var(--brand-green);
    border-radius: 999px;
}

.site-header .toggle-button {
    display: flex !important;
    width: 44px;
    height: 44px;
    padding: 10px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

@media (min-width: 1181px) {
    .site-header .toggle-button { display: none !important; }
}

.site-header .toggle-button span {
    width: 22px;
    height: 2px;
    background: var(--brand-green);
}

/* Shared hero and content rhythm */
.hero,
.hero2 {
    width: min(calc(100% - 48px), var(--content));
    height: clamp(300px, 38vw, 540px);
    margin: 22px auto 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background-color: var(--surface-soft);
}

.hero::after,
.hero2::after {
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(3,72,23,.12));
}

.hero-content { max-width: 920px; }

.hero-content h1,
.luxury-title {
    color: var(--brand-green);
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.25;
    text-transform: none;
}

section:not(.hero):not(.hero2) { max-width: 1400px; }

/* Consistent cards */
.product-card,
.service-item,
.step,
.promo-card,
.blog-card,
.contact-form-card,
.map-section,
.sub-product-card,
.balm-card {
    border-color: var(--line) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
}

.product-card:hover,
.service-item:hover,
.step:hover,
.promo-card:hover,
.blog-card:hover,
.sub-product-card:hover,
.balm-card:hover {
    border-color: rgba(182, 146, 75, .48) !important;
    box-shadow: var(--shadow-md) !important;
}

.product-title,
.service-item h3,
.promo-title,
.blog-title,
.contact-form-card h2,
.map-title {
    color: var(--brand-green) !important;
    font-family: 'Kanit', sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

/* Product detail pages */
.product-section,
.coconut-section,
.oral-care-section,
.hair-section,
.balm-section {
    max-width: var(--content) !important;
}

.product-section img,
.coconut-section img,
.oral-care-section img,
.hair-section img,
.balm-section img {
    filter: drop-shadow(0 18px 24px rgba(20, 51, 30, .10));
}

/* Promotion page */
.page-promotion > .hero-content {
    margin: 0 auto;
    padding: 58px 24px 18px;
}

.page-promotion > .hero-content h1 { color: var(--brand-green); }

.page-promotion .promotion-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 28px auto 80px;
}

.page-promotion .promo-card { overflow: hidden; }
.page-promotion .promo-header { height: 5px; }
.page-promotion .promo-content { min-height: 230px; padding: 34px 28px; }

/* Contact */
.contact-buttons .contact-btn {
    min-height: 82px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 400;
    box-shadow: var(--shadow-sm);
}

.contact-form-card { border-top: 4px solid var(--brand-gold) !important; }
.contact-form-submit { border-radius: 999px; }
.map-section { overflow: hidden; }

/* Footer */
.site-footer {
    margin-top: 72px;
    padding: 64px 28px 24px;
    color: rgba(255,255,255,.82);
    background:
        radial-gradient(circle at 15% 10%, rgba(182,146,75,.16), transparent 34%),
        linear-gradient(145deg, #063e18, #022b10);
    border-top: 4px solid var(--brand-gold);
}

.site-footer .footer-container { max-width: var(--content); }

.footer-grid {
    display: grid;
    grid-template-columns: 1.15fr .65fr 1.2fr;
    gap: 56px;
    text-align: left;
}

.footer-brand img {
    width: 132px;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
}

.footer-brand p {
    max-width: 390px;
    margin: 18px 0 0;
    color: rgba(255,255,255,.7);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 18px;
    color: var(--brand-gold-soft);
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: none;
}

.footer-navigation nav,
.footer-contact-block address {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin: 0;
    font-style: normal;
}

.site-footer a,
.footer-contact-block span {
    color: rgba(255,255,255,.76);
    line-height: 1.65;
    text-decoration: none;
}

.site-footer a:hover { color: #fff; }

.footer-contact-block i {
    width: 22px;
    color: var(--brand-gold-soft);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.footer-line-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    color: #fff;
    background: #06c755;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    cursor: pointer;
}

.footer-copyright {
    margin: 0;
    color: rgba(255,255,255,.54);
    font-size: .78rem;
    letter-spacing: .04em;
}

/* Reveal fallback: content stays visible if JavaScript fails. */
.no-js .reveal,
body:not(.js-ready) .reveal { opacity: 1; transform: none; }

@media (max-width: 1180px) {
    .site-header .navbar > .language-switch { display: none; }
    .site-header .toggle-button { display: flex; }
    .site-header .toggle-button {
        display: flex !important;
        position: relative;
        z-index: 3;
        flex: 0 0 44px;
        margin-left: auto;
    }

    .site-header .menu {
        position: absolute;
        top: calc(100% + 1px);
        right: 20px;
        left: 20px;
        width: auto;
        max-height: 0;
        padding: 0 18px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        border: 1px solid var(--line);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        background: rgba(255,255,255,.98);
        box-shadow: var(--shadow-md);
        transform: translateY(-8px);
        transition: max-height .3s ease, padding .3s ease, opacity .2s ease, transform .3s ease, visibility .3s ease;
    }

    .site-header .menu.active {
        max-height: 650px;
        padding: 18px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-header .menu li a {
        display: block;
        padding: 10px 6px;
        font-size: 1rem;
    }

    .page-promotion .promotion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .site-header,
    .site-header.scrolled { padding: 8px 16px; }
    .site-header .logo img,
    .site-header.scrolled .logo img { height: 46px; }

    .hero,
    .hero2 {
        width: calc(100% - 24px);
        height: clamp(230px, 62vw, 330px);
        margin-top: 12px;
        border-radius: var(--radius-md);
    }

    .luxury-intro h2,
    .product-intro .intro-subtitle,
    .blog-intro .intro-subtitle {
        max-width: 100%;
        padding: 0 12px;
        font-size: clamp(.95rem, 4.5vw, 1.2rem) !important;
        letter-spacing: .1em !important;
        line-height: 1.55;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .page-promotion .promotion-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 34px; }
    .footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
    .site-header .menu { right: 10px; left: 10px; }
    .site-footer { padding: 48px 18px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
