/* ============================================
   SHOP PAGE - shop.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Oswald:wght@400;500;600;700&display=swap');

/* Root Variables */
:root {
    --primary: #E53E3E;
    --background: #ffffff;
    --foreground: #0a0a0a;
    --secondary: #f5f5f5;
    --muted: #6b7280;
    --border: #e5e7eb;
    --red: #E53E3E;
    --black: #0a0a0a;
    --dark-bg: #0a0a0a;
}

/* ===== SHOP HERO SECTION ===== */
.shop-hero {
    position: relative;
    background: var(--dark-bg);
    padding-top: 120px;
    padding-bottom: 80px;
    overflow: hidden;
}

.shop-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: radial-gradient(circle at 1px 1px, white 1px, transparent 0);
    background-size: 40px 40px;
}

.shop-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 600px;
    height: 600px;
    background: rgba(229, 62, 62, 0.05);
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #888;
    margin-bottom: 32px;
}

.breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 12px;
}

/* Shop Hero Content */
.shop-hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.shop-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.shop-subtitle {
    margin-top: 16px;
    color: #999;
    font-size: 18px;
    max-width: 600px;
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pill {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== SHOP CONTENT ===== */
.shop-content {
    padding: 48px 0;
    background: var(--background);
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Filter Button */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

/* Products Count */
.products-count {
    font-size: 14px;
    color: var(--muted);
}

.product-num {
    color: var(--foreground);
    font-weight: 600;
}

/* Grid Toggle */
.grid-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    background: transparent;
}

.grid-btn {
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.grid-btn.active {
    background: var(--foreground);
    color: var(--background);
}

/* Sort Dropdown */
.sort-wrapper {
    position: relative;
}

.sort-select {
    appearance: none;
    background: transparent;
    border: 1px solid var(--border);
    padding: 10px 20px;
    padding-right: 36px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    color: var(--foreground);
    transition: all 0.3s ease;
}

.sort-select:hover {
    border-color: var(--foreground);
}

.sort-select:focus {
    outline: none;
    border-color: var(--foreground);
}

.sort-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted);
    font-size: 12px;
}

/* ===== SHOP MAIN ===== */
.shop-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* ===== FILTERS SIDEBAR ===== */
.shop-sidebar {
    position: sticky;
    top: 120px;
}

.filters-container {
    background: var(--secondary);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Clear Filters Button */
.clear-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    text-decoration: underline;
}

/* Filter Group */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--foreground);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-option {
    padding: 10px 16px;
    font-size: 14px;
    background: transparent;
    color: var(--muted);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.filter-option:hover {
    background: var(--background);
    color: var(--foreground);
}

.filter-option.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

/* Price Range */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px;
}

.price-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
}

.price-value {
    background: var(--background);
    color: var(--foreground);
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
}

/* Size Options */
.size-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.size-btn {
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    background: var(--background);
    color: var(--foreground);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-btn:hover {
    border-color: var(--primary);
}

.size-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Color Options */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.color-btn.active {
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* ===== PRODUCTS GRID ===== */


/* Product Card (shared with home_page.css) */
.product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

/* Wishlist Heart */
.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    background: white;
    color: var(--primary);
    transform: scale(1.1);
}

.wishlist-btn.active {
    color: var(--primary);
}

/* Product Info */
.product-info {
    padding: 16px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 8px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--foreground);
}

.original-price {
    font-size: 14px;
    color: var(--muted);
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #d73030;
    transform: translateY(-2px);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: var(--muted);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 24px;
}

.empty-reset-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.empty-reset-btn:hover {
    text-decoration: none;
}

/* ===== LOAD MORE ===== */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 64px;
}

.load-more-btn {
    padding: 16px 48px;
    background: var(--foreground);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

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

    .shop-sidebar {
        position: static;
    }

    .filters-container {
        position: static;
    }

    .shop-sidebar.hidden {
        display: none;
    }
}

@media (max-width: 768px) {
    .shop-hero {
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .shop-hero-content {
        gap: 24px;
    }

    .shop-title {
        font-size: 2rem;
    }

    .category-pills {
        flex-wrap: wrap;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }

    .toolbar-right {
        justify-content: space-between;
    }

}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .shop-title {
        font-size: 1.5rem;
    }

    .category-pills {
        gap: 8px;
    }

    .category-pill {
        padding: 8px 16px;
        font-size: 12px;
    }

    .product-card {
        border-radius: 8px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 13px;
        min-height: 32px;
    }

    .current-price {
        font-size: 14px;
    }

    .add-to-cart-btn {
        font-size: 12px;
        padding: 8px;
    }
}

/* ============================================
   SHOP PRODUCT CARDS — match home.php style
   Overrides the square .product-image wrapper
   with the portrait 3/4 ratio from home.css
   ============================================ */

/* Reset the shop card to match home card */
#productsGrid .product-card {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    cursor: pointer;
}

#productsGrid .product-card:hover {
    border: none;
    box-shadow: none;
    transform: none;
}

/* Replace square image box with portrait wrapper */
#productsGrid .product-image {
    position: static;
    width: auto;
    padding-top: 0;
    overflow: visible;
    background: transparent;
}

#productsGrid .product-image-wrapper {
    position: relative;
    aspect-ratio: 0.75;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f3f4f6;
    margin-bottom: 1rem;
}

#productsGrid .product-image-wrapper img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    display: block;
}

#productsGrid .product-image-wrapper:hover img {
    transform: scale(1.1);
}

/* Slide-up overlay — same as home.php */
#productsGrid .product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    display: flex;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

#productsGrid .product-image-wrapper:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* btn-add already defined in home.css — just ensure it fills the overlay */
#productsGrid .btn-add {
    flex: 1;
    height: 44px;
}

/* Product info — match home.php */
#productsGrid .product-info {
    padding: 0;
}

#productsGrid .product-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    min-height: auto;
    display: block;
    color: var(--foreground);
    margin-bottom: 0;
}

#productsGrid .product-price {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0;
}

#productsGrid .current-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
}

#productsGrid .original-price {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Hide the add-to-cart button below the card 
   (home style uses overlay only) */
#productsGrid .add-to-cart-btn {
    display: none;
}

/* ============================================
   SHOP PAGE — MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 767px) {

    /* Hero */
    .shop-hero {
        padding-top: 88px;
        padding-bottom: 40px;
    }

    .shop-title {
        font-size: 1.75rem;
    }

    .shop-subtitle {
        font-size: 0.9rem;
        margin-top: 8px;
    }

    .category-pills {
        gap: 6px;
    }

    .category-pill {
        padding: 7px 14px;
        font-size: 12px;
    }

    /* Toolbar */
    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    /* Sidebar — hide by default on mobile, shown when filter btn clicked */
    .shop-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .shop-sidebar {
        display: none; /* hidden until filter button toggles it */
        position: static;
    }

    .shop-sidebar.active {
        display: block;
    }

    .filters-container {
        gap: 20px;
        padding: 16px;
    }

    /* Cards */

    #productsGrid .product-name {
        font-size: 0.8rem;
    }

    #productsGrid .current-price {
        font-size: 0.9rem;
    }

    /* Load more */
    .load-more-btn {
        padding: 12px 32px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
  
}

/* =========================================
   HOME FEATURED PRODUCTS EXACT GRID
========================================= */



/* Tablet */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

/* =========================================
   SHOP PRODUCTS GRID — EXACT HOME SIZE
========================================= */

#productsGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
    width: 100%;
}

/* Large desktop */
@media (min-width: 1400px) {
    #productsGrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    #productsGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    #productsGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}