/* ===== NOAM - MAIN STYLES ===== */

body {
    font-family: 'Montserrat', sans-serif;
    scroll-behavior: smooth;
}

/* ===== HERO BANNER ===== */
/* All devices: show the full 16:5 poster, never cropped */
.hero-banner {
    aspect-ratio: 16 / 5;
    height: auto;
    width: 100%;
    /* Cap absolute height on ultra-wide screens so banner doesn't get too tall.
       Below that cap, aspect-ratio drives the height. */
    max-height: 560px;
}

.hero-img {
    object-fit: contain;
    object-position: center;
}

.hero-overlay {
    /* Soft overlay — does not obscure poster content */
    background: linear-gradient(to right, rgba(17, 17, 17, 0.15), rgba(17, 17, 17, 0.05), transparent);
    pointer-events: none;
}

/* Very large screens (≥ 1920px wide) — if max-height kicks in, let image cover */
@media (min-width: 1920px) {
    .hero-img {
        object-fit: cover;
    }
}

/* ===== POSTER / SPLASH SCREEN ===== */
.poster-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: posterFadeIn 0.3s ease-out;
}

.poster-splash.hidden {
    display: none;
}

/* Poster frame - golden border animation */
.poster-frame {
    position: relative;
    border-radius: 14px;
    padding: 3px;
    background: linear-gradient(90deg, #d4af37, #f5d76e, #d4af37, #b8961f, #d4af37);
    background-size: 400% 100%;
    animation: posterFrameEntry 0.4s ease-out, borderShimmer 3s linear 0.4s infinite;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(212, 175, 55, 0.3),
        0 0 40px rgba(212, 175, 55, 0.15);
}

/* Glowing pulse on the frame */
.poster-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(90deg, transparent, rgba(245, 215, 110, 0.6), transparent);
    background-size: 200% 100%;
    animation: borderGlow 2s ease-in-out infinite;
    z-index: -1;
    filter: blur(6px);
}

.poster-img {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 11px;
    animation: posterBreathing 4s ease-in-out 0.5s infinite;
}

@media (min-width: 768px) {
    .poster-img {
        max-width: 70vw;
        max-height: 85vh;
    }
}

/* Entry animation for the frame */
@keyframes posterFrameEntry {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Golden line shimmer running along the border */
@keyframes borderShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

/* Soft glow pulse behind the frame */
@keyframes borderGlow {
    0%, 100% {
        opacity: 0.4;
        background-position: -100% 50%;
    }
    50% {
        opacity: 1;
        background-position: 200% 50%;
    }
}

/* Gentle zoom in/out breathing on the poster image */
@keyframes posterBreathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.025); }
}

.poster-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.poster-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.poster-splash.closing {
    animation: posterFadeOut 0.3s ease-in forwards;
}

@keyframes posterFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* posterZoomIn replaced by posterFrameEntry + posterBreathing */

@keyframes posterFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* ===== NAV ACTIVE STATE ===== */
header nav a,
#mobile-menu nav a {
    position: relative;
    transition: color 0.3s ease;
}

header nav a.nav-active {
    color: #d4af37 !important;
    font-weight: 600;
}

header nav a.nav-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #d4af37;
    border-radius: 1px;
    animation: navUnderline 0.3s ease-out;
}

@keyframes navUnderline {
    from { width: 0; }
    to { width: 100%; }
}

/* Mobile menu active */
#mobile-menu nav a.nav-active {
    color: #d4af37 !important;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
    padding-left: 12px;
}

#mobile-menu nav a.nav-active::after {
    display: none;
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-btn {
    opacity: 0.6;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

.lang-btn.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== IMAGE ZOOM & LIGHTBOX ===== */
.zoom-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-container img {
    transition: transform 0.3s ease;
}

.zoom-container:hover img {
    transform: scale(1.5);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* ===== MODAL ===== */
#product-modal {
    transition: opacity 0.3s ease;
}

#product-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#product-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.thumb-active {
    border-color: #d4af37 !important;
    opacity: 1 !important;
}

.modal-fullscreen {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
}

.related-products-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 16px 0;
}

.related-products-scroll::-webkit-scrollbar {
    height: 6px;
}

