:root {
    /* Color Palette from header.php */
    --dark-dashboard-1: #1C2526;
    --dark-dashboard-2: #2E3A3B;
    --accent-cyan: #33C1CF;
    --hover-cyan: #069BAA;
    --text-light: #D3D8D9;
    --metallic-accent: #3F4E50;
    --content-bg-1: #f5f7fa;
    --content-bg-2: #e4e9f0;
    --offer-bg: #FFF5B7;
    --timer-red: #940924;
    --success-green: #28A745;
    --border-gray: #E0E0E0;
    --card-bg: #2A3738;
    --card-border: #4A5A5C;
}

body {
    background: linear-gradient(135deg, var(--dark-dashboard-1), var(--dark-dashboard-2));
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    padding: 70px 0 10px;
    background: var(--dark-dashboard-1);
}

.category-chips, .filter-section, .product-slider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Amazon-Style Category Chips */
.category-chips {
    position: relative;
    margin-bottom: 10px;
}

.category-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 10px 0 20px 0;
}

.category-slider::-webkit-scrollbar { 
    display: none; 
}

.category-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    width: auto;
    max-width: 180px;
    height: 60px;
    padding: 10px 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
    line-height: 1.2;
    word-wrap: break-word;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* Amazon-style colors with bright text and slightly dimmed backgrounds */
.category-chip:nth-child(12n+1) { 
    background: #3A7BC8;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+2) { 
    background: #D4951C;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+3) { 
    background: #66B81A;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+4) { 
    background: #42C2A2;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.category-chip:nth-child(12n+5) { 
    background: #9A0DB8;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+6) { 
    background: #E5588A;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+7) { 
    background: #E67535;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+8) { 
    background: #5B4FD1;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+9) { 
    background: #00A8A3;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.category-chip:nth-child(12n+10) { 
    background: #E6B85C;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.category-chip:nth-child(12n+11) { 
    background: #C85D45;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.category-chip:nth-child(12n+12) { 
    background: #5FA3E6;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Simple icon illustrations using CSS */
.category-chip::before {
    content: '' !important;
    position: absolute !important;
    top: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    background: currentColor !important;
    opacity: 0.3 !important;
    border-radius: 3px !important;
    margin-bottom: 8px !important;
}

/* Different icon shapes for variety */
.category-chip:nth-child(6n+1)::before {
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
}

.category-chip:nth-child(6n+2)::before {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
}

.category-chip:nth-child(6n+3)::before {
    background: none;
    border: 3px solid currentColor;
    opacity: 0.4;
    border-radius: 4px;
}

.category-chip:nth-child(6n+4)::before {
    background: none;
    border: 3px solid currentColor;
    opacity: 0.4;
    border-radius: 50%;
}

.category-chip:nth-child(6n+5)::before {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border-radius: 0;
}

.category-chip:nth-child(6n+6)::before {
    background: none;
    border: 4px solid currentColor;
    border-radius: 0;
    opacity: 0.3;
    transform: translateX(-50%) rotate(45deg);
}

/* Active State */
.category-chip.active {
    background: var(--accent-cyan) !important;
    color: #ffffff !important;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(51, 193, 207, 0.3);
}

.category-chip.active::before {
    opacity: 0.4;
}

.category-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: none;
    color: var(--text-light);
    z-index: 10;
}

.category-nav.prev { left: -20px; }
.category-nav.next { right: -20px; }
.category-chips:hover .category-nav { display: flex; align-items: center; justify-content: center; }

.filter-section {
    background: rgba(63, 78, 80, 0.4);
    border: 1px solid var(--metallic-accent);
    border-radius: 8px;
}

.filter-btn {
    background: rgba(63, 78, 80, 0.4);
    border: 1px solid var(--metallic-accent);
    border-radius: 2px;
    padding: 10px 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.filter-curtain {
    position: fixed;
    top: 20%;
    right: -350px;
    width: 320px;
    height: 60%;
    background: var(--dark-dashboard-2);
    box-shadow: -4px 0 12px rgba(0,0,0,0.3);
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 1100;
    border-radius: 8px;
    border: 1px solid var(--metallic-accent);
}

.filter-curtain.active { right: 20px; }

.filter-curtain .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
}

.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1099;
}

.filter-group { margin-bottom: 15px; }

.filter-group h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-light);
}

.filter-subgroup { margin-left: 15px; margin-bottom: 10px; }

.filter-subgroup label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-light);
}

.filter-search {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--metallic-accent);
    border-radius: 4px;
    margin-bottom: 15px;
    box-sizing: border-box;
    background: var(--dark-dashboard-1);
    color: var(--text-light);
}

.filter-search:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.product-slider {
    position: relative;
    margin-bottom: 40px;
    background: rgba(63, 78, 80, 0.4);
    border: 1px solid var(--metallic-accent);
    border-radius: 8px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slider-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-light);
}

.see-all-btn {
    font-size: 14px;
    color: var(--accent-cyan);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.see-all-btn:hover {
    background-color: var(--accent-cyan);
    color: #fff;
}

.slider-container {
    display: grid;
    grid-auto-flow: column;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.slider-container::-webkit-scrollbar { display: none; }

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 15px;
    width: 220px;
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.product-image {
    width: 100%;
    height: 180px;
    background: var(--dark-dashboard-2);
    border-radius: 8px;
    margin-bottom: 12px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: filter 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-price { margin-bottom: 10px; }

.price-dropdown {
    width: 100%;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    background: var(--card-bg) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24"><path fill="%2333C1CF" d="M7 10l5 5 5-5z"/></svg>') no-repeat right 8px center;
    background-size: 10px;
    cursor: pointer;
    appearance: none;
}

.price-dropdown:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.rent-btn {
    background: var(--accent-cyan);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    transition: background-color 0.3s ease;
    width: 100%;
}

.rent-btn:hover {
    background: var(--hover-cyan);
}

.rent-btn.added { background: var(--success-green); }

.rent-btn.added::after {
    content: '✓';
    position: absolute;
    right: 8px;
    font-size: 16px;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: none;
    color: var(--text-light);
}

.slider-nav.prev { left: -20px; }
.slider-nav.next { right: -20px; }
.product-slider:hover .slider-nav { display: block; }

@media (max-width: 767px) {
    main { padding: 85px 0 60px; }
    .category-chips, .product-slider { padding: 10px; }
    .category-slider {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        gap: 10px;
        padding: 8px 0 15px 0;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
    }
    .category-slider::-webkit-scrollbar { display: none; }
    .category-chip {
        min-width: 130px;
        width: auto;
        max-width: 180px;
        height: auto;
        min-height: 30px;
        font-size: 14px;
        font-weight: 700;
        padding: 20px 12px;
        line-height: 1.2;
    }
    .category-chip::before {
        width: 20px;
        height: 20px;
        top: 15px;
    }
    .category-nav, .slider-nav { display: none !important; }
    .filter-curtain {
        width: 100%;
        height: 70%;
        right: -100%;
        border-radius: 0;
    }
    .filter-curtain.active { right: 0; }
    .product-card { width: 180px; }
    .slider-title { font-size: 18px; }
    .product-price { font-size: 12px; }
    .price-dropdown { font-size: 12px; padding: 4px 6px; }
    .filter-search { font-size: 12px; padding: 6px 10px; }
    .see-all-btn { font-size: 12px; padding: 4px 8px; }
    .product-slider { margin-bottom: 0px; }
}

@media (min-width: 768px) {
    .category-slider { grid-template-columns: none; grid-template-rows: none; }
    .category-chip { height: auto; }
}