/* Smooth Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fffbeb;
}
::-webkit-scrollbar-thumb {
    background: #b91c1c;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #991b1b;
}

/* Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Ghee Steam Animation */
@keyframes steam {
    0% { transform: translateY(0px) scaleX(1); opacity: 0.1; filter: blur(1px); }
    50% { transform: translateY(-10px) scaleX(1.1); opacity: 0.4; filter: blur(2px); }
    100% { transform: translateY(-20px) scaleX(0.9); opacity: 0; filter: blur(3px); }
}
.steam-line {
    animation: steam 3s ease-in-out infinite;
}

/* Decorative Kolam/Muggu Background pattern overlay */
.kolam-overlay {
    background-color: #fffbeb;
    background-image: radial-gradient(rgba(185, 28, 28, 0.04) 0.5px, transparent 0.5px), radial-gradient(rgba(185, 28, 28, 0.04) 0.5px, #fffbeb 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

/* Language Button Toggle Styling */
.lang-active {
    background-color: #ffffff !important;
    color: #b91c1c !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Image Zoom Lens Magnifier classes */
.zoom-image-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}
.zoom-lens {
    position: absolute;
    border: 2px solid #d97706;
    border-radius: 50%;
    width: 140px;
    height: 140px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 30;
    background-color: rgba(255, 251, 235, 0.4);
    backdrop-filter: blur(1.6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Hover Animation for Nav Links — fastampus snappy: hover fires a real
   glow on EVERY link including the already-active one (which previously
   showed no change on hover because its underline was already full). */
nav a {
    position: relative;
    transition: color 0.15s ease, transform 0.12s ease, text-shadow 0.15s ease;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fbbf24; /* mustardGold-400 */
    transition: width 0.18s ease, box-shadow 0.18s ease;
}
nav a:hover::after, nav a.text-mustardGold-400::after, nav a.nav-active::after {
    width: 100%;
}
nav a:hover {
    color: #fcd34d !important;
    text-shadow: 0 0 14px rgba(252, 211, 77, 0.75);
}
nav a:hover::after {
    box-shadow: 0 0 12px rgba(252, 211, 77, 0.95), 0 0 3px rgba(252, 211, 77, 1);
}
nav a.nav-active {
    color: #fbbf24;
}

/* Page and menu transitions make top-bar navigation feel intentional. */
@media (prefers-reduced-motion: no-preference) {
    .page-view:not(.hidden) {
        animation: page-enter 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
    }
    @keyframes page-enter {
        from { opacity: 0; transform: translateY(12px) scale(0.998); }
        to { opacity: 1; transform: none; }
    }
    #mobile-menu:not(.hidden) {
        animation: menu-drop 0.24s ease;
        transform-origin: top center;
    }
    @keyframes menu-drop {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: none; }
    }

    /* Mobile links cascade in one after another. */
    #mobile-menu:not(.hidden) a {
        animation: menu-link-in 0.3s ease backwards;
    }
    #mobile-menu:not(.hidden) a:nth-child(2) { animation-delay: 0.05s; }
    #mobile-menu:not(.hidden) a:nth-child(3) { animation-delay: 0.1s; }
    #mobile-menu:not(.hidden) a:nth-child(4) { animation-delay: 0.15s; }
    #mobile-menu:not(.hidden) a:nth-child(5) { animation-delay: 0.2s; }
    @keyframes menu-link-in {
        from { opacity: 0; transform: translateX(-10px); }
        to { opacity: 1; transform: none; }
    }
}

/* Top-bar tap polish: links press in, underlines glide with a glow. */
nav a {
    transition: color 0.25s ease, transform 0.15s ease;
}
nav a::after {
    transition: width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease;
}
nav a:hover::after, nav a.text-mustardGold-400::after, nav a.nav-active::after {
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
}
nav a:active {
    transform: scale(0.94);
}
#main-header button {
    transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}
#main-header button:active {
    transform: scale(0.93);
}

/* Header tightens on scroll: shadow deepens, bar height eases down. */
#main-header > div {
    transition: height 0.3s ease;
}
#main-header.header-scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
}
#main-header.header-scrolled > div {
    height: 3.25rem;
}
@media (min-width: 768px) {
    #main-header.header-scrolled > div {
        height: 3.5rem;
    }
}

