/* ============================================
   MODERN POLISH LAYER
   Loaded last: consolidates stray colors, adds
   smooth motion + responsive safety nets on top
   of the existing design without rewriting it.
   ============================================ */

:root {
    /* ---- New light/minimal theme palette ---- */
    --theme-bg: #FAF8F4;          /* warm ivory page background */
    --theme-surface: #FFFFFF;      /* cards, header, panels */
    --theme-surface-alt: #F1ECE3;  /* footer / alternating sections */
    --theme-ink: #221F1B;          /* primary text — warm charcoal, not pure black */
    --theme-ink-soft: #736C62;     /* secondary text */
    --theme-ink-faint: #A39C90;    /* tertiary / placeholder text */
    --theme-border: #E7E0D3;       /* hairlines, dividers */
    --theme-accent: #4B5A45;       /* signature accent — deep sage */
    --theme-accent-dark: #394333;  /* accent hover/active */
    --theme-accent-soft: #E7ECE2;  /* accent tint for badges/backgrounds */

    /* Consolidated accent tokens (site had #ff4757 / #c0392b / #e74c3c
       scattered across header.css / footer.css / product-card-patch.css) */
    --sale-color: #C1522E;
    --sale-color-strong: #A6431F;
    --focus-ring: var(--theme-accent);

    /* Retarget the site's existing design tokens onto the new palette so
       every component already using var(--primary-color) etc. (buttons,
       prices, borders) picks up the new look automatically. */
    --primary-color: var(--theme-ink);
    --secondary-color: var(--theme-ink);
    --accent-color: var(--theme-accent);
    --light-gray: var(--theme-surface-alt);
    --medium-gray: var(--theme-border);
    --dark-gray: var(--theme-ink-soft);
    --text-primary: var(--theme-ink);
    --text-secondary: var(--theme-ink-soft);
    --text-light: var(--theme-ink-faint);
    --shadow-sm: 0 2px 10px rgba(34, 31, 27, 0.06);
    --shadow-md: 0 6px 20px rgba(34, 31, 27, 0.08);
    --shadow-lg: 0 12px 36px rgba(34, 31, 27, 0.12);
}

body {
    background-color: var(--theme-bg);
}

/* --------------------------------------------------
   1. MOTION FOUNDATIONS
-------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

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

/* --------------------------------------------------
   2. ACCESSIBLE FOCUS STATES
   (visible keyboard focus without disturbing mouse users)
-------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.product-card a:focus-visible,
.action-btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --------------------------------------------------
   3. SCROLL-REVEAL (opt-in via .reveal-on-scroll,
   added by a small script in footer.php; degrades
   to always-visible if JS/IO is unavailable)
-------------------------------------------------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.no-js .reveal-on-scroll,
.reveal-on-scroll.no-observer {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------
   4. PRODUCT CARD MICRO-INTERACTIONS
   (image zoom already exists; layer in a card lift
   + smoother shadow so the whole card feels alive,
   not just the image)
-------------------------------------------------- */
.product-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(0, 0, 0, 0.16));
}
@media (hover: none) {
    /* touch devices: skip hover-lift, avoid stuck states */
    .product-card:hover { transform: none; }
}

.wishlist-btn,
.quick-view-btn {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.25s ease, color 0.25s ease;
}
.wishlist-btn:hover,
.quick-view-btn:hover {
    transform: scale(1.1);
}

/* --------------------------------------------------
   5. BUTTONS — consistent press feedback everywhere
-------------------------------------------------- */
button,
.action-btn,
.add-cart-btn,
.btn-primary,
input[type="submit"] {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.2s ease,
                background 0.25s ease,
                color 0.25s ease,
                border-color 0.25s ease;
}
button:active,
.action-btn:active,
.add-cart-btn:active,
.btn-primary:active {
    transform: scale(0.97);
}

/* --------------------------------------------------
   6. CONSOLIDATED SALE / DISCOUNT COLOR
   (was #ff4757 in some files, #c0392b / #e74c3c in others)
-------------------------------------------------- */
.discount-badge,
.sale-badge,
.current-price {
    color: var(--sale-color);
}
.discount-badge,
.sale-badge {
    background: var(--sale-color);
    color: #fff;
}

/* --------------------------------------------------
   7. IMAGE LOAD POLISH
   (avoid the jarring pop-in of large product photos)
-------------------------------------------------- */
img {
    transition: opacity 0.4s ease;
}
/* opacity is toggled via inline style by JS (see footer.php), never
   hidden by default in CSS alone — so images always show even if
   JS fails to run */

/* --------------------------------------------------
   8. RESPONSIVE SAFETY NET
-------------------------------------------------- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
img, video, iframe, table {
    max-width: 100%;
}

/* Comfortable minimum touch targets on small screens */
@media (max-width: 768px) {
    button,
    .action-btn,
    a.btn,
    .mobile-nav-menu > li > a,
    .hero-arrow,
    .header-icon {
        min-height: 44px;
    }
}