.related-products-scroll::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 3px;
}

/* ===== SEARCH ===== */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.search-result-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f9fafb;
}

/* ===== NAVIGATION ===== */
#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: #111111;
    color: #d4af37;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#back-to-top:hover {
    background: #d4af37;
    color: #111111;
    transform: translateY(-4px);
}

#back-to-top.show {
    display: flex;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #d4af37, #f5d76e);
    z-index: 9999;
    transition: width 0.1s ease;
}

.category-tabs {
    position: sticky;
    top: 60px;
    background: white;
    z-index: 30;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    white-space: nowrap;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 2px;
}

/* ===== MOBILE NAVIGATION ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: #d4af37;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* ===== SCROLL SECTIONS ===== */
section[id],
main[id] {
    scroll-margin-top: 160px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.info { border-left: 4px solid #3b82f6; }

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    animation: progress 3s linear;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ===== WISHLIST ===== */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border: none;
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: #ef4444;
    color: white;
}

.wishlist-btn.active i {
    animation: heartBeat 0.3s;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.badge-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== SHARE MODAL ===== */
.share-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.share-modal.active {
    display: flex;
}

/* ===== SOCIAL PROOF ===== */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .filled {
    color: #fbbf24;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d4af37;
}

/* ===== CATALOG FILTER BUTTONS ===== */
.filter-btn {
    cursor: pointer;
    border: none;
}

.filter-btn:hover {
    transform: translateY(-1px);
}

.catalog-tab {
    cursor: pointer;
    border: none;
}

/* ===== HERO BANNER SHIMMER FRAME ===== */
.hero-banner {
    aspect-ratio: 16 / 5;
    height: auto;
    width: 100%;
    max-height: 560px;
    position: relative;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(212, 175, 55, 0.15);
}

.hero-banner::before,
.hero-banner::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f5d76e, #d4af37, #b8961f, #d4af37);
    background-size: 400% 100%;
    animation: borderShimmer 3s linear infinite;
    z-index: 15;
}
.hero-banner::before {
    top: 0;
}
.hero-banner::after {
    bottom: 0;
}

/* ===== SLIDESHOW HERO BANNER ===== */
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    transform: scale(1);
}
@media (min-width: 1920px) {
    .hero-slide {
        object-fit: cover;
    }
}
.hero-slide.active {
    z-index: 1;
    animation: 
        slideActiveFlash 1.5s ease-out forwards,
        posterBreathing 12s ease-in-out infinite 1.5s;
}

@keyframes slideActiveFlash {
    0% { 
        opacity: 0; 
        filter: brightness(1) blur(4px);
        transform: scale(0.98);
    }
    20% { 
        opacity: 0.4; 
        filter: brightness(2.2);
        transform: scale(1.01);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.2) blur(0);
        transform: scale(1);
    }
    100% { 
        opacity: 0.8; 
        filter: brightness(1);
        transform: scale(1);
    }
}

@media (min-width: 768px) {
    @keyframes slideActiveFlash {
        0% { 
            opacity: 0; 
            filter: brightness(1) blur(4px);
            transform: scale(0.98);
        }
        20% { 
            opacity: 0.3; 
            filter: brightness(2.2);
            transform: scale(1.01);
        }
        50% {
            opacity: 0.6;
            filter: brightness(1.2) blur(0);
            transform: scale(1);
        }
        100% { 
            opacity: 0.6; 
            filter: brightness(1);
            transform: scale(1);
        }
    }
}

/* ===== SLIDESHOW POPUP SPLASH ===== */
.popup-slide {
    display: none;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 11px;
}
@media (min-width: 768px) {
    .popup-slide {
        max-width: 70vw;
        max-height: 85vh;
    }
}
.popup-slide.active {
    display: block;
    animation: posterBreathing 4s ease-in-out 0.5s infinite, popupFadeIn 0.5s ease-in-out;
}
@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== SLIDESHOW INDICATOR DOTS ===== */
.slideshow-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 8px;
    align-items: center;
}

.slideshow-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.slideshow-dot.active {
    width: 24px; /* Capsule shape */
    background: #d4af37; /* brand-gold */
    border-color: #d4af37;
}

.popup-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 8px;
    align-items: center;
}
