/* --- General Layout --- */
body {
    font-family: 'Lato', Arial, sans-serif;
    background: #f9fafb;
    color: #222;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
@media (max-width: 900px) {
    .container { padding: 0 1rem; }
}
@media (max-width: 600px) {
    .container { padding: 0 0.5rem; }
}

/* --- Hero Section --- */
.shop-hero {
    height: 50vh;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.5)), url('../image/shop-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    margin-top: 80px;
    position: relative;
}
.shop-hero .hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}
.shop-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}
.shop-hero p {
    font-size: 1.2rem;
    color: #ffe600;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffe600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}
.stat-label {
    font-size: 0.9rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Mobile Nav Gap Fix --- */
@media (max-width: 768px) {
    .shop-hero { 
        height: 40vh; 
        margin-top: 60px;
    }
    .hero-stats { 
        flex-direction: column; 
        gap: 1rem; 
    }
    .shop-controls {
        top: 60px;
        margin-top: 0;
        padding: 1rem 0;
    }
    .navbar {
        margin-bottom: 0;
        height: 60px;
    }
    .nav-container {
        margin-bottom: 0;
    }
}

/* --- Controls --- */
.shop-controls {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.2rem 0;
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}
.breadcrumb a { color: #000; text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { color: #ffe600; }
.breadcrumb .current { color: #6b7280; }
.cart-summary { display: flex; align-items: center; gap: 1rem; }
.cart-btn {
    position: relative;
    background: #000;
    color: #fff;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}
.cart-btn:hover { background: #ffe600; color: #000; }
.cart-count {
    background: #ffe600;
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.toolbar-left { flex: 1; max-width: 400px; }
.search-container {
    position: relative;
    display: flex;
    width: 100%;
}
.search-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}
.search-input:focus { border-color: #000; }
.search-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s;
}
.search-btn:hover { background: #ffe600; color: #000; }
.toolbar-right { display: flex; align-items: center; gap: 1rem; }
.filter-group { display: flex; align-items: center; gap: 1rem; }
.filter-toggle {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}
.filter-toggle:hover,
.filter-toggle.active { background: #000; color: #fff; border-color: #000; }
.sort-dropdown select {
    padding: 0.7rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}
.view-toggle {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}
.view-btn {
    background: #fff;
    border: none;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border-right: 1px solid #d1d5db;
}
.view-btn:last-child { border-right: none; }
.view-btn.active,
.view-btn:hover { background: #000; color: #fff; }

/* --- Hide list view button --- */
.view-toggle .view-btn[data-view="list"] {
    display: none !important;
}

@media (max-width: 700px) {
    .shop-toolbar { flex-direction: column; gap: 1rem; align-items: stretch; }
    .toolbar-left { max-width: none; }
}

/* --- Shop Layout --- */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* --- Category Filter Section (Above Brands) --- */
.category-filter-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.category-filter-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #ffe600;
}

.category-filter-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.category-filter-header i {
    color: #ffe600;
}

.category-filter-dropdown {
    width: 100%;
}

.category-filter-dropdown select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.category-filter-dropdown select:focus {
    border-color: #ffe600;
    box-shadow: 0 0 0 3px rgba(255, 230, 0, 0.1);
}

.category-filter-dropdown select:hover {
    border-color: #000;
}

/* --- Collections Sidebar with Scrollable Brand List --- */
.collections-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 180px;
    overflow: hidden;
}

.collections-header {
    margin: 0;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 2px solid #ffe600;
    background: #fff;
}

.collections-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.collections-header i {
    color: #ffe600;
}

/* NEW: Scrollable Container for Brand List (Desktop Only) */
.collections-scroll-container {
    padding: 1.5rem;
}

.collections-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Desktop: Apply independent scrolling */
@media (min-width: 1025px) {
    .collections-scroll-container {
        overflow-y: auto;
        max-height: calc(100vh - 300px);
        scrollbar-width: thin;
        scrollbar-color: #ffe600 #f1f1f1;
    }
    
    .collections-scroll-container::-webkit-scrollbar {
        width: 6px;
    }
    
    .collections-scroll-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .collections-scroll-container::-webkit-scrollbar-thumb {
        background: #ffe600;
        border-radius: 3px;
    }
    
    .collections-scroll-container::-webkit-scrollbar-thumb:hover {
        background: #000;
    }
}

.collection-item {
    position: relative;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-image: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.collection-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    transition: all 0.3s ease;
    z-index: 1;
}

.collection-item:hover::before {
    background: linear-gradient(135deg, rgba(255,230,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}

.collection-item:hover {
    transform: translateX(8px) scale(1.02);
    border-color: #ffe600;
    box-shadow: 0 8px 25px rgba(255,230,0,0.3);
}

.collection-item.active {
    border-color: #ffe600;
    box-shadow: 0 0 0 3px rgba(255,230,0,0.3);
    transform: translateX(5px);
}

.collection-item.active::before {
    background: linear-gradient(135deg, rgba(255,230,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
}

.collection-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    position: relative;
    z-index: 2;
}

.collection-count {
    font-size: 0.8rem;
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.collection-item:hover .collection-count {
    background: rgba(255,230,0,0.9);
    color: #000;
    text-shadow: none;
}

.collection-item.active .collection-count {
    background: rgba(255,230,0,0.9);
    color: #000;
    text-shadow: none;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
    .category-filter-section {
        margin-bottom: 1rem;
    }
    
    .collections-sidebar {
        position: static;
        top: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    .category-filter-section {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }
    
    .collections-scroll-container {
        padding: 1rem;
        overflow-y: visible;
        max-height: none;
    }
    
    .collections-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .collection-item {
        min-height: 100px;
    }
}

@media (max-width: 600px) {
    .collections-sidebar {
        grid-template-columns: 1fr;
    }
    
    .category-filter-section {
        padding: 1.2rem;
    }
    
    .category-filter-dropdown select {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .collection-item {
        min-height: 90px;
        padding: 1.2rem 1rem;
    }
}

/* --- Main Content --- */
.main-content {
    min-height: 500px;
}

/* --- Products Section --- */
.products-section { 
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ffe600;
}
.section-header h2 { 
    font-size: 2rem; 
    font-weight: 700; 
    color: #000; 
}
.results-info { 
    color: #6b7280; 
    font-size: 0.9rem; 
    font-weight: 500;
}

/* --- Products Grid --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.no-products-message {
    grid-column: 1/-1;
    text-align: center;
    color: #888;
    font-size: 1.2rem;
    padding: 3rem 0;
    background: #f8f9fa;
    border-radius: 12px;
}

@media (max-width: 700px) {
    .products-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem; 
    }
    .products-section {
        padding: 1rem;
    }
}

/* --- Product Card --- */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #ffe600;
}

.product-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.product-brand {
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}

.original-price {
    font-size: 1rem;
    color: #b91c1c;
    text-decoration: line-through;
}

.add-to-cart-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

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

.add-to-cart-btn:active {
    transform: translateY(0);
}

@media (max-width: 700px) {
    .product-image { height: 180px; }
    .product-info { padding: 1.2rem; }
}

/* --- NEW: Pagination System --- */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.pagination-btn:disabled {
    background: #f9fafb;
    color: #d1d5db;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0.5rem;
}

/* Mobile Pagination */
.pagination-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin-top: 1rem;
}

.pagination-mobile-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-mobile-btn:hover:not(:disabled) {
    background: #ffe600;
    color: #000;
    transform: translateY(-2px);
}

.pagination-mobile-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.pagination-mobile-info {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .pagination-controls {
        display: none;
    }
    
    .pagination-mobile {
        display: flex;
    }
    
    .pagination-container {
        gap: 1rem;
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .pagination-mobile-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .pagination-mobile-info {
        font-size: 0.8rem;
    }
}

/* --- Remove/Hide Load More Button --- */
.load-more-container {
    display: none !important;
}

.load-more-btn {
    display: none !important;
}

/* --- Filters Sidebar --- */
.filters-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2500 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.filters-overlay.active { opacity: 1; visibility: visible; }
.filters-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 320px; height: 100%;
    background: #fff;
    z-index: 2501 !important;
    transform: translateX(-100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}
.filters-sidebar.active { transform: translateX(0); }
.filters-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.filters-header h3 { font-size: 1.25rem; font-weight: 700; color: #000; }
.filters-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}
.filters-close:hover { background: #f3f4f6; color: #000; }
.filters-content { flex: 1; padding: 1.5rem; overflow-y: auto; }
.filter-section { margin-bottom: 2rem; }
.filter-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.filter-options { display: flex; flex-direction: column; gap: 0.75rem; }
.filter-option { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.9rem; color: #374151; transition: color 0.3s; }
.filter-option:hover { color: #000; }
.filter-option input[type="checkbox"] { width: 18px; height: 18px; accent-color: #000; }
.price-range { display: flex; flex-direction: column; gap: 1rem; }
.price-inputs { display: flex; align-items: center; gap: 0.5rem; }
.price-inputs input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
}
.price-slider input[type="range"] { width: 100%; accent-color: #000; }
.filters-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
}
.clear-filters,
.apply-filters {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.clear-filters {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}
.clear-filters:hover { background: #e5e7eb; }
.apply-filters {
    background: #000;
    border: 1px solid #000;
    color: #fff;
}
.apply-filters:hover { background: #ffe600; color: #000; border-color: #ffe600; }
@media (max-width: 700px) {
    .filters-sidebar { width: 100%; }
}

/* --- Loading Skeleton --- */
.loading-skeleton { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
}
.skeleton-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-height: 320px;
    position: relative;
}
.skeleton-card::before {
    content: '';
    display: block;
    width: 100%;
    height: 220px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Cart Styles --- */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 3000 !important;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}
.cart-sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.15);
    z-index: 3001 !important;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
}
.cart-sidebar.active {
    transform: translateX(0);
}
.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}
.cart-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}
.cart-close:hover {
    background: #f3f4f6;
    color: #000;
}
.cart-content {
    flex: 1;
    overflow-y: auto;
}
.cart-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6b7280;
}
.cart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}
.cart-empty h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #374151;
}
.cart-items {
    padding: 1rem;
}
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.cart-item-image {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
}
.cart-item-details {
    flex: 1;
}
.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.25rem;
}
.cart-item-price {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
}
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}
.quantity-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}
.quantity-btn:hover {
    background: #f3f4f6;
}
.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 0.9rem;
}
.remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s;
}
.remove-item:hover {
    background: #fee2e2;
}
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}
.cart-total {
    margin-bottom: 1rem;
}
.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
}
.checkout-btn {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}
.checkout-btn:hover {
    background: #ffe600;
    color: #000;
    transform: translateY(-2px);
}
@media (max-width: 700px) {
    .cart-sidebar { width: 100vw; }
}

/* --- Product Modal --- */
.product-modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    z-index: 4000 !important;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8);
}
.product-modal {
    margin: auto;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    z-index: 4001 !important;
}
.product-modal-content { 
    padding: 2rem; 
    max-height: 80vh; 
    overflow-y: auto; 
}
.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
.product-modal-images { 
    position: sticky; 
    top: 0; 
}
.main-image { 
    margin-bottom: 1rem; 
}
.main-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
}
.image-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}
.thumbnail {
    width: 60px; 
    height: 60px; 
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, border-color 0.3s;
    border: 2px solid transparent;
}
.thumbnail.active,
.thumbnail:hover { 
    opacity: 1; 
    border-color: #000; 
}
.product-modal-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.product-modal-brand {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.product-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
    margin: 0;
}
.product-modal-price {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.product-modal-price .current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
}
.product-modal-price .original-price {
    font-size: 1.5rem;
    color: #b91c1c;
    text-decoration: line-through;
}
.product-modal-description {
    color: #444;
    line-height: 1.6;
    font-size: 1.05rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    max-height: 180px;
    overflow-y: auto;
}
.product-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.add-to-cart-btn.large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    font-size: 1.2rem;
}
.modal-close:hover { 
    background: #000; 
    color: #fff; 
}

