:root {
    --clr-bg: #fdfdfd;
    --clr-surface: #ffffff;
    --clr-text: #1a1a1a;
    --clr-text-muted: #64748b;
    --clr-primary: #0f172a;
    --clr-accent: #d4af37; /* Gold accent */
    --clr-border: #e2e8f0;
    
    --nav-height: 70px;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html, body {
    overflow-x: hidden;
}
body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; }
a { text-decoration: none; color: inherit; }

/* Buttons */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}
.btn-primary {
    background: var(--clr-primary);
    color: white;
}
.btn-primary:hover {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-logo i { color: var(--clr-accent); }

.search-bar {
    position: relative;
    width: 400px;
}
.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--clr-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--clr-text-muted);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--clr-primary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.icon-btn:hover { color: var(--clr-accent); }

.cart-btn {
    display: flex;
    align-items: center;
}
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--clr-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Layout */
.app-layout {
    display: flex;
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* Left Sidebar */
.left-sidebar {
    width: var(--sidebar-width);
    background: var(--clr-surface);
    border-right: 1px solid var(--clr-border);
    padding: 2rem 0;
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    overflow-y: auto;
    z-index: 900;
}
.sidebar-menu {
    list-style: none;
}
.sidebar-menu li {
    margin-bottom: 4px;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 2rem;
    color: var(--clr-text-muted);
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}
.sidebar-menu li.active a, .sidebar-menu a:hover {
    color: var(--clr-primary);
    background: #f1f5f9;
    border-right: 3px solid var(--clr-accent);
}
.menu-divider {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1px;
    padding: 1.5rem 2rem 0.5rem;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Banner */
.banner-carousel {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
}
.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding-left: 4rem;
    transition: opacity 0.8s ease-in-out;
    opacity: 0;
}
.banner-slide:first-child {
    opacity: 1;
}
.banner-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}
.banner-content {
    position: relative;
    color: white;
    max-width: 500px;
    z-index: 10;
}
.banner-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Announcement Bar */
.announcement-bar {
    height: var(--nav-height);
    background: var(--clr-primary);
    color: white;
    display: flex;
    align-items: center;
}
.speaker-icon {
    width: var(--nav-height);
    height: var(--nav-height);
    background: var(--clr-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.marquee-container {
    flex-grow: 1;
    overflow: hidden;
    padding: 0 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Top 5 Products Section */
.top-products-section {
    display: flex;
    padding: 2rem;
    gap: 2rem;
    background: #f8fafc;
}
.top-product-left {
    width: 50%;
}
.top-product-right {
    width: 50%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}
.product-card {
    background: var(--clr-surface);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--clr-border);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.5s;
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: white;
}
.product-info h3 { font-size: 1.5rem; margin-bottom: 4px; }
.product-info h4 { font-size: 1.1rem; margin-bottom: 2px; }
.product-info .price {
    font-weight: 600;
    color: var(--clr-accent);
}

.rank-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--clr-accent);
    color: var(--clr-primary);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1.1rem;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.rank-badge.small {
    padding: 4px 10px;
    font-size: 0.9rem;
}

.rank-1 { height: 600px; }
.rank-minor { height: 292px; }

/* Section Divider */
.section-divider {
    padding: 3rem 2rem 1rem;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-primary);
    border-bottom: 2px solid var(--clr-border);
    margin: 0 2rem;
}

/* Catalog Layout */
.catalog-layout {
    display: flex;
    padding: 2rem;
    gap: 2rem;
}

/* Products Grid */
.products-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}
.product-card.regular {
    height: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}
.product-card.regular:hover {
    transform: translateY(-5px);
    box-shadow: none;
}
.product-card.regular img {
    height: 300px;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.product-card.regular .product-info {
    position: relative;
    background: none;
    color: var(--clr-text);
    padding: 0;
}
.product-card.regular .product-info h4 {
    font-weight: 500;
}
.product-card.regular .product-info .price {
    font-weight: 700;
    color: var(--clr-primary);
}

.card-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.product-card.regular:hover .card-overlay {
    opacity: 1;
}
.add-to-cart {
    background: var(--clr-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.add-to-cart:hover {
    transform: scale(1.1);
    background: var(--clr-accent);
}

/* Right Sidebar Filters */
.right-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    height: max-content;
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--clr-border);
}
.filter-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--clr-primary);
}

/* Slider */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    outline: none;
    margin: 15px 0;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--clr-primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--clr-primary);
}
.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--clr-text-muted);
}

/* Brands Checkbox */
.brand-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.brand-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--clr-text);
}
.brand-item input {
    accent-color: var(--clr-primary);
    width: 16px;
    height: 16px;
}

/* Color grid */
.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.color-swatch:hover {
    transform: scale(1.15);
}

/* Footer */
.site-footer {
    background: var(--clr-primary);
    color: white;
    padding: 4rem;
    display: flex;
    justify-content: space-between;
    margin-left: var(--sidebar-width);
}
.footer-left, .footer-right {
    width: 45%;
}
.footer-right {
    text-align: right;
}
.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--clr-accent);
}
.footer-company {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.footer-detail {
    margin-bottom: 0.8rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-right .footer-detail {
    justify-content: flex-end;
}
.footer-detail i {
    color: var(--clr-accent);
    width: 20px;
    text-align: center;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}
.footer-right .social-links {
    justify-content: flex-end;
}
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.2s;
}
.social-links a:hover {
    background: var(--clr-accent);
    color: var(--clr-primary);
    transform: translateY(-3px);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Responsive Mobile Styles */
@media (max-width: 768px) {
    .left-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .left-sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem !important;
    }
    .nav-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .nav-middle {
        display: none; /* Hide search bar on mobile to save space */
    }

    .catalog-layout {
        flex-direction: column-reverse;
        padding: 0 !important;
    }
    .right-sidebar {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        display: flex;
        overflow-x: auto;
        gap: 2rem;
    }
    .filter-section {
        flex: 0 0 auto;
        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 1rem !important;
    }
    .brand-list {
        flex-direction: row !important;
        flex-wrap: nowrap;
        gap: 1.5rem !important;
    }
    .color-grid {
        flex-wrap: nowrap !important;
    }
    .banner-carousel {
        height: 250px !important;
    }
    .banner-content h2 {
        font-size: 1.8rem !important;
    }
    .top-nav {
        padding: 0 1rem !important;
    }
    /* Add a hamburger menu icon to nav */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 10px;
    }
    .product-card.regular img {
        height: auto !important;
        aspect-ratio: 1 / 1;
        margin-bottom: 0.5rem;
    }
    .product-card.regular .product-info h4 {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .product-card.regular .product-info .price {
        font-size: 0.95rem;
    }
    .card-overlay {
        opacity: 1 !important;
        top: 0.5rem;
        right: 0.5rem;
    }
}