/* Keep anchored sections clear of the sticky header. */
#catalog,
#customizer-section {
    scroll-margin-top: 6.5rem;
}

/* About promise card — cream offset panel, gold hairline, dashed dividers. */
.about-promise-card {
    border: 1px solid #fde68a;
    border-radius: 1.5rem;
    box-shadow: -14px 14px 0 0 #fef9c7, 0 20px 40px -20px rgba(0, 0, 0, 0.18);
}
.about-promise-divider {
    border-top: 2px dashed #fcd34d;
    border-bottom: 2px dashed #fcd34d;
}

/* Photography fades — keep type readable where it sits on imagery. */
.hero-photo-fade {
    background:
        linear-gradient(0deg, #ffffff 0%, rgba(255, 255, 255, 0) 12%),
        linear-gradient(0deg, rgba(26, 12, 8, 0.55) 0%, rgba(26, 12, 8, 0) 42%),
        linear-gradient(90deg, rgba(26, 12, 8, 0.84) 0%, rgba(26, 12, 8, 0.62) 32%, rgba(26, 12, 8, 0.22) 62%, rgba(26, 12, 8, 0.04) 100%);
}
.login-photo-fade {
    /* Warm brand fade: real text sits on the left, clean photo shows through. */
    background: linear-gradient(90deg, rgba(61, 15, 15, 0.94) 0%, rgba(61, 15, 15, 0.82) 42%, rgba(61, 15, 15, 0.38) 68%, rgba(61, 15, 15, 0.12) 100%);
}
/* Clean high-res photo fills the panel; no blur needed. */
.login-photo-img {
    object-position: 82% center;
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-33.3333%, 0, 0); }
}
.animate-marquee-smooth {
    animation: marquee 16s linear infinite;
    will-change: transform;
}

/* -- Seamless scrolling offer strip -- */
.promo-track {
    display: inline-flex;
    animation: promo-scroll 22s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}
.promo-group {
    display: inline-block;
    white-space: nowrap;
}
#promo-strip:hover .promo-track {
    animation-play-state: paused;
}
@keyframes promo-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   Mobile commerce system — lessons from the 5 UI videos.
   V2 (Mobile UI): whitespace over nested containers, one scroll
   direction per section, type stays readable. V1 (Ecommerce):
   options in the open, specific numbers, halo badges.
   ============================================================ */

/* Never let a long Telugu/English string force horizontal scroll. */
[data-i18n], .font-telugu {
    overflow-wrap: break-word;
}

/* Guard the page against sideways scroll without breaking sticky. */
html {
    overflow-x: clip;
}

/* Touch phones have no hover: replace hover-only affordances with press states.
   (The zoom lens + its hint are desktop-only — see canHoverZoom in app.js.) */
@media (hover: none) {
    /* No hint headline on touch: the finger discovers the lens by sliding,
       and the chip just eats space above the fold. Desktop keeps its hint. */
    .zoom-hint {
        display: none !important;
    }
    .zoom-image-container {
        cursor: pointer;
    }
    button:active {
        transform: scale(0.96);
        transition: transform 0.12s ease;
    }
    .ux-card button:active {
        transform: scale(0.94);
    }
}

@media (hover: hover) {
    /* Desktop wording for the zoom hint (touch wording hides here). */
    .zoom-hint .hint-touch {
        display: none;
    }
}

@media (max-width: 639px) {
    /* Compact card geometry lives in uxpeak-upgrade.css (loads last, wins).
       This block keeps behaviour-level rules only. */

    /* Card descriptions clamp to 2 lines so 2-col rows stay scannable;
       the full story lives one tap away in the product modal. */
    .desc-clamp {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* One direction per section: kill sideways drift inside the modal tabs. */
    #product-page-overlay .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    #product-page-overlay .overflow-x-auto::-webkit-scrollbar {
        display: none;
    }

    /* Filter pills: full-bleed snap row instead of a cramped wrap. */
    #catalog .flex.flex-wrap.justify-center {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    #catalog .flex.flex-wrap.justify-center::-webkit-scrollbar {
        display: none;
    }
    #catalog .flex.flex-wrap.justify-center > button {
        flex-shrink: 0;
    }
}
