/* ===================================================================
   UNIVERSAL PRODUCTS — Premium Global Polish
   Text visibility fixes · Scroll reveal · Premium section styles
   =================================================================== */

/* ===================================================================
   1. CORE TEXT VISIBILITY FIXES — nothing hidden, ever
   =================================================================== */

/* Guarantee all text is readable on dark backgrounds */
body, main, section, article, div, p, span, li, td, th, label {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* All headings — always high contrast */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-on-dark);
}

/* Canvas-light sections override */
.canvas-light h1,
.canvas-light h2,
.canvas-light h3,
.canvas-light h4,
section.canvas-light p,
section.canvas-light span {
    color: var(--text-on-light);
}

/* Fix the bugged encoding artifacts (Â, â€", etc.) — hide those containers */
.brand-sub,
.top-bar-info span {
    font-size: 0.65rem;
    color: var(--text-muted-dark);
}

/* Force body paragraph contrast */
p {
    color: var(--text-muted-dark);
    line-height: 1.75;
}

/* Inline style overrides — only apply to direct section content, NOT product cards or modals */
section[style*="linen"] > div > p,
section[style*="linen"] > div > span,
section[style*="linen"] table td,
section[style*="linen"] table th {
    color: var(--text-muted-light) !important;
}

section[style*="linen"] > div > h2,
section[style*="linen"] > div > h3:not(.product-title) {
    color: var(--text-on-light) !important;
}

/* Dark bg sections — bright text */
section[style*="espresso"] p,
section[style*="espresso"] span {
    color: var(--text-muted-dark);
}

/* ===================================================================
   2. SCROLL REVEAL ENGINE — global classes + IntersectionObserver hook
   =================================================================== */

/* Every element that should animate in */
[data-reveal],
.reveal,
.reveal-up,
.reveal-on-scroll,
.anim-fade-up,
.anim-fade-left,
.anim-fade-right,
.anim-scale-in {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity  0.85s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-reveal="left"]  { transform: translateX(-50px); }
[data-reveal="right"] { transform: translateX(50px); }
[data-reveal="scale"] { transform: scale(0.9); }
[data-reveal="fade"]  { transform: none; }

/* Triggered state */
[data-reveal].revealed,
.reveal.revealed,
.reveal-up.revealed,
.reveal-on-scroll.revealed,
.anim-fade-up.in-view,
.anim-fade-left.in-view,
.anim-fade-right.in-view,
.anim-scale-in.in-view {
    opacity: 1 !important;
    transform: none !important;
}

/* Stagger children */
[data-stagger] > *:nth-child(1)  { transition-delay: 0.05s; }
[data-stagger] > *:nth-child(2)  { transition-delay: 0.12s; }
[data-stagger] > *:nth-child(3)  { transition-delay: 0.19s; }
[data-stagger] > *:nth-child(4)  { transition-delay: 0.26s; }
[data-stagger] > *:nth-child(5)  { transition-delay: 0.33s; }
[data-stagger] > *:nth-child(6)  { transition-delay: 0.40s; }

/* ===================================================================
   3. PREMIUM SECTION HEADERS — consistent globally
   =================================================================== */

.up-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}

.up-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-accent);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--foundry-brass);
    margin-bottom: 1rem;
}

.up-eyebrow::before,
.up-eyebrow::after {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    background: var(--brass-gradient);
    flex-shrink: 0;
}

.up-section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    color: var(--text-on-dark);
}

.up-section-title.on-light {
    color: var(--text-on-light);
}

.up-section-body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-dim-dark);
    max-width: 600px;
    margin: 0 auto;
}

.up-section-body.on-light {
    color: var(--text-muted-light);
}

/* Gold accent rule under eyebrow */
.up-gold-rule {
    width: 48px;
    height: 2px;
    background: var(--brass-gradient);
    border-radius: 9999px;
    margin: 0 auto 1.5rem;
}

/* ===================================================================
   4. PREMIUM BRAND CARDS — globally consistent
   =================================================================== */

.brand-card {
    background: rgba(33, 26, 21, 0.65);
    border: 1px solid rgba(197, 155, 81, 0.15);
    border-radius: 18px;
    padding: 2rem 1.75rem;
    transition:
        transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.brand-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(197,155,81,0.05) 0%, transparent 60%);
    pointer-events: none;
    border-radius: inherit;
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(197,155,81,0.3);
    border-color: rgba(197,155,81,0.35);
}

.brand-card h3 {
    color: var(--text-on-dark) !important;
    font-family: var(--font-display) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    margin-bottom: 0.6rem !important;
}

.brand-card p {
    color: var(--text-dim-dark) !important;
    font-size: 0.88rem !important;
    line-height: 1.7 !important;
}