/* ============================================
   9. LIGHT / MINIMAL RE-THEME
   Re-skins the dark chrome (header, announcement
   bar, footer) to match the new light palette.
   The hero slider keeps its own dark-on-photo
   overlay treatment since it sits over imagery.
   ============================================ */

/* ---- Announcement bar: a confident accent ribbon ---- */
.announcement-bar {
    background: var(--theme-accent) !important;
}
.ann-item a {
    color: #fff !important;
    border-bottom-color: rgba(255, 255, 255, 0.4) !important;
}

/* ---- Header: frosted light glass instead of dark overlay ---- */
.modern-header {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.modern-header.scrolled {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid var(--theme-border) !important;
    box-shadow: 0 4px 24px rgba(34, 31, 27, 0.06) !important;
}
/* Homepage's own scroll-driven inline style (index.php) sets a dark
   background while scrolling over photo banners — leave that alone,
   it only fires while actively over an image, not on the rest of the page. */

.header-left .main-logo,
.footer-widget .main-logo {
    filter: none !important;
    opacity: 1 !important;
}

.hdr-icon i {
    color: var(--theme-ink) !important;
}
.hamburger-btn .bar {
    background: var(--theme-ink) !important;
}

.main-nav-item > a {
    color: var(--theme-ink) !important;
}
.main-nav-item > a:hover {
    color: var(--theme-accent) !important;
    opacity: 1 !important;
}
.hdr-icon:hover {
    opacity: 1 !important;
    color: var(--theme-accent) !important;
}
.hdr-icon:hover i {
    color: var(--theme-accent) !important;
}

.header-icon {
    color: var(--theme-ink);
}
.header-icon:hover {
    background-color: var(--theme-surface-alt);
    color: var(--theme-accent);
}

.cart-icon .cart-count,
.header-icon.cart-icon .cart-count {
    background-color: var(--sale-color);
}

/* Mobile nav toggle bars / close icon, if colored via currentColor */
#mobileNav,
.mobile-nav-header {
    background: var(--theme-surface);
    color: var(--theme-ink);
}

/* ---- Buttons: quiet ink outline, fills solid on hover/press ---- */
.action-btn {
    background: var(--theme-surface);
    color: var(--theme-ink);
    border: 1px solid var(--theme-ink);
    box-shadow: none;
}
.action-btn:hover,
.add-cart-btn:hover,
.register-btn:hover {
    background: var(--theme-ink) !important;
    color: var(--theme-surface) !important;
    box-shadow: var(--shadow-md) !important;
}

.btn-add-to-cart {
    background: var(--theme-ink) !important;
}
.btn-add-to-cart:hover {
    background: var(--theme-accent) !important;
    box-shadow: var(--shadow-md) !important;
}

.scrollup {
    background: var(--theme-ink);
}
.scrollup:hover {
    background: var(--theme-accent);
}

/* ---- Footer: light, warm, still clearly a footer via a deeper tint ---- */
.footer-bottom {
    background: var(--theme-surface-alt) !important;
    color: var(--theme-ink-soft) !important;
    border-top: 1px solid var(--theme-border);
}
.footer-widget p {
    color: var(--theme-ink-soft) !important;
}
.footer-widget h3 {
    color: var(--theme-ink) !important;
    border-bottom-color: var(--theme-border) !important;
}
.footer-widget ul li a {
    color: var(--theme-ink-soft) !important;
}
.footer-widget ul li a:hover {
    color: var(--theme-accent) !important;
}
.footer-widget .contact-line,
.footer-widget .contact-line i {
    color: var(--theme-ink-soft) !important;
}
.footer-social-link {
    border-color: var(--theme-border) !important;
    color: var(--theme-ink-soft) !important;
}
.footer-social-link:hover {
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    background: var(--theme-accent-soft) !important;
}
.footer-widget input[type="email"] {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    color: var(--theme-ink);
    padding: 12px 14px;
    width: 100%;
    margin-bottom: 10px;
}
.footer-widget input[type="email"]::placeholder {
    color: var(--theme-ink-faint);
}
.footer-widget button[type="submit"] {
    background: var(--theme-ink);
    color: var(--theme-surface);
    border: none;
    padding: 12px 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.footer-widget button[type="submit"]:hover {
    background: var(--theme-accent);
}
.footer-bottom .copyright {
    border-top-color: var(--theme-border) !important;
    color: var(--theme-ink-faint) !important;
}
.footer-bottom .copyright a {
    color: var(--theme-ink-soft) !important;
}
.footer-bottom .copyright a:hover {
    color: var(--theme-accent) !important;
}

/* ---- Sale / discount consolidation onto the warm terracotta token ---- */
.discount-badge,
.sale-badge,
.current-price {
    color: var(--sale-color) !important;
}
.discount-badge,
.sale-badge {
    background: var(--sale-color) !important;
    color: #fff !important;
}
