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

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

/* ===== 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-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: posterZoomIn 0.4s ease-out;
}

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

.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; }
}

@keyframes posterZoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

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

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

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

header nav a.text-brand-500 {
    font-weight: 600;
}

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

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

/* Mobile menu active */
#mobile-menu nav a.text-brand-500 {
    background: #f0f9ff;
    border-radius: 6px;
    padding-left: 12px;
}

#mobile-menu nav a.text-brand-500::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: #0ea5e9 !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: #0ea5e9;
    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: #0c4a6e;
    color: white;
    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.15);
}

#back-to-top:hover {
    background: #0ea5e9;
    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, #0ea5e9, #d4af37);
    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: #0ea5e9;
    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: #0ea5e9;
}

.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: #0ea5e9;
}

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

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

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