/* CSS Variables */
:root {
    --primary-color: #FF4500;
    --accent-color: #D4AF37;
    --background-color: #FFFDF5;
    --text-color: #333333;
    --light-text: #666666;
    --border-color: #E0E0E0;
    --white: #FFFFFF;
    --success: #2E7D32;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.breadcrumb {
    margin: 20px auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Shop Page Styles */
/* Shop Layout */
.page-header {
    margin-top: 40px;
    /* Adjusted from 120px to account for body padding-top */
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding-bottom: 4rem;
}

/* Sidebar Filters */
.sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.filter-group {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.filter-group ul {
    list-style: none;
    padding: 0;
}

.filter-group li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #666;
}

.filter-group input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.category-filter-list li {
    padding: 8px 0;
    transition: color 0.2s;
}

.category-filter-list li:hover {
    color: var(--primary-color);
}

/* Custom Price Slider Styles */
.custom-price-slider {
    padding: 10px 0;
}

.price-output {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
    margin-top: 8px;
}

/* Product Grid Area */
/* Grid Product Header */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

/* View Switcher */
.view-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-switcher span {
    font-size: 0.9rem;
    color: #666;
}

.btn-view {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-view:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-view.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Grid View Modifiers */
.products-grid {
    display: grid;
    /* Default to 3 columns */
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.products-grid.grid-view-2 {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid.grid-view-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* Hide sidebar on mobile for now */
    }

    .grid-header {
        flex-direction: row;
        /* Keep row on mobile if space allows, or column if tight */
        justify-content: space-between;
    }

    .products-grid,
    .products-grid.grid-view-2,
    .products-grid.grid-view-3 {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        /* Auto on mobile, usually 2 col */
    }

    .view-switcher {
        display: flex;
        /* Keep visible on mobile now that it's smaller */
    }
}

/* Product Card Styling */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-details {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.card-rating {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.card-rating span {
    color: #999;
    margin-left: 5px;
    font-size: 0.8rem;
}

.card-price {
    margin-top: auto;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.card-price .original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 8px;
    font-weight: 400;
}

/* Action Buttons */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-card {
    flex: 1;
    /* Side by side equal width */
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-add-cart {
    background-color: #f0f0f0;
    color: var(--text-color);
    border: 1px solid #ddd;
}

.btn-add-cart:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.btn-buy-now {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-buy-now:hover {
    background-color: #a0400b;
    /* Darker shade of primary */
    transform: translateY(-2px);
}

/* View Switcher */
.view-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-switcher span {
    font-size: 0.9rem;
    color: #666;
}

.btn-view {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-view:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-view.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Grid View Modifiers */
.products-grid.grid-view-2 {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid.grid-view-3 {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid.grid-view-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid.grid-view-4 {
        grid-template-columns: repeat(3, 1fr);
        /* Fallback to 3 on tablets */
    }
}

@media (max-width: 768px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* Hide sidebar on mobile for now */
    }

    .grid-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .products-grid,
    .products-grid.grid-view-2,
    .products-grid.grid-view-3,
    .products-grid.grid-view-4 {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        /* Auto on mobile, usually 2 col */
    }

    .view-switcher {
        display: none;
        /* Hide view switcher on small mobile screens as space is tight */
    }
}