:root {
    --dark-bg: #121212;
}

.category-hero {
    background-color: var(--dark-bg);
    background-image: linear-gradient(to bottom, rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.95)), url('../media/category-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 24rem 0 10rem;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.category-hero-content {
    text-align: center;
    padding: 2rem 0;
}

.category-title {
    font-size: 6rem;
    letter-spacing: 0.4rem;
    margin-bottom: 2.5rem;
}

.category-subtitle {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1rem;
    margin-bottom: 4rem;
    color: var(--light-gray);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.categories-section {
    background-color: var(--dark-bg);
    padding: 6rem 0;
}

.categories-inner {
    display: flex;
    gap: 4rem;
    position: relative;
    min-height: 800px;
}

.filters-sidebar-wrapper {
    width: 280px;
    flex-shrink: 0;
    position: relative;
}

.filters-sidebar {
    width: 100%;
    background-color: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) var(--dark-gray);
    z-index: 100;
}

.filters-sidebar.fixed {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filters-header h3 {
    font-size: 1.8rem;
    letter-spacing: 0.2rem;
    margin: 0;
}

.btn-reset {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-reset:hover {
    opacity: 0.8;
}

.filter-group {
    margin-bottom: 2.5rem;
}

.filter-group h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-weight: 500;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.option-label {
    position: relative;
    padding-left: 3rem;
    font-size: 1.4rem;
    color: var(--light-gray);
    transition: color 0.3s ease;
    user-select: none;
}

.option-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid rgba(212, 175, 55, 0.5);
    background-color: transparent;
    transition: all 0.3s ease;
}

.filter-option input[type="checkbox"]:checked~.option-label {
    color: var(--gold);
}

.filter-option input[type="checkbox"]:checked~.option-label::before {
    background-color: var(--gold);
    border-color: var(--gold);
}

.filter-option input[type="checkbox"]:checked~.option-label::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0.4rem;
    top: 0.1rem;
    color: var(--dark-bg);
    font-size: 1.1rem;
}

.price-range {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 4px;
}

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

.price-input {
    flex: 1;
}

.price-input label {
    display: block;
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 0.8rem;
}

.input-wrapper {
    position: relative;
}

.currency {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-weight: 600;
}

.price-input input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 1rem 1rem 1rem 2.5rem;
    border-radius: 4px;
    font-size: 1.4rem;
}

.price-input input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.separator {
    color: var(--light-gray);
    font-weight: 500;
}

.btn-price-apply {
    width: 100%;
    padding: 1rem;
    text-align: center;
    font-size: 1.4rem;
}

.filters-mobile-toggle {
    display: none;
}

