/* =========================================
   PRODUCTS PAGE - COMPLETE REDESIGN
   Modern, Clean, Professional
   ========================================= */

/* =========================================
   GLOBAL VARIABLES
   ========================================= */
:root {
    --primary-color: #1A1A1A;
    --accent-color: #d4a574;
    --success-color: #27AE60;
    --danger-color: #E74C3C;
    --warning-color: #F39C12;
    --text-dark: #34495E;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E8E8E8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05); /* Lighter for clean look */
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   PAGE LAYOUT
   ========================================= */
.products_page_container {
    background: var(--bg-light) !important;
    min-height: 100vh !important;
    padding: 5px 0 15px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Base Layout */
.products_layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    align-items: start;
}


/* Ensure no global container limits this */
.products_layout_wrapper {
    width: 100% !important;
}

/* =========================================
   TOP BAR - Sort, View, etc.
   ========================================= */

/* Hide View Toggle completely - not needed */
.view_toggle {
    display: none !important;
}

.products_topbar {
    background: var(--bg-white) !important;
    border-radius: var(--radius-lg) !important;
    padding: 12px 20px !important;
    height: fit-content !important;
    position: sticky !important;
    top: 135px !important; /* Adjusted for Header (65px) + Slim Hero (70px) */
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-color) !important;
    width: 100% !important;
    min-width: 280px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
}

.topbar_left {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1;
    align-items: center;
}

.topbar_right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* =========================================
   SIDEBAR FILTERS
   ========================================= */
.products_sidebar {
    background: var(--bg-white) !important;
    border-radius: var(--radius-lg) !important;
    padding: 24px !important;
    height: fit-content !important;
    position: sticky;
    top: 135px; /* Matches Topbar offset */
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-color) !important;
    width: 100%;
    min-width: 280px;
    box-sizing: border-box !important;
    display: block;
    z-index: 90;
}

.sidebar_header {
    background: #1a3c34 !important; /* Dark Green like reference Filters button */
    color: white !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    margin-bottom: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.sidebar_header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    color: white !important;
}

.btn_clear_filters {
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: white !important;
    cursor: pointer !important;
}

.btn_clear_filters:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.05);
}

/* Sidebar Sort Dropdown */
.sidebar_sort_select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sidebar_sort_select:hover,
.sidebar_sort_select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Hide topbar sort dropdown - now in sidebar */
.sort_dropdown {
    display: flex !important;
    justify-content: flex-end;
}

/* Sorting Dropdown Refinement */
.sort_dropdown select {
    padding: 10px 16px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 30px !important; /* Rounded like reference */
    font-size: 14px !important;
    background: #fff !important;
    cursor: pointer !important;
    min-width: 180px !important;
    color: var(--text-dark) !important;
}

/* Search Bar Refinement (Topbar) */
.search_wrapper {
    display: flex !important;
    align-items: center !important;
    background: #f1f3f5 !important;
    border-radius: 30px !important;
    padding: 2px 2px 2px 15px !important;
    border: 1px solid transparent !important;
    max-width: 350px !important;
    margin-right: 20px !important;
}

.search_wrapper input {
    border: none !important;
    background: transparent !important;
    padding: 8px 0 !important;
    width: 100% !important;
    outline: none !important;
    font-size: 14px !important;
}

.search_wrapper button {
    background: #1a1a1a !important;
    color: white !important;
    border: none !important;
    padding: 10px 18px !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.search_wrapper button:hover {
    background: var(--accent-color) !important;
}

.sort_dropdown select:hover,
.sort_dropdown select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Rating Filter Styles */
.rating_filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 5px 0;
}

.rating_option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.rating_option:hover {
    color: var(--accent-color);
}

.rating_option input {
    margin-right: 12px;
}

.stars {
    color: #ffc107;
    font-size: 13px;
    flex: 1;
}

.rating_option .count, .checkbox_option .count {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Checkbox Filter Refinement */
.checkbox_filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 5px 0;
}

.checkbox_option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.checkbox_option input {
    margin-right: 12px;
}

.checkbox_option span:not(.count) {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
}

/* Filter Section */
.filter_section {
    margin-bottom: 28px;
}

.filter_section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

/* Category List Boxed Design */
.category_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category_list li {
    margin-bottom: 8px;
}

.cat_link_wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px !important;
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.category_item_all a {
    text-decoration: none !important;
}

