/* assets/css/modules/shop.css */
/* Restore Full CSS from templates-danh-muc-san-pham.html */

:root {
    --primary: #8dc63f;
    --background-light: #f6f6f8;
    --background-dark: #102216;
    --text-main: #111813;
    --white: #ffffff;
    --accent: #608a6e;
    --border-light: #f0f5f1;
    --border-dark: #1c2e22;
    --muted: #608a6e;
    --blue-500: #3b82f6;
}

* {
    box-sizing: border-box;
}



.dark body {
    background: var(--background-dark);
    color: var(--white);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}





.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.breadcrumb-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-icon {
    font-size: 16px;
    color: var(--accent);
}

.breadcrumb-current {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
}

.dark .breadcrumb-current {
    color: var(--white);
}

.layout-flex {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 1024px) {
    .layout-flex {
        flex-direction: row;
    }
}

.sidebar {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .sidebar {
        width: 356px;
        display: flex;
        flex-direction: column;
        gap: 2rem;
        position: sticky;
        top: 90px;
        height: fit-content;
    }
}

.sidebar-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
}

.dark .sidebar-card {
    background: #0a150e;
    border-color: var(--border-dark);
}

.section-heading {
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.section-subtext {
    color: var(--accent);
    font-size: 12px;
    margin-bottom: 10px;
}

.dark .section-heading {
    color: var(--white);
}

.category-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

input {
    margin: 0 !important;
}

i[class^=icon-] {
    line-height: 2em !important;
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    background: #8dc63f;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category-btn:hover {
    background: #5f8f1d;
}

.dark .category-btn {
    color: #d1d5db;
}

.dark .category-btn:hover {
    background: var(--border-dark);
}

.category-btn.active {
    background: #71a32e;

    color: var(--background-dark);
    font-weight: 700;
}

.category-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.icon-20 {
    font-size: 20px;
}

.filter-block {
    margin-bottom: 32px;
}

/* Slider Wrapper */
.price-slider-wrapper {
    position: relative;
    height: 16px;
    /* Container height */
    padding-top: 5px;
    /* Alignment */
}

/* Base Track */
.price-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #dbe6df;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* Let clicks pass to inputs */
}

.dark .price-track {
    background: var(--border-dark);
}

/* Active Highlight */
.price-range-highlight {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    position: absolute;
    top: 0;
    pointer-events: none;
}

/* Invisible Inputs Overlaid */
.range-input {
    position: absolute;
    width: 100%;
    height: 20px;
    top: -5px;
    pointer-events: none;
    /* Critical: allow clicking through invisible parts */
}

.range-input input {
    position: absolute;
    width: 100%;
    height: 100%;
    background: none;
    pointer-events: none;
    /* Allows clicking through the track part */
    -webkit-appearance: none;
    /* Remove default appearance */
    -moz-appearance: none;
    z-index: 25;
    /* Sit above the visual track but below the specific thumb z-index if managed there */
}

/* Chrome/Safari Thumb */
.range-input input::-webkit-slider-thumb {
    height: 30px;
    /* Big hitbox */
    width: 30px;
    border-radius: 50%;
    pointer-events: auto;
    -webkit-appearance: none;
    background: transparent;
    /* Invisible */
    cursor: pointer;
    z-index: 30;
    position: relative;
    margin-top: -10px;
    /* Center vert attempt if needed, depending on browser */
}

/* Firefox Thumb */
.range-input input::-moz-range-thumb {
    height: 30px;
    width: 30px;
    border: none;
    border-radius: 50%;
    pointer-events: auto;
    -moz-appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 30;
}

/* Custom Visual Thumbs (Synced by JS) */
.thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--white);
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    /* Purely visual */
    z-index: 21;
    /* Above track, below input thumb trigger */
}

.thumb.left {
    left: 0%;
}

.thumb.right {
    right: 0%;
    transform: translate(50%, -50%);
}

.price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}

.dark .check-row {
    color: #d1d5db;
}

.checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid #dbe6df;
    accent-color: var(--primary);
    cursor: pointer;
}

.header-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
    padding: 0 8px;
}

@media (min-width: 768px) {
    .header-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.title-group h1 {
    color: var(--text-main);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.dark .title-group h1 {
    color: var(--white);
}

.subtitle {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-label {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sort-select {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    min-width: 180px;
    color: var(--text-main);
}

.dark .sort-select {
    background: var(--border-dark);
    border-color: var(--border-dark);
    color: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .product-card {
    background: #0a150e;
    border-color: var(--border-dark);
}

.product-card:hover {
    border-color: #8dc63f;
}

.product-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--border-light);
}

.dark .product-media {
    background: var(--border-dark);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge.blue {
    background: var(--blue-500);
    color: var(--white);
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.product-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0;
}

.product-name {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .product-name {
    color: var(--white);
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 16px;
}

.price-current {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}

.price-old {
    color: var(--accent);
    font-size: 12px;
    text-decoration: line-through;
}

.add-cart {
    width: 100%;
    height: 40px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-cart:hover {
    background: #8dc63f;
}

button.button {
    margin: 0 !important;
}

.icon-18 {
    font-size: 18px;
}

.pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-main);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.page-btn:hover {
    background: var(--primary);
    color: var(--background-dark);
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.dark .page-btn {
    border-color: var(--border-dark);
    color: var(--white);
}

.ellipsis {
    color: var(--accent);
    font-weight: 600;
}

.dark .ellipsis {
    color: #9ca3af;
}

/* HIDE Default Theme Titles */
.shop-page-title,
.category-page-title,
.page-title,
.page-title-section,
.page-header {
    display: none !important;
}

.wcc-shop-wrapper {
    max-width: 1370px;
    margin: 0 auto;
    padding: 24px 24px;
}