/* Final alignment layer: keeps every page in the same luxury system. */

:root {
    --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-soft: cubic-bezier(0.2, 0, 0.2, 1);
    --duration-fast: 240ms;
    --duration-smooth: 520ms;
    --duration-reveal: 900ms;
}

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

body {
    text-rendering: optimizeLegibility;
}

a,
button,
.contact-btn,
.back-btn,
.blog-read-more,
.article-back,
.line-open-link {
    transition-duration: var(--duration-fast);
    transition-timing-function: var(--ease-luxury);
}

img {
    backface-visibility: hidden;
    transform: translateZ(0);
}

.hero,
.hero2 {
    margin: 16px auto 0;
    height: 560px;
    width: calc(100% - 48px);
    max-width: 1200px;
    border-radius: 0;
    animation: luxuryHeroIn 1.1s var(--ease-luxury) both;
    transform-origin: center;
}

.hero::after,
.hero2::after {
    transition: opacity var(--duration-smooth) var(--ease-luxury);
}

body.idle-motion .hero,
body.idle-motion .hero2 {
    background-size: 110% auto;
    animation:
        luxuryHeroIn 1.1s var(--ease-luxury) both,
        idleHeroDrift 4.8s ease-in-out infinite alternate;
}

.hero + section:not(.gmp-section):not(.featured-blog):not(.product-catalog),
.hero + .hero-content {
    background: var(--bg-soft);
    margin: -8px auto 0;
    max-width: 1400px;
    padding: 64px 24px 56px !important;
}

.hero + .hero-content {
    width: 100%;
}

section:not(.hero):not(.hero2):not(.gmp-section):not(.featured-blog):not(.product-catalog) .hero-content,
.hero + .hero-content {
    margin: 0 auto;
    padding: 0 24px;
}