.cat_link_wrap:hover {
    background: #fcfcfc !important;
    border-color: var(--accent-color) !important;
    transform: translateX(5px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important;
}

.cat_link_wrap.active {
    background: #f8f9fa !important;
    border-color: var(--accent-color) !important;
    border-left: 4px solid var(--accent-color) !important;
}

.cat_link_content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cat_link_content i {
    width: 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
    transition: color 0.3s;
}

.cat_name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a !important; /* High contrast */
    letter-spacing: 0.2px;
}

.cat_right_meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category_count, .category_count_inline {
    font-size: 11px;
    color: #777;
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.toggle_sub {
    font-size: 12px;
    color: #aaa;
    transition: transform 0.3s ease, color 0.3s ease;
}

.cat_link_wrap:hover .toggle_sub, 
.cat_link_wrap:hover .cat_link_content i {
    color: var(--accent-color) !important;
}

/* Subcategory List Refinement */
.subcategory_list {
    list-style: none;
    padding: 5px 0 10px 45px;
    margin: 0;
}

.subcategory_list li {
    margin-bottom: 5px;
}

.subcategory_list li a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.subcategory_list li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.sub_count {
    color: #aaa;
    font-size: 11px;
}

/* Price Range */
.price_range_container {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.price_slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--accent-color), var(--accent-color));
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    margin: 16px 0;
}

.price_slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(212, 165, 116, 0.4);
}

.price_slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.4);
}