/* Brand icon circle */
.brand-icon {
    width: 52px;
    height: 52px;
    background: rgba(197, 155, 81, 0.12);
    border: 1px solid rgba(197,155,81,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--foundry-brass);
    margin-bottom: 1.4rem;
    flex-shrink: 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.brand-card:hover .brand-icon {
    background: rgba(197, 155, 81, 0.2);
    box-shadow: 0 0 20px rgba(197,155,81,0.25);
}

/* ===================================================================
   5. CATALOG / PRODUCT SECTION BACKGROUNDS
   =================================================================== */

.catalog-section {
    padding: 5rem 1.5rem;
    position: relative;
}

/* Fix the light catalog section text */
.catalog-section.canvas-light .catalog-toolbar h2,
.catalog-section .catalog-toolbar h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* ===================================================================
   6. PREMIUM PRODUCT CARD UPGRADE (Guaranteed Text Visibility)
   =================================================================== */

.product-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--espresso-card, #211A15) !important;
    border: 1px solid rgba(197, 155, 81, 0.18) !important;
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(197, 155, 81, 0.4),
        0 0 35px rgba(197, 155, 81, 0.15) !important;
    border-color: rgba(197, 155, 81, 0.45) !important;
}

/* Card body container — always dark espresso */
.product-card .product-body {
    padding: 1.25rem 1.4rem 1.4rem !important;
    background: var(--espresso-card, #211A15) !important;
    min-width: 0 !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Brand label — warm bright gold */
.product-card .product-brand {
    font-family: var(--font-accent, 'Space Grotesk', monospace) !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    color: var(--brass-light, #D9B36E) !important;
    line-height: 1 !important;
}

/* Card title — pure crisp white */
.product-card .product-title,
.product-card h3.product-title,
.product-card h3 {
    font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif) !important;
    font-size: clamp(1.1rem, 2vw, 1.35rem) !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
    margin: 0 0 0.55rem 0 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

.product-card:hover .product-title {
    color: #F7E7CE !important;
}

/* Dimensions spec row — soft warm white pill */
.product-card .product-specs {
    font-family: var(--font-accent, 'Space Grotesk', monospace) !important;
    font-size: 0.74rem !important;
    font-weight: 500 !important;
    color: #E8DEC8 !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(197, 155, 81, 0.22) !important;
    padding: 0.45rem 0.8rem !important;
    border-radius: 6px !important;
    margin: 0 0 0.65rem 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
}

.product-card .product-specs span,
.product-card .product-specs i {
    color: #E8DEC8 !important;
}

/* Special offer tag — amber pill */
.product-card .product-offer-tag {
    font-family: var(--font-accent, 'Space Grotesk', monospace) !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #F7D070 !important;
    background: rgba(197, 155, 81, 0.12) !important;
    border: 1px solid rgba(197, 155, 81, 0.3) !important;
    padding: 0.35rem 0.7rem !important;
    border-radius: 6px !important;
    margin: 0 0 0.75rem 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
}

.product-card .product-offer-tag span,
.product-card .product-offer-tag i {
    color: #F7D070 !important;
}

/* Pricing block */
.product-card .price-row {
    display: flex !important;
    align-items: baseline !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    margin-bottom: 0.15rem !important;
}

.product-card .price-selling {
    font-family: var(--font-body, 'Outfit', sans-serif) !important;
    font-size: clamp(1.3rem, 2.2vw, 1.6rem) !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
}

.product-card .price-mrp {
    font-family: var(--font-accent, 'Space Grotesk', monospace) !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #BDB0A0 !important;
    text-decoration: line-through !important;
    text-decoration-color: rgba(217, 179, 110, 0.6) !important;
    line-height: 1 !important;
}

.product-card .price-off-pill {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: #FFFFFF !important;
    font-family: var(--font-accent, 'Space Grotesk', monospace) !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 0.2rem 0.55rem !important;
    border-radius: 9999px !important;
    line-height: 1 !important;
}

.product-card .price-savings {
    font-family: var(--font-accent, 'Space Grotesk', monospace) !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: #34D399 !important;
    margin-top: 0.15rem !important;
}

.product-card .price-on-request-pill {
    background: rgba(197, 155, 81, 0.12) !important;
    border: 1px solid var(--foundry-brass, #C59B51) !important;
    color: var(--brass-light, #D9B36E) !important;
    font-family: var(--font-accent, 'Space Grotesk', monospace) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 6px !important;
}

/* Footer strip */
.product-card .product-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    padding-top: 0.95rem !important;
    border-top: 1px solid rgba(197, 155, 81, 0.15) !important;
    margin-top: auto !important;
    flex-wrap: wrap !important;
}

/* WhatsApp Inquire button on card */
.product-card .btn-wa-sm {
    background: var(--verdant-ink, #132E27) !important;
    border: 1px solid rgba(197, 155, 81, 0.4) !important;
    color: #FFFFFF !important;
    font-family: var(--font-body, 'Outfit', sans-serif) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    padding: 0.55rem 1.15rem !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.product-card .btn-wa-sm i {
    color: #25D366 !important;
    font-size: 0.95rem !important;
}

.product-card .btn-wa-sm:hover {
    background: #1C4238 !important;
    border-color: var(--foundry-brass, #C59B51) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

/* ===================================================================
   7. BADGE STYLES
   =================================================================== */

.product-badge,
.discount-badge {
    position: absolute;
    top: 0.85rem;
    z-index: 3;
    font-family: var(--font-accent);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
}

.product-badge {
    left: 0.85rem;
    background: rgba(14,11,8,0.75);
    border: 1px solid rgba(197,155,81,0.4);
    color: var(--foundry-brass);
}

.discount-badge {
    right: 0.85rem;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    border: none;
}

/* ===================================================================
   8. CONFIGURATOR + CTA BANNER
   =================================================================== */

.configurator-section {
    position: relative;
    overflow: hidden;
}

.configurator-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(197,155,81,0.08) 0%, transparent 65%);
    pointer-events: none;
}

.configurator-section h2 {
    font-family: var(--font-display) !important;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem) !important;
    font-weight: 600 !important;
    color: var(--text-on-dark) !important;
    letter-spacing: -0.025em !important;
    line-height: 1.15 !important;
}

.configurator-section p {
    color: var(--text-muted-dark) !important;
    font-size: 1rem !important;
    line-height: 1.75 !important;
}

/* Checklist items */
.configurator-section .font-spec span {
    font-family: var(--font-accent) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: var(--foundry-brass) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

/* ===================================================================
   9. COMPARISON TABLE
   =================================================================== */

.comparison-table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--linen-border);
    box-shadow: 0 10px 40px rgba(0,0,0,0.07);
}

.comparison-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison-table-wrap th {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-on-light);
    padding: 1.25rem 1rem;
    border-bottom: 2px solid var(--linen-border);
    text-align: left;
}

.comparison-table-wrap td {
    padding: 1rem;
    color: var(--text-muted-light);
    border-bottom: 1px solid var(--linen-border);
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ===================================================================
   10. FOOTER — premium deep dark
   =================================================================== */

.site-footer {
    background: var(--espresso-dark);
    border-top: 1px solid rgba(197,155,81,0.2);
}

.site-footer * {
    color: var(--text-dim-dark);
}

.site-footer h3,
.site-footer h4,
.footer-brand-name,
.footer-section-title {
    color: var(--text-on-dark) !important;
    font-family: var(--font-display) !important;
}

.site-footer a:hover {
    color: var(--foundry-brass) !important;
}

.footer-section-title {
    font-family: var(--font-accent) !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    color: var(--foundry-brass) !important;
    margin-bottom: 1.25rem !important;
    display: block;
}

/* ===================================================================
   11. SEARCH + FILTER BAR
   =================================================================== */

.filter-btn {
    font-family: var(--font-accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid rgba(30,23,18,0.18);
    background: transparent;
    color: var(--text-muted-light);
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.16,1,0.3,1);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--verdant-ink);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(19,46,39,0.3);
}

.search-input {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-on-light);
}

/* ===================================================================
   12. GLOBAL MICRO-INTERACTIONS
   =================================================================== */

/* Smooth image hover scale inside any card */
.product-card img,
.brand-card img {
    transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.4s ease;
    will-change: transform;
}

.product-card:hover img { transform: none; filter: none; }

/* Brass icon hover glow */
.fas, .fab, .far {
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

a:hover .fas,
a:hover .fab {
    color: var(--foundry-brass);
}

/* ===================================================================
   13. LOADING STATE — while products are fetching
   =================================================================== */

.catalog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    gap: 1.25rem;
    color: var(--text-dim-dark);
}

.catalog-loading-icon {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(197,155,81,0.2);
    border-top-color: var(--foundry-brass);
    border-radius: 50%;
    animation: rotateSlowCW 1s linear infinite;
}

.catalog-loading p {
    font-family: var(--font-accent);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim-dark);
}

/* ===================================================================
   14. MOBILE VISIBILITY
   =================================================================== */

@media (max-width: 768px) {
    .up-section-title { letter-spacing: -0.02em; }
    .brand-card { padding: 1.5rem 1.25rem; }
    .product-body { padding: 1rem 1.1rem 1.1rem !important; }
    .product-footer { padding-top: 0.65rem; }
}

/* ===================================================================
   15. ACCESSIBILITY — visible focus rings
   =================================================================== */

:focus-visible {
    outline: 2px solid var(--foundry-brass);
    outline-offset: 3px;
    border-radius: 4px;
}
