:root {
    --divine-white: #ffffff;
    --divine-silver: #dce8f1;
    --divine-gold: #f7c842;
    --quantum-space: #0a0e1a;
    --quantum-void: #050811;
    --quantum-glow: #0ff;
    --hologram-purple: #9d4edd;
}
/* Banner */
.background-banner {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.background-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 0 2rem;
}

.background-title h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--divine-gold), var(--quantum-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 128, 55, 0.4);
    letter-spacing: 2px;
    line-height: 1.2;
}

/* Structure */
.structure {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

main {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.content {
    margin-top: -190px;
    flex: 4;
    min-width: 300px;
}

aside {
    flex: 1;
    min-width: 290px;
    position: relative; /* Added for proper positioning */
    margin-top: -20px; /* Match the content margin */
}

.space {
    height: 2rem;
}

/* Sidebar fixes */
.sidebar {
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar h1 {
    font-size: 1.5rem;
    color: var(--divine-gold);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(247, 200, 66, 0.3);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list a {
    display: block;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--divine-silver);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid var(--divine-gold);
    position: relative;
    overflow: hidden;
}

.category-list a:hover {
    background: rgba(0, 0, 0, 0.5);
    color: var(--divine-gold);
    transform: translateX(5px);
}

/* Product Cards */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    perspective: 1000px;
    height: 100%;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        var(--quantum-glow),
        var(--divine-gold),
        var(--hologram-purple));
    z-index: -1;
    border-radius: 22px;
    opacity: 0.5;
    animation: gradientRotate 8s linear infinite;
    background-size: 400% 400%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.2);
    border: 1px solid var(--quantum-glow);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    transform: translateZ(30px);
}

.card:hover img {
    transform: scale(1.05) translateZ(30px);
}

.card .title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--divine-white);
    transform: translateZ(40px);
}

.card .title a {
    color: var(--divine-white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.card .title a:hover {
    color: var(--divine-gold);
    text-shadow: 0 0 10px rgba(247, 200, 66, 0.5);
}

.card .desc {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--divine-silver);
    flex-grow: 1;
    transform: translateZ(30px);
}

.read_more {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(to right, var(--quantum-space), var(--quantum-void));
    color: var(--divine-gold);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 1px solid var(--divine-gold);
    text-align: center;
    transform: translateZ(50px);
}

.read_more:hover {
    background: linear-gradient(to right, var(--divine-gold), var(--quantum-glow));
    color: var(--quantum-space);
    box-shadow: 0 0 20px var(--divine-gold);
    transform: translateY(-3px) translateZ(50px);
}

/* Featured Section */
header {
    text-align: center;
    margin: 3rem 0;
}

header h1 {
    font-size: 2.5rem;
    color: var(--divine-white);
    text-shadow: 0 0 10px rgba(220, 232, 241, 0.3);
}

/* Slider */
.slider {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
    margin-bottom: 3rem;
}

.products-track {
    display: flex;
    animation: scrollProducts 30s linear infinite;
    width: calc(300px * 14);
}

.bg-card {
    width: 300px;
    height: 380px;
    margin: 0 15px;
    background: rgba(10, 14, 26, 0.7);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.bg-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 255, 255, 0.3);
    border: 1px solid var(--quantum-glow);
}

.bg-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
    transform: translateZ(30px);
}

.bg-card:hover img {
    transform: scale(1.1) translateZ(30px);
}

.bg-card .title {
    padding: 1rem;
    font-size: 1.3rem;
    color: var(--divine-gold);
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    transform: translateZ(40px);
}

.bg-card .read_more {
    display: block;
    margin: 1rem auto;
    width: max-content;
    transform: translateZ(50px);
}

/* Error Message */
.error {
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.3);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.error p {
    color: #ff6666;
    font-size: 1.2rem;
}

/* Animations */
@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

@keyframes scrollProducts {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-300px * 7)); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .background-title h1 {
        font-size: 3rem;
    }

    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .background-banner {
        height: 300px;
    }

    .content {
        margin-top: -300px;
    }

    aside {
        margin-top: 0;
        position: static;
    }

    .sidebar {
        position: static;
        max-height: none;
    }

    .background-title h1 {
        font-size:1.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .products-track {
        animation: scrollProducts 60s linear infinite;
    }

    main {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .background-title h1 {
        font-size: 1.8rem;
    }

    .container {
        grid-template-columns: 1fr;
    }

    .bg-card {
        width: 280px;
        height: 360px;
    }
}
