/* --- Hero Section Start --- */
.hero-container {
    padding: 40px 0 0;
    width: 100%;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-section {
    max-width: min(85%, var(--section-max-width));
    width: 100%;
    margin: 0 auto;
    background-color: #1d1d1d;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 20vh;
    transition: max-width 0.4s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

#pc-cases .hero-section {
    height: 10vh;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#pc-cases .hero-title {
    color: black;
    margin-bottom: 0;
}

#motherboards .hero-title {
    font-size: 38px;
    font-weight: 600;
    margin-bottom: 0;
}

.hero-video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.video-control {
    position: absolute;
    top: 5%;
    right: 1.2%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 15;
    padding: 0;
}

.video-control i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.video-control:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.7);
}

.hero-video-wrapper:hover .video-control {
    opacity: 0.7;
}

.video-control:focus {
    outline: none;
    opacity: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    max-width: 80%;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
}

.hero-msg-bar {
    max-width: min(80%, var(--section-max-width));
    width: 100%;
    margin: -1.4% auto 0;
    background-color: white;
    border-radius: 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: max-width 0.4s ease-out;
    z-index: 10;
}

.info-message {
    display: flex;
    align-items: center;
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

.info-message i {
    margin-right: 10px;
    color: var(--accent-color);
    font-size: 18px;
}

/* --- Hero Section End --- */


/* --- Product Listing Section Start --- */
.product-listing-section {
    background-color: #f8f9fa;
    padding: 30px 0;
}

#power-supplies.product-listing-section,
#motherboards.product-listing-section,
#ram.product-listing-section,
#pc-cases.product-listing-section {
    padding: 60px 30px;
}

.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: 20px 20px 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.filters-header h3 {
    margin: 0;
    font-size: 18px;
    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: 18px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-header:hover {
    background-color: #f8f9fa;
}

.filter-header h4 {
    margin: 0;
    font-size: 15px;
    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: 14px;
    color: #555;
    transition: color 0.2s ease;
    line-height: 18px;
}

.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: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-checkbox {
    padding-left: 34px;
}

.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: 0;
    width: 4px;
    height: 8px;
    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: 15px;
    font-weight: 600;
    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: 9px;
    font-weight: 600;
    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: #363636;
    border: 1px solid #6907c5;
}

.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: 700;
    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: 1400px) {
    .hero-section {
        max-width: min(85%, var(--section-max-width));
        height: 25vh;
    }

    .hero-title {
        font-size: 28px;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-msg-bar {
        max-width: fit-content;
        padding: 12px 25px;
    }

    #pc-hero .hero-msg-bar {
        max-width: min(80%, var(--section-max-width));
    }

    .info-message {
        font-size: 14px;
    }

    .info-message i {
        font-size: 16px;
    }

    .listing-container {
        grid-template-columns: 250px 1fr;
        gap: 25px;
    }

    .filters-header {
        padding: 16px 18px;
    }

    .filters-header h3 {
        font-size: 16px;
    }

    .filter-header {
        padding: 14px 18px;
    }

    .filter-header h4 {
        font-size: 13px;
    }

    .filter-content {
        padding: 0 18px 6px 18px;
    }

    .filter-checkbox {
        font-size: 12px;
        padding-left: 22px;
    }

    .checkmark {
        width: 16px;
        height: 16px;
    }

    .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 {
        font-size: 13px;
        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) {
    .hero-section {
        max-width: min(90%, var(--section-max-width));
        height: 16vh;
    }

    .hero-title {
        font-size: 26px;
        font-weight: 600;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-msg-bar {
        margin: -2% auto 0;
        padding: 10px 20px;
        border-radius: 14px;
    }

    #pc-hero .hero-msg-bar {
        display: none;
    }

    .info-message {
        font-size: 12px;
    }

    .info-message i {
        font-size: 15px;
        margin-right: 8px;
    }

    .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) {
    .hero-container {
        padding: 20px 0 0;
    }

    .hero-section {
        max-width: min(90%, var(--section-max-width));
        margin: 0;
    }

    .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) {
    .hero-section {
        max-width: min(95%, var(--section-max-width));
    }

    .hero-container {
        padding: 0;
    }

    .hero-title {
        font-size: 16px;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 10px;
        font-weight: 500;
        max-width: 100%;
    }

    .video-control {
        width: 24px;
        height: 24px;
        top: 4%;
        right: 2%;
    }

    .video-control i {
        font-size: 9px;
    }

    .hero-msg-bar {
        margin: -4% auto 0;
        border-radius: 10px;
    }

    .info-message {
        font-size: 10px;
    }

    .info-message i {
        font-size: 12px;
    }

    .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 {
        font-size: 8px;
        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 --- */