/**
 * PREMIUM STYLES - Light/Dark Theme Support
 * Comprehensive styling for all premium features
 */

:root {
    /* Primary Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #fafaf8;
    --bg-tertiary: #f5f3f0;
    --text-primary: #1a1410;
    --text-secondary: #3d3028;
    --text-muted: #9a8f85;

    /* Borders & Shadows */
    --border-color: rgba(26, 20, 16, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Accent Colors */
    --gold-primary: #b8860b;
    --gold-light: #daa520;
    --gold-pale: #f5e8cc;
    --accent-rose: #c4766a;
    --input-bg: #fafaf8;
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2a2a2a;
    --text-primary: #f0ede8;
    --text-secondary: #d4c0aa;
    --text-muted: #9a8f85;
    --border-color: rgba(240, 237, 232, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --gold-primary: #daa520;
    --gold-light: #f0ad4e;
    --gold-pale: #c4943a;
    --accent-rose: #d4766a;
    --input-bg: #2a2a2a;
}

* {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ============ THEME TOGGLE ============ */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all .3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
    background: var(--gold-pale);
    color: var(--gold-primary);
    transform: rotate(20deg);
}

/* ============ PREMIUM BANNER ============ */
.premium-banner-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 48px;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide-image {
    position: absolute;
    inset: 0;
    object-fit: cover;
    object-position: center;
}

.banner-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    padding: 40px;
}

.banner-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif;
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 28px;
    opacity: 0.95;
}

.banner-cta {
    display: inline-flex;
    gap: 12px;
}

.banner-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all .3s ease;
    cursor: pointer;
}

.banner-btn-primary {
    background: var(--gold-primary);
    color: white;
}

.banner-btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.banner-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.banner-btn-secondary:hover {
    background: white;
    color: var(--gold-primary);
}

.banner-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all .3s ease;
}

.banner-dot.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

/* ============ WISHLIST BUTTON ============ */
.wishlist-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all .3s ease;
}

.wishlist-btn:hover {
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}

.wishlist-btn.wishlisted {
    background: var(--gold-pale);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.wishlist-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-rose);
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ============ ADVANCED FILTERS ============ */
.filters-sidebar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.filter-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--gold-primary);
}

.filter-option label {
    flex: 1;
    cursor: pointer;
    font-size: 0.95rem;
}

.price-slider {
    margin: 12px 0;
}

.price-slider input {
    width: 100%;
    accent-color: var(--gold-primary);
}

.price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.filter-results {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    text-align: center;
}

/* ============ PRODUCT CARDS - ENHANCED ============ */
.product-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all .3s ease;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--bg-tertiary);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gold-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
}

.product-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.product-info {
    padding: 16px;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.product-rating .stars {
    color: var(--gold-primary);
}

.product-rating .count {
    color: var(--text-muted);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.price-original {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount-badge {
    font-size: 0.75rem;
    background: var(--accent-rose);
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    padding: 10px;
    background: var(--gold-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.btn-add-cart:hover {
    background: var(--gold-light);
}

/* ============ PRODUCT DETAIL - ZOOM ============ */
.product-zoom-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: zoom-in;
}

.product-zoom-image {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform .1s ease;
    transform-origin: center;
}

.product-zoom-container:hover .product-zoom-image {
    cursor: zoom-in;
}

.zoom-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-primary);
    display: none;
}

.product-zoom-container:hover .zoom-indicator {
    display: block;
}

/* ============ REVIEWS SECTION ============ */
.reviews-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 24px;
}

.rating-large {
    text-align: center;
}

.rating-large-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.rating-large-stars {
    color: var(--gold-primary);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.rating-large-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.rating-bar-fill {
    width: 120px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.rating-bar-fill-inner {
    height: 100%;
    background: var(--gold-primary);
}

.review-form {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.star-rating {
    display: flex;
    gap: 8px;
    font-size: 1.5rem;
}

.star {
    cursor: pointer;
    color: var(--border-color);
    transition: color .2s ease;
}

.star.active,
.star:hover {
    color: var(--gold-primary);
}

.btn-submit-review {
    background: var(--gold-primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
}

.btn-submit-review:hover {
    background: var(--gold-light);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.review-author {
    font-weight: 600;
    color: var(--text-primary);
}

.review-rating {
    color: var(--gold-primary);
    font-size: 0.9rem;
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.review-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.review-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============ SEARCH AUTOCOMPLETE ============ */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-md);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: background .2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--bg-tertiary);
}

.autocomplete-info {
    flex: 1;
}

.autocomplete-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.autocomplete-price {
    font-size: 0.85rem;
    color: var(--gold-primary);
    font-weight: 600;
}

/* ============ RECOMMENDATIONS ============ */
.recommendations-section {
    margin-top: 48px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.recommendations-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    font-family: 'Playfair Display', serif;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.recommendation-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.rec-image {
    aspect-ratio: 3/4;
    overflow: hidden;
}

.rec-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rec-info {
    padding: 12px;
}

.rec-info h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.rec-price {
    color: var(--gold-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* ============ LIVE CHAT ============ */
.live-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    height: 500px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.live-chat-widget.minimized {
    height: 60px;
}

.live-chat-widget.minimized .chat-messages,
.live-chat-widget.minimized .chat-input-area {
    display: none;
}

.chat-header {
    background: var(--gold-primary);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.chat-header h4 {
    margin: 0;
    font-size: 1rem;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.user-message {
    align-self: flex-end;
    background: var(--gold-primary);
    color: white;
}

.bot-message {
    align-self: flex-start;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

.chat-send {
    background: var(--gold-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s ease;
}

.chat-send:hover {
    background: var(--gold-light);
}

/* ============ MEMBER DISCOUNT BADGE ============ */
[data-member-only] {
    display: none;
}

.member-discount-badge {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.active-member-discount {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ============ NOTIFICATIONS ============ */
.notification {
    animation: slideIn .3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .premium-banner-container {
        height: 400px;
    }

    .banner-content h1 {
        font-size: 2.5rem;
    }

    .recommendations-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .live-chat-widget {
        width: 300px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .premium-banner-container {
        height: 300px;
    }

    .banner-content h1 {
        font-size: 1.8rem;
    }

    .banner-content p {
        font-size: 1rem;
    }

    .banner-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }

    .filters-sidebar {
        position: fixed;
        left: 0;
        top: 72px;
        width: 100%;
        max-height: none;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform .3s ease;
    }

    .filters-sidebar.open {
        transform: translateX(0);
    }

    .recommendations-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .live-chat-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-width: 100vw;
    }
}