/* CSS Variables */
:root {
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent-pink: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.original-price,
del span.woocommerce-Price-amount.amount {
    font-family: "Google Sans Flex", "Google Sans", "Helvetica Neue", sans-serif;
}

li.product-category {
    width: 24%;
}

li.product-category a {
    display: block;
}

li.product-category a img {
    width: 100%;
    object-fit: cover;
}

li.product-category a h2.woocommerce-loop-category__title {
    font-size: 15px;
    /* margin: 0 0 10px; */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Anek Bangla', sans-serif;
    /* background-color: var(--gray-50); */
    color: var(--gray-800);
    line-height: 1.5;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }
}

/* shop-top-bar */
.shop-top-bar {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    padding: 12px 0;
}

.breadcrumb {
    font-size: 14px;
}

.breadcrumb a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--gray-400);
}

.breadcrumb a:last-child {
    color: var(--gray-700);
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 32px 0;
}

/* Page Title and Controls */
.page-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .page-header {
        flex-direction: row;
        align-items: center;
    }
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}

@media (min-width: 640px) {
    .page-title {
        margin-bottom: 0;
    }
}

.page-title span {
    color: var(--primary-light);
}

.controls {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    justify-content: flex-end;
}

@media (min-width: 640px) {
    .controls {
        width: auto;
    }
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: var(--primary-light);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .filter-toggle {
        display: none;
    }
}

.filter-toggle svg {
    width: 16px;
    height: 16px;
}

.sort-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
    display: none;
}

@media (min-width: 640px) {
    .sort-label {
        display: block;
    }
}

.sort-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    background-color: var(--white);
    border-radius: 8px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s, box-shadow 0.3s;
}

@media (min-width: 640px) {
    .sort-select {
        width: 192px;
    }
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Category Tabs */
.category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 32px;
}

.category-scroll::-webkit-scrollbar {
    height: 6px;
}

.category-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

@media (max-width: 768px) {
    .category-scroll {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .category-scroll::-webkit-scrollbar {
        display: none;
    }
}

.category-tab {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 9999px;
    border: 1px solid var(--gray-300);
    background-color: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s;
}

.category-tab:hover {
    background-color: var(--gray-50);
    border-color: #000000;
}

.category-tab.active {
    background-color: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
    font-weight: 600;
    /* box-shadow: var(--shadow-lg); */
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 3fr;
    }
}

/* Filter Sidebar */
.filter-sidebar {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    padding: 24px;
    height: fit-content;
}

@media (max-width: 1023px) {
    .filter-sidebar {
        display: none;
    }

    .filter-sidebar.mobile-open {
        display: block;
        margin-bottom: 24px;
    }
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.filter-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.filter-clear {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-pink);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}

.filter-clear:hover {
    color: #dc2626;
}

.filter-clear svg {
    width: 20px;
    height: 20px;
}

.filter-section {
    margin-bottom: 32px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-option {
    display: flex;
    align-items: flex-start;
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    color: var(--primary-light);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    margin-right: 12px;
    cursor: pointer;
}

.filter-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-label {
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
}

.filter-label.checked {
    font-weight: 500;
}

.color-options {
    display: flex;
    gap: 12px;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.color-option:hover {
    box-shadow: 0 0 0 2px var(--gray-400);
}

.color-option.active {
    box-shadow: 0 0 0 2px var(--primary-light), 0 0 0 4px var(--white);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (min-width: 768px) {


    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Product Card */
.product-card {
    background-color: var(--white);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-image-container {
    position: relative;
    aspect-ratio: 3/4;
    background-color: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    border: solid 1px #f1f1f1;
}

.sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--accent-pink);
    color: var(--white);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 9999px;
    z-index: 10;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease-in-out;
}

.product-info {
    padding: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* min-height: 42px; */
    font-family: 'Anek Bangla', sans-serif;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Anek Bangla', sans-serif;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.original-price {
    font-size: 14px;
    color: var(--gray-400);
    text-decoration: line-through;
}

.product-actions {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background-color: var(--white);
    color: var(--gray-900);
    border: 1px solid var(--gray-900);
    font-size: 14px;
    font-weight: 600;
    padding: 5px;
    border-radius: 1px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Anek Bangla', sans-serif;
}

.cart-btn:hover {
    background-color: var(--gray-50);
}

.cart-btn svg {
    width: 16px;
    height: 16px;
}

.order-btn {
    width: 100%;
    background-color: var(--gray-900);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    padding: 5px;
    border-radius: 1px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Anek Bangla', sans-serif;
}

.order-btn:hover {
    background-color: var(--gray-800);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination-btn:hover {
    background-color: var(--gray-100);
}

.pagination-page {
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    background-color: var(--primary-light);
    border-radius: 8px;
    border: solid 1px;
}

.pagination-page:not(.active) {
    color: var(--gray-700);
    background-color: var(--white);
}

@media (max-width: 767px) {
    .product-grid-section {
        max-width: 328px;
    }
}

ul.page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
    /* Space between buttons */
    justify-content: center;
    /* Centers the pagination */
    margin: 20px 0;
}

/* Base styles for all links and the current span */
.page-numbers li a,
.page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: sans-serif;
    font-weight: 500;
}

/* Hover state for links */
.page-numbers li a:hover {
    background-color: #f0f0f0;
    border-color: #0f1522;
    color: #000;
}

/* Active/Current page styling */
.page-numbers li span.current {
    background-color: #111827;
    /* Change this to your brand color */
    border-color: #111827;
    color: #fff;
    cursor: default;
}

/* Styling for Prev/Next arrows specifically if needed */
.page-numbers li a.prev,
.page-numbers li a.next {
    font-size: 1.2rem;
    background-color: #f9f9f9;
}