.hero-content h1 {
    color: var(--accent);
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h5,
.hero-content p,
.hero-content div {
    color: #666;
    font-weight: 300;
    line-height: 1.85;
}

.promotion-grid,
.blog-grid,
.contact-buttons,
.sub-product-grid {
    gap: 22px;
    margin: 48px auto 24px;
    max-width: 1180px;
    padding: 0 24px;
}

.promo-card,
.blog-card,
.sub-product-card,
.product-card,
.map-section {
    background: #fff;
    border: 1px solid rgba(191, 167, 111, 0.24);
    border-radius: 0;
    box-shadow: 0 14px 34px rgba(45, 42, 38, 0.06);
    overflow: hidden;
    transition:
        transform var(--duration-smooth) var(--ease-luxury),
        box-shadow var(--duration-smooth) var(--ease-luxury),
        border-color var(--duration-smooth) var(--ease-luxury),
        background-color var(--duration-smooth) var(--ease-luxury);
    will-change: transform;
}

.promo-card:hover,
.blog-card:hover,
.sub-product-card:hover,
.product-card:hover {
    border-color: rgba(191, 167, 111, 0.6);
    box-shadow: 0 22px 46px rgba(191, 167, 111, 0.14);
    transform: translateY(-6px);
}

.promo-header {
    height: 3px;
    background: var(--gold-grad);
}

.promo-header.dark {
    background: linear-gradient(135deg, #2D2A26, var(--primary));
}

.promo-content,
.blog-content,
.sub-product-card {
    padding: 30px 26px;
}

.promo-title,
.blog-title,
.sub-product-title,
.map-title,
.product-title {
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.35;
}

.promo-title {
    font-size: 1.65rem;
    margin-bottom: 14px;
}

.promo-description,
.blog-excerpt,
.sub-product-features li,
.product-desc,
.product-intro,
.type-box p,
.sub-product-subtitle {
    color: #666;
    font-weight: 300;
    line-height: 1.75;
}

.blog-image,
.sub-product-image,
.product-image {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.blog-image {
    height: 220px;
}

.blog-date {
    color: var(--accent);
    font-weight: 400;
}

.blog-category {
    background: rgba(191, 167, 111, 0.12);
    border: 1px solid rgba(191, 167, 111, 0.24);
    border-radius: 0;
    color: var(--primary);
    font-weight: 400;
}

.featured-blog {
    background: linear-gradient(135deg, #fff, var(--bg-soft));
    border: 1px solid rgba(191, 167, 111, 0.24);
    border-radius: 0;
    box-shadow: 0 18px 42px rgba(45, 42, 38, 0.06);
    color: var(--text-dark);
    margin: 42px auto 24px;
    max-width: 1180px;
    padding: 42px 32px !important;
}

.featured-blog h2 {
    color: var(--primary);
    font-weight: 500;
}

.featured-blog p {
    color: #666;
}

.contact-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-btn {
    border: 1px solid rgba(191, 167, 111, 0.32);
    border-radius: 0;
    box-shadow: 0 14px 30px rgba(45, 42, 38, 0.08);
    font-size: 1.35rem;
    font-weight: 300;
    min-height: 86px;
}

.btn-line,
.btn-form,
.btn-phone {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.map-section {
    margin: 40px auto 24px;
    max-width: 1180px;
    padding: 32px;
}

.map-container {
    border: 1px solid rgba(191, 167, 111, 0.24);
    border-radius: 0;
    box-shadow: none;
}

.product-section {
    margin: 48px auto 24px;
    max-width: 1180px;
    padding: 0 24px;
}

.product-section .product-card {
    border-radius: 0;
    gap: 42px;
    grid-template-columns: minmax(280px, 360px) 1fr;
    padding: 34px;
}

.product-section .product-image img,
.sub-product-image img {
    border-radius: 0;
    box-shadow: none;
    transition:
        transform 700ms var(--ease-luxury),
        filter 700ms var(--ease-luxury),
        box-shadow 700ms var(--ease-luxury);
}

.blog-card:hover img,
.sub-product-card:hover img,
.product-card:hover img,
.balm-card:hover img,
.toothpaste-card:hover img,
.hair-detail-card:hover img,
.coconut-card:hover img {
    transform: scale(1.035);
}

body.idle-motion .gmp-visual img,
body.idle-motion .product-image img,
body.idle-motion .sub-product-image img,
body.idle-motion .blog-image img,
body.idle-motion .balm-image img,
body.idle-motion .toothpaste-image img,
body.idle-motion .hair-detail-image img,
body.idle-motion .coconut-image img {
    animation: idleImageFloat 3.8s ease-in-out infinite;
}

body.idle-motion .promo-card,
body.idle-motion .blog-card,
body.idle-motion .sub-product-card,
body.idle-motion .product-card,
body.idle-motion .balm-card,
body.idle-motion .toothpaste-card,
body.idle-motion .coconut-card,
body.idle-motion .hair-detail-card,
body.idle-motion .step {
    animation: idleCardBreath 4.2s ease-in-out infinite;
}

body.idle-motion .promo-card:nth-child(2n),
body.idle-motion .blog-card:nth-child(2n),
body.idle-motion .sub-product-card:nth-child(2n),
body.idle-motion .step:nth-child(2n) {
    animation-delay: -2s;
}

body.idle-motion .promo-card:nth-child(3n),
body.idle-motion .blog-card:nth-child(3n),
body.idle-motion .sub-product-card:nth-child(3n),
body.idle-motion .step:nth-child(3n) {
    animation-delay: -4s;
}

.product-types {
    gap: 18px;
}

.type-box {
    border-top: 1px solid rgba(191, 167, 111, 0.2);
    padding-top: 16px;
}

.type-box h3 {
    color: var(--primary);
    font-weight: 500;
}

.back-btn {
    color: var(--primary);
    margin: 24px max(24px, calc((100vw - 1180px) / 2)) 0;
}

.sub-product-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.sub-product-card {
    text-align: center;
}

.sub-product-image {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    overflow: hidden;
}

.sub-product-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.sub-product-features {
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(191, 167, 111, 0.2);
}

.sub-product-features li::before {
    content: "";
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    top: 14px;
    left: 4px;
}

/* ========== LEGACY PRODUCT-DETAIL PAGES: THEME UNIFICATION ========== */
/* Balm / Toothpaste / Coconut oil / Hair detail used a grey-box + green-title
   look. Pull them into the same gold-on-cream luxury system as every other
   page. (These classes are page-specific, so the shared rules above miss them.) */

.balm-section,
.coconut-section,
.hair-detail-section,
.toothpaste-grid {
    margin: 48px auto 24px;
    max-width: 1180px;
    padding: 0 24px;
}

.balm-grid,
.hair-detail-grid,
.toothpaste-grid {
    gap: 22px;
}

.balm-card,
.toothpaste-card,
.coconut-card,
.hair-detail-card {
    background: #fff;
    border: 1px solid rgba(191, 167, 111, 0.24);
    border-radius: 0;
    box-shadow: 0 14px 34px rgba(45, 42, 38, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    will-change: transform;
}

.balm-card:hover,
.toothpaste-card:hover,
.coconut-card:hover,
.hair-detail-card:hover {
    border-color: rgba(191, 167, 111, 0.6);
    box-shadow: 0 22px 46px rgba(191, 167, 111, 0.14);
    transform: translateY(-6px);
}

/* Titles: Playfair gold; drop the green pill backgrounds */
.toothpaste-card h2,
.coconut-title,
.coconut-subtitle,
.balm-card-title,
.hair-detail-card-title,
.hair-detail-card .coconut-subtitle {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 0.06em;
    background: none;
    padding: 0;
    border-radius: 0;
    display: block;
}

.toothpaste-card h2 { font-size: 1.5rem; margin-bottom: 18px; }

.coconut-subtitle,
.hair-detail-card .coconut-subtitle { font-size: 1.25rem; margin-bottom: 16px; }

/* Descriptions: soft neutral, light weight */
.balm-desc,
.toothpaste-desc,
.hair-detail-desc {
    color: #666;
    font-weight: 300;
    line-height: 1.85;
}

.balm-desc strong { color: var(--primary); font-weight: 600; }

/* Images: sharp corners, no heavy inner shadow */
.balm-image,
.toothpaste-image,
.hair-detail-image {
    border-radius: 0;
    box-shadow: none;
}

.balm-image img,
.toothpaste-image img,
.hair-detail-image img,
.coconut-image img {
    border-radius: 0;
}

/* Coconut benefit list: gold accent rule */
.coconut-benefits li {
    color: #666;
    font-weight: 300;
    border-left: 2px solid var(--accent);
    padding-left: 14px;
}

.coconut-benefits li span { color: var(--primary); font-weight: 600; }

footer {
    margin-top: 40px;
}

.modal.fade .modal-dialog {
    transform: translateY(18px) scale(0.98);
    transition: transform var(--duration-smooth) var(--ease-luxury), opacity var(--duration-smooth) var(--ease-luxury);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-backdrop.show {
    opacity: 0.38;
}

.line-qr-modal {
    border: 1px solid rgba(191, 167, 111, 0.32);
    border-radius: 0;
    box-shadow: 0 24px 60px rgba(45, 42, 38, 0.18);
}

.line-qr-modal .modal-header {
    border-bottom: 1px solid rgba(191, 167, 111, 0.2);
}

.line-qr-modal .modal-title {
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.line-qr-modal .modal-body {
    text-align: center;
    padding: 34px 28px 30px;
}

.line-qr-modal img {
    width: min(260px, 100%);
    height: auto;
    display: block;
    margin: 0 auto 18px;
}

.line-qr-modal p {
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    margin: 0 0 18px;
}

.line-qr-modal .line-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gold-grad);
    color: #fff;
    padding: 10px 22px;
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: transform var(--duration-fast) var(--ease-luxury), box-shadow var(--duration-fast) var(--ease-luxury);
}

.line-qr-modal .line-open-link:hover {
    color: #fff;
    box-shadow: 0 12px 24px rgba(191, 167, 111, 0.24);
    transform: translateY(-2px);
}

.footer-line-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(250, 249, 246, 0.8);
    text-decoration: none;
}

.footer-line-link:hover {
    color: var(--accent);
}

.reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition:
        opacity var(--duration-reveal) var(--ease-luxury),
        transform var(--duration-reveal) var(--ease-luxury);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.steps-grid .reveal:nth-child(2),
.product-grid .reveal:nth-child(2),
.blog-grid .reveal:nth-child(2),
.sub-product-grid .reveal:nth-child(2) {
    transition-delay: 70ms;
}

.steps-grid .reveal:nth-child(3),
.product-grid .reveal:nth-child(3),
.blog-grid .reveal:nth-child(3),
.sub-product-grid .reveal:nth-child(3) {
    transition-delay: 140ms;
}

.steps-grid .reveal:nth-child(4),
.product-grid .reveal:nth-child(4),
.blog-grid .reveal:nth-child(4),
.sub-product-grid .reveal:nth-child(4) {
    transition-delay: 210ms;
}

.steps-grid .reveal:nth-child(5),
.blog-grid .reveal:nth-child(5) {
    transition-delay: 280ms;
}

.steps-grid .reveal:nth-child(6),
.blog-grid .reveal:nth-child(6) {
    transition-delay: 350ms;
}

@keyframes luxuryHeroIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
        filter: saturate(0.92);
    }
    to {
        opacity: 1;
        transform: none;
        filter: saturate(1);
    }
}

@keyframes idleHeroDrift {
    from {
        background-position: 40% 52%;
        filter: saturate(1);
    }
    to {
        background-position: 62% 46%;
        filter: saturate(1.14);
    }
}

@keyframes idleImageFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        filter: saturate(1);
    }
    50% {
        transform: translate3d(0, -10px, 0) scale(1.00) rotate(0.45deg);
        filter: saturate(1.1);
    }
}

@keyframes idleCardBreath {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        box-shadow: 0 14px 34px rgba(45, 42, 38, 0.06);
    }
    50% {
        transform: translate3d(0, -5px, 0);
        box-shadow: 0 20px 44px rgba(191, 167, 111, 0.16);
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 992px) {
    .hero,
    .hero2 {
        height: 400px;
        width: 95%;
    }

    .promotion-grid,
    .blog-grid,
    .contact-buttons,
    .sub-product-grid {
        gap: 18px;
        margin-top: 36px;
    }

    .product-section .product-card {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .hero,
    .hero2 {
        height: 300px;
        margin-top: 10px;
    }

    .hero + section:not(.gmp-section):not(.featured-blog):not(.product-catalog),
    .hero + .hero-content {
        padding: 42px 18px 36px !important;
    }

    .contact-buttons {
        grid-template-columns: 1fr;
    }

    .featured-blog,
    .map-section,
    .product-section .product-card {
        padding: 28px 20px !important;
    }
}

@media (max-width: 576px) {
    .hero,
    .hero2 {
        height: 250px;
    }

    .promotion-grid,
    .blog-grid,
    .contact-buttons,
    .sub-product-grid,
    .product-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .promo-content,
    .blog-content,
    .sub-product-card {
        padding: 24px 20px;
    }
}
