* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0f172a;
    color: white;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
}

/* ================= HEADER ================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-content {
    min-height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #38bdf8;
    font-size: 2rem;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username-display {
    color: #cbd5e1;
    font-size: 15px;
}

#username-text {
    color: #38bdf8;
    font-weight: bold;
}

.cart-icon {
    position: relative;
    color: white;
    transition: .3s;
}

.cart-icon:hover {
    color: #38bdf8;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logout-btn {
    border: none;
    background: #ef4444;
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: .3s;
    font-weight: 600;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ================= SLIDER ================= */

.slider-section {
    padding: 40px 20px;
}

.slider-container {
    max-width: 1300px;
    height: 500px;
    margin: auto;
    position: relative;
    background: #1e293b;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s ease;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    padding: 40px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;

    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;

    border: 2px solid #38bdf8;

    z-index: 100;
    transition: .3s;
}

.slider-btn:hover {
    background: #38bdf8;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 15px;
    box-shadow: 0 0 20px rgba(56, 189, 248, .5);
}

.next {
    right: 15px;
    box-shadow: 0 0 20px rgba(56, 189, 248, .5);
}

/* ================= PRODUCTS ================= */

.products-section {
    padding: 70px 0;
}

.products-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}

.product-card {
    background: #1e293b;
    border-radius: 20px;
    overflow: hidden;
    transition: .35s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .3);
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: #38bdf8;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: white;
    padding: 20px;
}

.product-info {
    padding: 18px;
}

.product-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    height: 48px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-price {
    color: #38bdf8;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: .3s;
}

.btn-primary {
    background: #38bdf8;
    color: white;
}

.btn-primary:hover {
    background: #0284c7;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #38bdf8;
    color: #38bdf8;
}

.btn-secondary:hover {
    background: #38bdf8;
    color: white;
}

/* ================= SCROLL TOP ================= */

.scroll-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: #38bdf8;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(56, 189, 248, .4);
    transition: .3s;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .slider-container {
        height: 280px;
    }

    .slide img {
        padding: 20px;
    }

    .products-section h2 {
        font-size: 1.8rem;
    }

    .product-buttons {
        flex-direction: column;
    }
}