.products-container {
    flex: 1;
    transition: margin-left 0.3s ease;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.products-count {
    font-size: 1.6rem;
    color: var(--light-gray);
}

.products-count span {
    color: var(--gold);
    font-weight: 600;
}

.products-sort {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.products-sort label {
    font-size: 1.4rem;
    color: var(--light-gray);
    font-weight: 500;
    letter-spacing: 0.05rem;
}

.custom-dropdown {
    position: relative;
    min-width: 200px;
    user-select: none;
    z-index: 10;
}

.dropdown-selected {
    background-color: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    padding: 1.2rem 4rem 1.2rem 1.5rem;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.dropdown-selected:hover {
    border-color: var(--gold);
    background-color: rgba(25, 25, 25, 0.85);
}

.dropdown-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    width: 0.9rem;
    height: 0.9rem;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    pointer-events: none;
    transition: transform 0.3s ease;
    transform: translateY(-50%) rotate(45deg);
}

.custom-dropdown.open .dropdown-arrow {
    transform: translateY(-30%) rotate(-135deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(-10px);
    z-index: 100;
    backdrop-filter: blur(5px);
}

.custom-dropdown.open .dropdown-options {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-option {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    color: var(--light-gray);
    transition: all 0.2s ease;
    font-size: 1.4rem;
}

.dropdown-option:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

.dropdown-option.selected {
    color: var(--gold);
    font-weight: 600;
    background-color: rgba(212, 175, 55, 0.05);
}

@keyframes dropdownPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 5px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.dropdown-option:active {
    animation: dropdownPulse 0.7s;
}

.custom-select {
    display: none;
}

.products-sort select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;

    background-color: rgba(30, 30, 30, 0.8) !important;
    border: 1px solid rgba(212, 175, 55, 0.5) !important;
    color: var(--white) !important;
    border-radius: 4px !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    padding: 1.2rem 3.5rem 1.2rem 1.5rem !important;
    min-width: 180px !important;

    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23D4AF37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095.1c3.6-3.6%205.4-7.8%205.4-12.9%200-5-1.8-9.3-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-position: right 1.5rem top 50% !important;
    background-size: 0.65rem auto !important;
    background-repeat: no-repeat !important;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;

    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease !important;
}

.products-sort select:focus {
    outline: none !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3) !important;
}

.products-sort select option {
    background-color: rgba(20, 20, 20, 0.95);
    color: var(--white);
    padding: 1.5rem;
    font-size: 1.4rem;
    cursor: pointer;
}

.products-sort::after {
    position: absolute;
    content: '';
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.products-sort select:hover {
    background-color: rgba(40, 40, 40, 0.9) !important;
    border-color: var(--gold) !important;
}

.products-sort select::-webkit-details-marker {
    display: none !important;
}

.products-sort select:-moz-focusring {
    color: transparent !important;
    text-shadow: 0 0 0 var(--white) !important;
}

.products-sort select {
    -moz-appearance: none;
    appearance: none;
    text-indent: 0.01px;
    text-overflow: '';
}

.products-sort select::-ms-expand {
    display: none !important;
}

@supports ((-webkit-appearance: none) or (appearance: none)) {
    .products-sort select {
        -webkit-appearance: none;
        appearance: none;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.product-card {
    background-color: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    gap: 1rem;
}

.product-badge {
    background-color: var(--gold);
    color: var(--dark-bg);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.product-badge.new {
    background-color: var(--gold);
}

.product-badge.featured {
    background-color: #9c27b0;
}

.product-badge.ending {
    background-color: #f44336;
}

.product-save {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: rgba(10, 10, 10, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-save:hover {
    background-color: rgba(10, 10, 10, 0.9);
}

.product-save i {
    color: var(--white);
    font-size: 1.6rem;
}

.product-info {
    padding: 2rem;
}

.product-category {
    color: var(--gold);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    height: 4.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.product-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.product-price {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--gold);
}

.product-bids {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.product-bid-count {
    font-size: 1.4rem;
    color: var(--light-gray);
}

.product-time {
    font-size: 1.2rem;
    color: #f44336;
}

.product-btn {
    width: 100%;
    text-align: center;
}

.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    z-index: 50;
}

.products-per-page {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 2rem;
    position: relative
}

.products-per-page label {
    font-size: 1.4rem;
    color: var(--light-gray);
    font-weight: 500;
    white-space: nowrap;
}

.products-per-page-dropdown {
    position: relative;
    min-width: 80px;
    user-select: none;
    z-index: 100;
}

.products-per-page-dropdown .dropdown-selected {
    background-color: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 51;
}

.products-per-page-dropdown .dropdown-selected:hover {
    border-color: var(--gold);
    background-color: rgba(25, 25, 25, 0.85);
}

.products-per-page-dropdown .dropdown-arrow {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    width: 0.7rem;
    height: 0.7rem;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    pointer-events: none;
    transition: transform 0.3s ease;
    transform: translateY(-50%) rotate(45deg);
}

.products-per-page-dropdown.open .dropdown-arrow {
    transform: translateY(-30%) rotate(-135deg);
}

.products-per-page-dropdown .dropdown-options {
    position: fixed;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(-10px);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.products-per-page-dropdown.open .dropdown-options {
    opacity: 1;
    transform: translateY(0);
    z-index: 9999;
}

.products-per-page-dropdown .dropdown-option {
    padding: 0.8rem 1rem;
    cursor: pointer;
    color: var(--light-gray);
    transition: all 0.2s ease;
    font-size: 1.3rem;
    text-align: center;
}

.products-per-page-dropdown .dropdown-option:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

.products-per-page-dropdown .dropdown-option.selected {
    color: var(--gold);
    font-weight: 600;
    background-color: rgba(212, 175, 55, 0.05);
}

.products-per-page select {
    display: none;
}

.products-per-page select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.products-per-page select:hover {
    background-color: rgba(40, 40, 40, 0.9);
    border-color: var(--gold);
}

.products-per-page select option {
    background-color: rgba(20, 20, 20, 0.95);
    color: var(--white);
    padding: 1rem;
}

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

.pagination-prev,
.pagination-next {
    background: none;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--white);
    padding: 1rem 1.5rem;
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pagination-prev:hover,
.pagination-next:hover {
    border-color: var(--gold);
    background-color: rgba(212, 175, 55, 0.1);
}

.pagination-prev:disabled,
.pagination-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}

.pagination-numbers {
    font-size: 1.6rem;
    color: var(--light-gray);
}

.current-page {
    color: var(--gold);
    font-weight: 600;
}

.product-time.ending-soon {
    color: #f44336;
    font-weight: 600;
}

.product-time.ended {
    color: #757575;
}

.text-gold {
    color: var(--gold) !important;
}

.loading-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 1s infinite ease;
    margin-bottom: 2rem;
}

.loading-container p {
    font-size: 1.6rem;
    color: var(--light-gray);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 0;
}

.no-results i {
    font-size: 5rem;
    color: rgba(212, 175, 55, 0.3);
    margin-bottom: 2rem;
}

.no-results h3 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.no-results p {
    font-size: 1.6rem;
    color: var(--light-gray);
    max-width: 500px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

@media screen and (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1280px) {
    .filters-sidebar {
        left: 4rem;
    }
}

@media screen and (max-width: 992px) {
    .categories-inner {
        flex-direction: column;
    }

    .filters-sidebar-wrapper {
        width: 100%;
    }

    .filters-sidebar {
        position: static !important;
        width: 100%;
        max-height: none;
    }

    .products-container {
        margin-left: 0 !important;
    }

    .filters-mobile-toggle {
        display: block;
        margin-top: 2rem;
    }

    .filters-content {
        display: none;
    }

    .filters-content.active {
        display: block;
    }

    .category-title {
        font-size: 4rem;
    }
}

@media screen and (max-width: 768px) {
    .category-hero {
        padding: 10rem 0 5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .products-sort {
        width: 100%;
    }

    .products-sort select {
        flex: 1;
    }

    .product-image {
        height: 200px;
    }

    .products-pagination {
        flex-direction: column;
        gap: 1.5rem;
    }

    .products-per-page {
        margin-right: 0;
        order: 1;
    }

    .pagination-controls {
        order: 2;
    }

    .products-per-page-dropdown {
        min-width: 70px;
    }

    .products-per-page label {
        font-size: 1.3rem;
    }

    .products-per-page-dropdown .dropdown-selected {
        font-size: 1.2rem;
        padding: 0.7rem 2.2rem 0.7rem 0.8rem;
    }
}

@media screen and (max-width: 576px) {
    .category-title {
        font-size: 3rem;
    }

    .category-subtitle {
        font-size: 1.6rem;
    }

    .price-inputs {
        flex-direction: column;
        gap: 1.5rem;
    }

    .separator {
        display: none;
    }

    .products-pagination {
        gap: 1rem;
    }

    .products-per-page label {
        font-size: 1.3rem;
    }

    .products-per-page select {
        font-size: 1.3rem;
        padding: 0.7rem 2.2rem 0.7rem 0.8rem;
        min-width: 70px;
    }
}

.search-box {
    position: relative;
    margin-bottom: 0.5rem;
}

.search-box input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 1.2rem 4rem 1.2rem 1.5rem;
    border-radius: 4px;
    font-size: 1.4rem;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 4rem;
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    color: var(--white);
}

.search-highlight {
    background-color: rgba(212, 175, 55, 0.15);
    padding: 0 2px;
}

@media screen and (max-width: 768px) {
    .search-box input {
        padding: 1rem 4rem 1rem 1.2rem;
    }
}

.toast-notification {
    position: fixed;
    right: 20px;
    padding: 12px 20px;
    background-color: var(--gold);
    color: var(--dark-bg);
    border-radius: 4px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, bottom 0.3s ease;
    width: max-content;
    max-width: 300px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}