* {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    overflow-y: hidden;
    min-height: 100vh;
    background-color: #fff;
    color: #333;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

.bounce-in-up {
    animation: bounceInUp 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.bounce-in-left {
    animation: bounceInLeft 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bounceInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceInLeft {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .bounce-in-up,
    .bounce-in-left {
        animation: none;
    }
}

.page-banner {
    background-color: #f8f9fa;
    padding: 32px 24px;
    margin-bottom: 28px;
    border: none;
    padding: 30px;
}

.page-banner h1 {
    font-size: 28px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.breadcrumb {
    font-size: 14px;
    color: #666;
}

.breadcrumb span {
    display: inline-block;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #aaa;
}

.breadcrumb .current {
    color: #000;
    font-weight: 500;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#searchInput {
    padding: 6px 10px;
    border: 1px solid #ddd;
    width: 180px;
    font-size: 14px;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

#searchInput:focus {
    border-color: #222;
}

.main-wrapper {
    display: flex;
    gap: 40px;
    padding: 30px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.products-grid-section {
    flex: 1;
    width: 100%;
    min-width: 0;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.sidebar-group {
    margin-bottom: 20px;
    border: none;
    padding: 15px 20px;
}

.sidebar-group-title {
    display: flex;
    justify-content: space-between;
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
}

.sidebar-group ul {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.sidebar-group.open ul {
    max-height: 2000px;
    overflow: visible;
    margin-top: 15px;
}

.sidebar-group ul li {
    padding: 4px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    color: #555;
    width: 100%;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-check {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #222;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: background 0.1s;
}

.checkbox-label input:checked+.custom-check {
    background: #222;
}

.checkbox-label input:checked+.custom-check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .check-text {
    color: #000;
}

.sidebar-actions {
    margin-top: 10px;
}

#clearFilterBtn {
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

#clearFilterBtn:hover {
    background: #f0f0f0;
    border-color: #222;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #f5f5f5;
    padding: 10px;
    height: 100%;
    min-width: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image-wrapper {
    position: relative;
    background-color: #fff;
    margin-bottom: 12px;
    padding-bottom: 100%;
    overflow: hidden;
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
}

.action-item {
    position: relative;
    display: flex;
    align-items: center;
}

.product-actions a {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    cursor: pointer;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    z-index: 2;
}

.action-item:hover a {
    background: #222;
    color: #fff;
}

.action-label {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(15px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #fff;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border-radius: 2px !important;
    margin-left: 5px;
    z-index: 1;
}

.action-item:hover .action-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #000;
    color: #fff;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
}

.badge-countdown-image {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: #ffff;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    display: none;
}

.countdown-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 8px 10px;
    text-align: center;
    margin: -5px 0 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.countdown-box span {
    font-size: 10px;
    font-weight: bold;
    font-weight: 600;
}

.countdown-box .num {
    font-size: 13px;
    font-weight: 700;
    min-width: 16px;
    display: inline-block;
}

.countdown-box .label {
    color: #666;
    font-weight: 400;
}

.product-title {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #000;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.product-price {
    font-size: 30px;
    font-weight: 600;
    margin-top: 4px;
}

.product-price .original {
    font-weight: 400;
    color: #888;
    text-decoration: line-through;
    margin-left: 6px;
}

.custom-select-wrapper {
    position: relative;
    width: 200px;
    font-size: 14px;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.custom-select-trigger .fa-chevron-down {
    font-size: 12px;
    color: #666;
}

.custom-options {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    display: none;
    z-index: 10;
}

.custom-options li {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.custom-options li:hover {
    background: #f5f5f5;
}

.custom-options li.selected {
    background: #eee;
}

.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    width: 100%;
    padding: 80px 20px;
    text-align: center;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 14px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pagination-container button {
    border: 1px solid #ddd;
    background: transparent;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.pagination-container button:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #222;
}

.pagination-container button.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.pagination-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    padding: 30px 40px;
    max-width: 400px;
    width: 90%;
    border: 1px solid #222;
    text-align: center;
}

.modal-box h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.modal-box p {
    margin-bottom: 25px;
    font-size: 14px;
    color: #666;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-actions button {
    padding: 8px 24px;
    border: 1px solid #222;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.modal-actions button.confirm-btn {
    background: #222;
    color: #fff;
}

.modal-actions button.confirm-btn:hover {
    opacity: 0.8;
}

.modal-actions button.cancel-btn:hover {
    background: #f0f0f0;
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #searchInput {
        width: 140px;
    }
}

@media (max-width: 800px) {
    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-bar-actions {
        width: 100%;
        justify-content: space-between;
    }

    #searchInput {
        flex: 1;
        width: 100%;
    }
}

@media (max-width: 500px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .custom-select-wrapper {
        width: 100%;
    }

    .page-banner {
        padding: 20px 16px;
    }

    .page-banner h1 {
        font-size: 22px;
    }
}

.product-price .price-old {
    text-decoration: line-through;
    color: #94a3b8;
    margin-right: 10px;
    font-size: 0.9rem;
}

.product-price .price-new {
    color: #dc3545;
    font-weight: 700;
    font-size: 1.1rem;
}

.product-price .price-normal {
    font-weight: 600;
    font-size: 1.1rem;
}

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: #fff;
    padding: 4px 12px;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 2;
}

.top-bar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.custom-filter-wrapper {
    position: relative;
    display: inline-block;
    min-width: 160px;
}

.custom-filter-trigger {
    background: #fff;
    border: 1px solid #dce1e8;
    padding: 8px 32px 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    position: relative;
}

.custom-filter-trigger i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    transition: transform 0.2s;
}

.custom-filter-trigger.open i {
    transform: translateY(-50%) rotate(180deg);
}

.custom-filter-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #dce1e8;
    border-top: none;
    z-index: 10;
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-filter-options li {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.custom-filter-options li:hover {
    background: #f1f5f9;
}

.custom-filter-options li.selected {
    background: #e9edf2;
    font-weight: 600;
}

.custom-filter-options.open {
    display: block;
}