/* ========================================
   MODERN LUXURY SHOP - VIDEO STYLE
   ======================================== */

:root {
    --theme-black: #1a1a1a;
    --theme-gold: #c5a47e;
    --theme-gray: #f5f5f5;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.shop-page {
    padding: 120px 0 80px;
    background: #fff;
    font-family: 'Jost', sans-serif;
}

/* --- 1. HEADER --- */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.shop-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--theme-black);
    margin: 0;
    line-height: 1;
}

.results-count {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-top: 10px;
}

/* Controls */
.shop-header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.sort-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    color: var(--theme-black);
    cursor: pointer;
    background: transparent;
    transition: 0.3s;
}

.sort-select:hover,
.sort-select:focus {
    border-color: var(--theme-black);
}

.filter-toggle-btn {
    display: none;
    background: var(--theme-black);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 2. LAYOUT & SIDEBAR --- */
.shop-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
}

.filters-sidebar {
    background: #fff;
    padding-right: 20px;
}

.filter-group {
    margin-bottom: 40px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--theme-black);
    margin-bottom: 20px;
    display: block;
    position: relative;
}

/* Custom Checkboxes */
.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    transition: 0.2s;
    color: #666;
}

.filter-option:hover {
    color: var(--theme-black);
}

.filter-option input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Soft square */
    position: relative;
    cursor: pointer;
}

.filter-option input:checked {
    background-color: var(--theme-black);
    border-color: var(--theme-black);
}

.filter-option input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 10px;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.price-input {
    width: 100%;
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    border-radius: 4px;
}

.price-input:focus {
    border-color: var(--theme-gold);
    outline: none;
}

.apply-filters-btn {
    width: 100%;
    background: var(--theme-black);
    color: #fff;
    border: none;
    padding: 14px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.apply-filters-btn:hover {
    background: var(--theme-gold);
}


/* --- 3. TRENDY PRODUCT CARD (Video Style) --- */
.products-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    display: block;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

/* Image Wrapper */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f4f4;
    aspect-ratio: 1 / 1.15;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.08);
    /* Slow zoom */
}

/* Badges (Top Left) */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff;
    color: var(--theme-black);
    padding: 5px 12px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.badge-new {
    background: var(--theme-black);
    color: #fff;
}

.badge-sale {
    background: #d32f2f;
    color: #fff;
}

/* Floating Actions (Right Side) */
.card-actions-float {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.product-card:hover .card-actions-float {
    transform: translateX(0);
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--theme-black);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.action-btn:hover {
    background: var(--theme-black);
    color: #fff;
}

/* Add to Cart (Slide Up from Bottom) */
.add-to-cart-slide {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--theme-black);
    color: #fff;
    padding: 15px;
    text-align: center;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.add-to-cart-slide:hover {
    background: var(--theme-gold);
}

.product-card:hover .add-to-cart-slide {
    transform: translateY(0);
}

/* Product Info */
.product-info {
    padding-top: 15px;
    text-align: left;
    /* Clean look */
}

.product-cat {
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: block;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: var(--theme-black);
    margin: 0 0 5px;
    font-weight: 600;
}

.product-price {
    font-weight: 600;
    color: var(--theme-black);
    font-size: 15px;
}

.old-price {
    color: #ccc;
    text-decoration: line-through;
    margin-right: 8px;
    font-weight: 400;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .shop-content {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 300px;
        background: #fff;
        z-index: 1000;
        padding: 30px;
        transform: translateX(-100%);
        transition: 0.3s;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .filters-sidebar.open {
        transform: translateX(0);
    }

    .filter-toggle-btn {
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .card-actions-float {
        opacity: 1;
        transform: translateX(0);
        display: none;
    }

    /* Hide hover icons on mobile */
    .add-to-cart-slide {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 10px;
        display: block;
        padding: 10px;
    }

    .shop-header {
        display: block;
    }

    .shop-header-left {
        margin-bottom: 20px;
    }
}

/* === ADDITIONAL STYLES === */

/* Search wrap */
.search-wrap {
    position: relative;
}

.search-wrap i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
}

.filter-input {
    width: 100%;
    border: 1px solid #eee;
    padding: 10px 40px 10px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Jost', sans-serif;
}

.filter-input:focus {
    border-color: var(--theme-gold);
    outline: none;
}

/* Filter options scrollable */
.filter-options {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
    /* Prevent content from hitting scrollbar */
}

/* Custom Scrollbar for Filters */
.filter-options::-webkit-scrollbar {
    width: 6px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: var(--theme-gold);
}

/* Clear filters button */
.clear-filters-btn {
    width: 100%;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    padding: 12px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.clear-filters-btn:hover {
    border-color: var(--theme-black);
    color: var(--theme-black);
}

/* Mobile filter header */
.filters-header-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.filters-header-mobile h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0;
}

.filters-header-mobile button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
}

@media (max-width: 992px) {
    .filters-header-mobile {
        display: flex;
    }
}

/* Filters overlay */
.filters-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.filters-overlay.active {
    display: block;
}

/* Loading overlay */
.products-main {
    position: relative;
    min-height: 400px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: var(--theme-black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No products found */
.no-products-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-products-found i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

.no-products-found h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0 0 10px;
}

.no-products-found p {
    color: #888;
    margin-bottom: 20px;
}

.clear-all-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--theme-black);
    color: #fff;
    border: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
}

/* No product image placeholder */
.no-product-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    color: #ddd;
}

.no-product-image i {
    font-size: 2rem;
}

/* Product link */
.product-link {
    text-decoration: none;
    color: inherit;
}

.product-link:hover .product-title {
    color: var(--theme-gold);
}

/* Current price styling */
.current-price {
    font-weight: 600;
    color: var(--theme-black);
}

/* Shop Now Button Style */
.shop-now-btn {
    border-color: #000 !important;
    border-radius: 0;
    padding: 12px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.shop-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.shop-now-btn::after {
    content: '→';
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    font-weight: 700;
    z-index: 0;
}

.shop-now-btn:hover::before {
    left: 0;
}

.shop-now-btn:hover::after {
    transform: translateX(6px);
}

.shop-now-btn:hover {
    color: #fff !important;
}

/* --- REVIEWS LAYOUT (AMAZON STYLE) --- */
.reviews-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.reviews-container-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: start;
}

.review-summary-card {
    position: sticky;
    top: 100px;
}

.stars-display.large {
    font-size: 1.2rem;
    color: #ffb400;
}

.average-rating-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.total-ratings-text {
    font-size: 0.9rem;
    color: #666;
}

/* Distribution Stack (Amazon Style) */
.rating-distribution-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dist-row-stack {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: #007185;
    /* Amazon Link Blue-ish */
    cursor: pointer;
}

.dist-row-stack:hover .dist-label,
.dist-row-stack:hover .dist-percent {
    text-decoration: underline;
    color: #c7511f;
    /* Amazon Orange Hover */
}

.dist-label {
    width: 40px;
}

.dist-bar-container {
    flex: 1;
    height: 18px;
    background: #f0f2f2;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #e0e0e0;
}

.dist-bar-fill {
    height: 100%;
    background: #ffb400;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.dist-percent {
    width: 35px;
    text-align: right;
}

/* Review CTA */
.review-cta h4 {
    font-weight: 700;
}

.write-review-btn {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    padding: 8px 15px;
    text-transform: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: 0.2s;
}

.write-review-btn:hover {
    background: #fdfdfd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
    .reviews-container-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .review-summary-card {
        position: static;
        border-bottom: 1px solid #eee;
        padding-bottom: 30px;
    }
}