.price_values {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Filter Checkboxes */
.filter_checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter_checkboxes label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.filter_checkboxes label:hover {
    background: var(--bg-light);
}

.filter_checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

/* =========================================
   MAIN CONTENT AREA
   ========================================= */
.products_main {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Products Grid Fix */
/* Products Grid Fix */
.products_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    width: 100%;
    min-height: 500px;
    align-content: start;
}

@media (max-width: 576px) {
    .products_grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

.products_main {
    display: block !important; /* Change back to block to avoid flex issues */
    width: 100% !important;
    min-width: 0 !important;
}

/* Top Bar */
.products_topbar {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.topbar_left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.results_count {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.results_count strong {
    color: var(--accent-color);
}

.topbar_right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* View Toggle */
.view_toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.view_toggle button {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 16px;
}

.view_toggle button.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 6px rgba(212, 165, 116, 0.3);
}

.view_toggle button:hover:not(.active) {
    background: rgba(212, 165, 116, 0.1);
    color: var(--accent-color);
}

/* Sort Dropdown */
.sort_dropdown {
    position: relative;
}

.sort_dropdown select {
    padding: 10px 36px 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.sort_dropdown select:hover {
    border-color: var(--accent-color);
}

.sort_dropdown select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.sort_dropdown::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-light);
}

/* Secondary grid definition removed to prevent conflict with responsive settings above */

/* =========================================
   PRODUCT CARD - NEW DESIGN
   ========================================= */
/* Ensure all slides in a row are same height */
.swiper-slide {
    height: auto !important;
    display: flex !important;
    flex-direction: column;
}

.product_card {
    flex: 1 !important; /* Stretch card to fill slide */
    background: var(--bg-white) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden !important;
    border: 1px solid var(--border-color) !important;
    transition: var(--transition) !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    box-shadow: var(--shadow-sm) !important;
    min-height: 350px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hover Effect Removed as requested */
.product_card:hover {
    transform: none !important;
    box-shadow: var(--card-shadow-sm) !important;
    border-color: var(--accent-color);
}

/* Badges */
.product_badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    width: fit-content;
}

.badge_sale {
    background: linear-gradient(135deg, var(--danger-color), #C0392B);
    color: white;
}

.badge_new {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
}

/* Favorite Button */
.btn_favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.btn_favorite:hover {
    transform: none !important;
}

.btn_favorite:hover i {
    color: white;
}

.btn_favorite i {
    font-size: 18px;
    color: var(--text-light);
    transition: var(--transition);
}

.btn_favorite.active {
    background: var(--danger-color);
}

.btn_favorite.active i {
    color: white;
}

/* Product Image */
.product_image {
    position: relative;
    height: 240px; /* Reduced from 280px */
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.product_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product_card:hover .product_image img {
    transform: none !important;
}

/* Quick View Button */
.btn_quick_view {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.product_card:hover .btn_quick_view {
    display: none !important; /* Fully removed hover button as requested */
}

/* Product Info */
.product_info {
    padding: 15px; /* Reduced from 20px */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Tighter gap */
    flex: 1;
}

/* Rating */
.product_rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.product_rating i {
    color: #ffc107 !important; /* Golden stars from reference */
    font-size: 11px !important;
}

.product_rating span {
    color: #999 !important;
    font-size: 11px !important;
    margin-left: 2px !important;
}

/* Product Name */
.product_name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    height: 42px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.product_name a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s;
}

.product_name a:hover {
    color: var(--accent-color);
}

/* Product Description */
.product_desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
.product_price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.price_current {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
}

.price_old {
    font-size: 13px !important;
    color: #b5b5b5 !important;
    text-decoration: line-through !important;
}

/* Add to Cart Button */
.btn_add_cart {
    width: 100% !important;
    padding: 12px !important;
    background: #1a3c34 !important; /* Premium Dark Green from reference */
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s !important;
    margin-top: auto; /* Pushes button to bottom for alignment */
    font-family: 'Inter', sans-s.home-product-card .btn_buy_now:hover {
    background: #1a3c34 !important;
    transform: none !important;
}    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.btn_add_cart:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.btn_add_cart.active {
    background: var(--success-color);
    pointer-events: none;
}

.btn_add_cart i {
    font-size: 16px;
}

/* =========================================
   LIST VIEW
   ========================================= */
.products_grid.list_view {
    grid-template-columns: 1fr;
}

.products_grid.list_view .product_card {
    flex-direction: row;
    max-height: 220px;
}

.products_grid.list_view .product_image {
    width: 280px;
    height: 100%;
    flex-shrink: 0;
}

.products_grid.list_view .product_info {
    flex: 1;
    padding: 24px;
}

.products_grid.list_view .product_desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products_grid.list_view .btn_add_cart {
    max-width: 200px;
}

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.pagination button,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(52, 152, 219, 0.05);
}

.pagination button.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Tablet */
@media (max-width: 1200px) {
    .products_layout {
        grid-template-columns: 240px 1fr;
        gap: 24px;
    }
    
    .products_grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Fix Page Container on Mobile */
    .products_page_container {
        padding: 0 !important; /* Remove container padding to prevent double spacing */
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .products_sidebar, .sidebar_overlay, .btn_mobile_filter {
        display: none !important;
    }
    
    .btn_mobile_filter {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        background: var(--accent-color);
        color: white;
        border: none;
        border-radius: var(--radius-sm);
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 16px;
    }
    
    .products_layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 12px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .products_sidebar {
        display: none !important;
    }
    
    .sidebar_overlay {
        display: none !important;
    }
    
    .mobile_filter_btn {
        display: none !important;
    }
    
    
    /* Topbar is now visible on mobile */
    
    
    .products_grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Force 2 columns for GRID view */
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 15px !important; /* Natural spacing below topbar */
    }


    .products_grid.list_view {
        grid-template-columns: 1fr !important; /* Force 1 column for LIST view */
    }
    
    .products_grid.list_view .product_card {
        flex-direction: row; /* Horizontal layout for list items */
        align-items: center;
        max-height: 140px; /* Compact height */
        padding: 10px;
    }

    .products_grid.list_view .product_image {
        width: 100px;
        height: 120px;
        padding: 5px;
        flex-shrink: 0;
    }

    .products_grid.list_view .product_info {
        padding: 0 0 0 12px;
        text-align: left;
    }
    
    .product_image {
        height: 200px;
        padding: 16px;
    }
    
    .product_info {
        padding: 16px;
    }
    
    .topbar_left {
        width: 100%;
        display: flex;
        flex-direction: column; /* Stack text to prevent cutoff */
        gap: 6px;
        align-items: flex-start;
    }

    .topbar_right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    /* Hide View Toggle on Mobile */
    .view_toggle {
        display: none !important;
    }
    
    .sort_dropdown {
        width: 100%;
    }

    .products_topbar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-bottom: 0;
        /* Fix for 120px gap on mobile */
        position: static !important;
        top: 0 !important;
        margin-top: 0 !important;
        padding-top: 10px !important; /* Small padding for breathing room */
    }
    
    .results_count {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .view_options {
        display: flex;
        gap: 6px;
        flex-shrink: 0; /* Keep buttons fixed size */
    }
    
    .view_btn {
        padding: 6px 10px !important; /* Smaller buttons */
    }
    
    .sort_options {
        flex: 1; /* Take remaining space */
        min-width: 0; /* Allow shrinking */
        width: auto;
    }
    
    .sort_select {
        width: 100%;
        height: 36px; /* Compact height */
        padding: 0 10px;
        font-size: 13px;
        background-position: right 8px center; /* Adjust arrow position */
    }
    
    /* Fix Hero Section on Mobile */
    .products_hero_section {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .products_hero_container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
}

@media (max-width: 600px) {
    .products_grid, 
    .products_grid.list_view {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important; /* Increased gap */
    }

    .products_grid .product_card {
        min-height: 260px !important; /* Increased height */
        height: auto !important; /* Allow growing */
        min-width: 0 !important;
        width: 100% !important;
        max-width: none !important;
        display: flex;
        flex-direction: column;
    }
    
    .product_image {
        height: 160px !important; /* Larger image */
        padding: 10px !important;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product_info {
        padding: 12px !important;
        gap: 8px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .product_name {
        font-size: 13px !important; /* Increased font */
        min-height: 36px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .product_price {
        font-size: 15px !important; /* Larger price */
        font-weight: 700 !important;
    }
    
    .price_original {
        font-size: 12px !important;
    }
    
    .product_rating {
        font-size: 12px !important;
        margin-top: auto; /* Push to bottom if needed */
    }
    
    .product_rating i {
        font-size: 12px !important;
    }
    
    .btn_add_cart {
        padding: 10px 14px !important;
        font-size: 12px !important;
        width: 100%;
        margin-top: 8px;
    }
    
    .btn_favorite {
        width: 32px !important;
        height: 32px !important;
        top: 8px !important;
        right: 8px !important;
    }
    
    .btn_favorite i {
        font-size: 14px !important;
    }
    
    .badge {
        padding: 4px 8px !important;
        font-size: 9px !important;
    }
    
    .product_badges {
        top: 8px !important;
        left: 8px !important;
        gap: 4px !important;
    }
    
    .products_topbar {
        padding: 12px;
    }
    
    .breadcrumb {
        font-size: 11px;
    }
    
    .results_count {
        font-size: 11px;
    }
    
    /* Hide quick view button on mobile - too small */
    .btn_quick_view {
        display: none !important;
    }
}

/* =========================================
   LOADING STATE
   ========================================= */
.products_loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =========================================
   EMPTY STATE
   ========================================= */
.products_empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.products_empty i {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.products_empty h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.products_empty p {
    color: var(--text-light);
    margin: 0 0 24px 0;
}

/* =========================================
   HERO SECTION (PREMIUM)
   ========================================= */
.main_page_title {
    font-family: 'Playfair Display', serif !important;
    font-size: 48px !important;
    font-weight: 700 !important;
    color: #ffffff !important; /* White text for banner */
    margin-bottom: 15px !important;
    letter-spacing: -0.5px !important;
}

.products_title_section {
    position: relative !important;
    min-height: 300px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 60px 0 !important;
    background-color: #1a1a1a !important;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../Ecommerce%20Website/nathon-oski-EW_rqoSdDes-unsplash.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

.products_title_section::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    z-index: 1 !important;
}

.products_title_container {
    position: relative !important;
    z-index: 2 !important;
    max-width: 1400px !important;
    width: 100% !important;
    padding: 0 24px !important;
}

.breadcrumb_wrapper {
    display: flex !important;
    justify-content: center !important;
}

.breadcrumb {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.breadcrumb a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.breadcrumb i {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

#currentCategoryBreadcrumb {
    font-weight: 600 !important;
    color: #ffffff !important;
}

/* Subtle path/title animation on category/subcategory change */
.main_page_title.path-animating {
    animation: pathTitlePop 320ms ease-out;
}

.breadcrumb.path-animating {
    animation: pathTrailSlide 320ms ease-out;
}

@keyframes pathTitlePop {
    0% {
        opacity: 0.55;
        transform: translateY(6px) scale(0.992);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pathTrailSlide {
    0% {
        opacity: 0.45;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Products Header Compact Mode (Mobile)
   ========================================= */
@media (max-width: 768px) {
    /* Main Layout */
    .header-solid {
        height: auto !important;
        min-height: 60px !important;
        padding-bottom: 0 !important;
    }
    
    .header-solid .top_header {
        height: 60px !important;
        padding: 0 10px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .header-solid .top_header .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 100% !important;
        padding: 0 !important;
    }

    /* Shrink Logo */
    .header-solid .logo img {
        height: 35px !important;
        width: auto !important;
        max-width: 120px !important; /* Ensure aspect ratio */
        object-fit: contain !important;
    }

    /* Hide Desktop Search (Reinforce) */
    .search_box.desktop-search-bar {
        display: none !important;
    }

    /* Toggle Icon */
    .header_icons {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .header_icons .search-toggle {
        display: flex !important;
        width: 32px !important;
        height: 32px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        color: #333 !important;
        cursor: pointer !important;
    }

    /* Collapsible Search Bar Container */
    .mobile_search_container_wrapper {
        display: none !important; /* Hidden by default */
        padding: 10px !important;
        background: #fff !important;
        border-bottom: 1px solid #eee !important;
        position: relative !important;
        z-index: 98 !important;
    }

    .mobile_search_container_wrapper.active {
        display: block !important;
    }

    .mobile_search_container_wrapper .search_box {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important; /* Ensure flex for input/button */
    }

    /* Adjust Mobile Category Swiper Position */
    .mobile_category_swiper {
         margin-top: 0 !important;
         padding-top: 10px !important;
         border-top: none !important;
    }
    
    /* Adjusted Padding for Slim Title Section */
    html body {
        padding-top: 65px !important; /* Back to header height since Hero is now a flat section */
    }

    /* FIX: Reset Hero Margin */
    .products_hero_section {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }

    /* FIX: Adjust Topbar Spacing & Position */
    .products_topbar {
        top: 115px !important; /* Stick right below header */
        padding: 5px 15px !important; /* Compact padding */
        gap: 10px !important;
    }
    
    .products_topbar .results_count {
        font-size: 0.85rem;
    }
}

/* Force overflow visible for search boxes to show suggestions */
header .search_box.desktop-search-bar,
header .search_box.mobile-search-bar-visible {
    overflow: visible !important;
}

/* =========================================
   SEARCH SUGGESTIONS DROPDOWN
   ========================================= */
.search_suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 10px 10px;
    max-height: 400px;
    overflow-y: auto;
    display: none; /* Hidden by default */
    margin-top: 5px;
    border: 1px solid #eee;
    animation: fadeIn 0.2s ease-out;
}

.search_suggestions.active {
    display: block;
}

.suggestion_item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s ease;
}

.suggestion_item:last-child {
    border-bottom: none;
}

.suggestion_item:hover {
    background-color: #f7f7f7;
}

.suggestion_item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    border: 1px solid #eee;
}

.suggestion_info {
    flex: 1;
}

.suggestion_info h4 {
    margin: 0 0 3px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.2;
}

.suggestion_info .price {
    margin: 0;
    font-size: 13px;
    color: #d4a574; /* Brand Gold */
    font-weight: 600;
}

.no_suggestions {
    padding: 15px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FORCE MOBILE SWIPER HORIZONTAL */
@media (max-width: 768px) {
    .mobile_category_swiper .swiper_wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding-bottom: 5px !important;
    }
}

/* =========================================
   RESPONSIVE DESIGN CONSOLIDATED
   ========================================= */

/* Desktop & Large Screens */
@media (min-width: 993px) {
    .products_layout {
        display: grid !important;
        grid-template-columns: 300px 1fr !important;
        gap: 40px !important;
    }
}

/* Tablets (iPad, etc.) */
@media (max-width: 1024px) {
    .products_layout {
        grid-template-columns: 260px 1fr !important;
        gap: 25px !important;
        padding: 0 15px !important;
    }
    
    .products_grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 20px !important;
    }
}

/* Tablet Vertical & Mobile */
@media (max-width: 992px) {
    .products_layout {
        display: block !important;
        padding: 10px !important;
    }

    .products_sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -320px !important;
        height: 100vh !important;
        width: 300px !important;
        background: white !important;
        z-index: 2000 !important;
        overflow-y: auto !important;
        transition: left 0.3s ease !important;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1) !important;
    }

    .products_sidebar.active {
        left: 0 !important;
    }

    .sidebar_overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }

    .sidebar_overlay.active {
        display: block;
    }

    .btn_mobile_filter {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 100;
        background: var(--accent-color);
        color: white;
        padding: 12px 24px;
        border-radius: 30px;
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
        border: none;
        font-weight: 600;
        align-items: center;
        gap: 10px;
    }

    .products_grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Fixed topbar spacing on mobile */
    .products_topbar {
        position: static !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .topbar_left, .topbar_right {
        width: 100% !important;
    }
}

/* Small Mobile Phones - 2 Column Layout (Requested) */
@media (max-width: 576px) {
    .products_grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important; /* Tighter gap for 2 columns */
        width: 100% !important;
        padding: 0 5px !important; /* Minimal padding */
    }

    .product_card {
        min-height: auto !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .product_image {
        height: 180px !important; /* Proportional height for 2-col */
        padding: 10px !important;
        width: 100% !important;
    }

    .product_info {
        padding: 10px !important;
    }

    .product_name {
        font-size: 13px !important; /* Smaller font for 2-col */
        min-height: 36px !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
    }

    .price_current {
        font-size: 16px !important;
    }

    .btn_add_cart {
        padding: 8px !important;
        font-size: 12px !important;
    }
    
    /* Hide quick view on mobile to save space */
    .btn_quick_view {
        display: none !important;
    }
}