/* --- Contact CTA in Modal --- */
.product-contact-cta {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.product-contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,230,0,0.05), transparent);
    transition: left 0.5s ease;
}

.product-contact-cta:hover::before {
    left: 100%;
}

.product-contact-cta h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.product-contact-cta h4 i {
    font-size: 0.9rem;
    color: #666;
}

.product-contact-cta p {
    color: #666;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
    line-height: 1.4;
}

.contact-cta-btn {
    background: #fff;
    color: #333;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.contact-cta-btn:hover {
    background: #333;
    color: #fff;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-cta-btn i {
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .product-modal-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem; 
    }
    .main-image img { 
        height: 220px; 
    }
    .product-modal-content { 
        padding: 1rem; 
    }
    .product-contact-cta {
        padding: 0.8rem;
        margin-top: 0.8rem;
    }
    .contact-cta-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }
}

@media (max-width: 600px) {
    .product-modal-title { 
        font-size: 1.3rem; 
    }
    .product-modal-price .current-price { 
        font-size: 1.5rem; 
    }
    .product-modal-description { 
        font-size: 0.98rem; 
        padding: 0.7rem; 
    }
    .product-contact-cta {
        padding: 0.7rem;
        text-align: center;
    }
    .contact-cta-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
        width: 100%;
        justify-content: center;
    }
}

/* --- Z-index Fixes --- */
.navbar {
    z-index: 1500 !important;
}

/* --- Performance Optimizations --- */
* {
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .shop-hero {
        margin-top: 55px;
    }
    
    .shop-controls {
        top: 55px;
        padding: 0.8rem 0;
    }
    
    .navbar {
        height: 55px;
    }
    
    .nav-container {
        height: 55px;
    }
}
