/* AEM Labs Limited - All Product Category Pages CSS */
/* ================================================= */

/* --- Product Listing Section Start --- */
.product-listing-section {
    background-color: #f8f9fa;
    padding: 30px 0;
}

.listing-container {
    max-width: min(95%, var(--section-max-width));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar Filters */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    /* position: sticky; */
    /* top: 20px; */
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
}

.filters-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.clear-all-filters {
    background: none;
    border: none;
    color: var(--accent-color, #6907c5);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.filter-group {
    border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-header:hover {
    background-color: #f8f9fa;
}

.filter-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.toggle-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.filter-header.active .toggle-icon {
    transform: rotate(180deg);
}

.filter-content {
    padding: 0 20px 20px 20px;
    display: none;
}

.filter-content.active {
    display: block;
}

.filter-checkbox {
    display: block;
    position: relative;
    padding: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    transition: color 0.2s ease;
    line-height: 18px;
    padding-left: 22px;
}

.filter-checkbox:hover {
    color: #333;
}

.filter-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 8px;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-checkbox:hover .checkmark {
    border-color: #bbb;
}

.filter-checkbox input:checked~.checkmark {
    background-color: var(--accent-color, #6907c5);
    border-color: var(--accent-color, #6907c5);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox input:checked~.checkmark:after {
    display: block;
}

.range-slider {
    padding: 10px 0;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    transition: background 0.2s ease;
}

.slider:hover {
    background: #ccc;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color, #6907c5);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color, #6907c5);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Product Grid*/
.products-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e9ecef;
}

.results-count {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

#sort-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

#sort-select:focus {
    outline: none;
    border-color: var(--accent-color, #6907c5);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 25px 30px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.discount {
    background: #ff4444;
    color: white;
}

.badge.popular {
    background: #ff9500;
    color: white;
}

.badge.new {
    background: #00b894;
    color: white;
    width: fit-content;
}

.product-details {
    padding: 16px;
    position: relative;
}

.product-title-link {
    text-decoration: none;
    color: inherit;
}

.product-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.spec-tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

/* Condition-Based Spec Tags */
.spec-tag.condition-new {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c8 100%);
    color: #2e7d2e;
    border: 1px solid #a8d8a8;
}

.spec-tag.condition-used {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #f6d55c;
}

.spec-tag.condition-like {
    background: linear-gradient(135deg, #e2e3ff 0%, #c5c6ff 100%);
    color: #4c4cdb;
    border: 1px solid #a5a6ff;
}

.spec-tag.brand-nvidia {
    background: linear-gradient(135deg, #adf3ad 20%, #7ccf7c 100%);
    color: #2d5016;
    border: 1px solid #76b900;
}

.spec-tag.brand-amd {
    background: linear-gradient(135deg, #fff0f0 0%, #ffcccc 100%);
    color: #cc0000;
    border: 1px solid #ff6666;
}

.spec-tag.brand-intel {
    background: linear-gradient(135deg, #d0ddfc 20%, #969df5 100%);
    color: #0a72da;
    border: 1px solid #66b3ff;
}

.spec-tag.red {
    background: linear-gradient(135deg, #fff0f0 0%, #ffcccc 100%);
    color: #cc0000;
    border: 1px solid #ff6666;
}

.spec-tag.yellow {
    background: linear-gradient(135deg, #fff8dc 0%, #f0e68c 100%);
    color: #8b7355;
    border: 1px solid #daa520;
}

.spec-tag.pink {
    background: linear-gradient(135deg, #ffe6ff 0%, #ffb3ef 100%);
    color: #bb00cc;
    border: 1px solid #ed66ff;
}

.spec-tag.green {
    background: linear-gradient(135deg, #87f794 40%, #30c55d 100%);
    color: #0a3316;
    border: 1px solid #149c32;
}

.spec-tag.rgb {
    background: linear-gradient(135deg, #eb8b8b 40%, #9f59e0 100%);
    color: #fff;
}

.spec-tag.light-blue {
    background: linear-gradient(135deg, #f0f8ff 0%, #d1e7ff 100%);
    color: #1e4a5f;
    border: 1px solid #87ceeb;
}

.spec-tag.tier-overkill {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    color: #721c24;
    border: 1px solid #e89ca5;
}

.spec-tag.storage {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d3748;
}

.spec-tag.cooling {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.spec-tag.wifi {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #2d3748;
    border: 1px solid #f6ad55;
}

.product-price {
    margin-bottom: 10px;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-color, #6907c5);
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-seller {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
}

.seller-name {
    color: #666;
    font-weight: 500;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ff9500;
}

.seller-rating span {
    color: #666;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    background-color: white;
}

.wishlist-btn i {
    color: var(--accent-color);
    font-size: 14px;
}

.wishlist-btn:hover i {
    color: var(--accent-color);
}

.wishlist-btn.active i {
    color: var(--accent-color);
}

.card-menu-toggle {
    position: absolute;
    top: 10px;
    right: 50px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}

.card-menu-toggle i {
    color: #666;
    font-size: 12px;
}

.card-dropdown {
    position: absolute;
    top: 45px;
    right: 50px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: fit-content;
    z-index: 5;
    display: none;
}

.dropdown-option {
    display: block;
    padding: 8px 16px;
    color: #333;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-radius: 8px;
}

.dropdown-option:hover {
    background-color: var(--accent-color);
    color: white;
}

.add-to-cart-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(270deg, #a71c1c, #6907c5, #a71c1c, #6907c5);
    background-size: 300% 100%;
    background-position: 0% 0%;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 34px;
    height: 34px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease, background-position 0.6s ease;
}

.add-to-cart-btn:hover {
    background-position: 100% 0%;
    transform: scale(1.1);
}

.load-more-section {
    text-align: center;
    padding: 30px;
    border-top: 1px solid #e9ecef;
}

.load-more-btn {
    background: var(--accent-color, #6907c5);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.load-more-btn:hover {
    background: #5506a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(105, 7, 197, 0.3);
}

.listing-counter {
    font-size: 14px;
    color: #666;
}

.listing-counter strong {
    color: #333;
}

/* No Products Message */
.no-products-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    grid-column: 1 / -1;
    /* Span full width of grid */
    background: rgba(var(--accent-color-rgb), 0.1);
    border-radius: 20px;
    border: 2px dashed var(--accent-color);
}

.no-products-message i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.no-products-message h3 {
    color: black;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
}

.no-products-message p {
    color: black;
    font-size: 14px;
    max-width: 400px;
}

/* --- Product Listing Section End --- */


/* --- Global Responsiveness Start --- */
@media (max-width: 1440px) {
    .listing-container {
        grid-template-columns: 250px 1fr;
        gap: 25px;
    }

    .filter-header {
        padding: 12px 16px;
    }

    .filter-content {
        padding: 0 18px 6px 18px;
    }

    .checkmark:after {
        width: 2px;
        height: 6px;
        top: 1px;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        padding: 20px 25px;
    }

    #sort-select option {
        font-size: 10px;
    }

    .product-image {
        height: 150px;
    }

    .product-title {
        margin-bottom: 6px;
    }

    .current-price {
        font-size: 16px;
    }

    .original-price {
        font-size: 12px;
    }

    .seller-name {
        font-size: 12px;
    }

    .no-products-message i {
        font-size: 40px;
    }

    .no-products-message h3 {
        font-size: 20px;
    }

    .no-products-message p {
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .listing-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filters-sidebar {
        position: static;
        order: 2;
    }

    .products-main {
        order: 1;
    }

    .seller-rating {
        font-size: 10px;
    }

    .seller-rating span {
        font-size: 8px;
    }
}

@media (max-width: 768px) {
    .product-listing-section {
        padding: 20px 0 40px;
    }
    
    .product-image {
        height: 125px;
    }

    .add-to-cart-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .badge {
        font-size: 10px;
        padding: 3px 6px;
    }  
}

@media (max-width: 480px) {
    .product-listing-section,
    #storage.product-listing-section {
        padding: 20px 0;
    }

    .results-count {
        font-size: 10px;
    }

    .sort-controls label {
        font-size: 10px;
    }

    #sort-select {
        font-size: 10px;
        border-radius: 10px;
        padding: 4px 6px;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px 15px;
    }

    .product-image {
        height: 110px;
    }

    .product-details {
        padding: 10px;
    }

    .product-title {
        font-size: 11px;
    }

    .current-price {
        font-size: 13px;
    }

    .original-price,
    .seller-name {
        font-size: 10px;
    }

    .spec-tag {
        padding: 2px 4px;
    }

    .badge {
        font-size: 8px;
        padding: 2px 4px;
    }

    .add-to-cart-btn,
    .wishlist-btn {
        width: 26px;
        height: 26px;
        font-size: 10px;
        bottom: 8px;
        right: 8px;
    }

    .card-menu-toggle {
        width: 26px;
        height: 26px;
        font-size: 10px;
        bottom: 8px;
        right: 40px;
    }

    .wishlist-btn i,
    .card-menu-toggle i {
        font-size: 12px;
    }

    .load-more-section {
        padding: 16px;
    }

    .listing-counter {
        font-size: 12px;
    }

    .load-more-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .no-products-message {
        padding: 20px;
        margin: 12px auto;
    }

    .no-products-message i {
        font-size: 32px;
    }

    .no-products-message h3 {
        font-size: 16px;
    }

    .no-products-message p {
        font-size: 11px;
    }
}

/* --- Global Responsiveness End --- */