:root {
    --primary-blue: #2575FC;
    --primary-gradient: linear-gradient(135deg, #6A11CB 0%, #2575FC 100%);
    --accent-yellow: #FFC107;
    --accent-red: #FF3D00;
    --bg-light: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(37, 117, 252, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Floating Glass Navbar */
header {
    background: var(--primary-gradient);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(37, 117, 252, 0.2);
}

.top-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.72rem;
    opacity: 0.9;
}

/* Search Bar & Dropdown */
.search-container {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 4px 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
}

.search-container input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.search-container button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    margin-top: 8px;
    z-index: 1000;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    border: 1px solid var(--border-color);
}

.search-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f1f5f9;
}

.search-result-item img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.cart-icon-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: transform 0.2s;
}

.cart-icon-btn:hover {
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--accent-red);
    color: white;
    font-weight: 900;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.btn-auth-header {
    background: var(--accent-yellow);
    color: black;
    border: none;
    font-weight: 800;
    padding: 9px 22px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    transition: transform 0.2s;
}

.btn-auth-header:hover {
    transform: scale(1.05);
}

/* Main Layout */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

/* Banner Carousel */
.banner-carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 22px;
    border-radius: 10px;
    background: var(--primary-blue);
}

.banner-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
    z-index: 5;
}

.banner-nav-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.1);
}

.banner-nav-btn.prev {
    left: 15px;
}

.banner-nav-btn.next {
    right: 15px;
}

/* Mega Banner */
.promo-banner {
    background: var(--primary-gradient);
    color: white;
    border-radius: 28px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.promo-tag {
    color: var(--accent-yellow);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.promo-title {
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 8px;
}

.btn-shop-now {
    background: var(--accent-yellow);
    color: black;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Feature Cards */
.features-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.feature-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(37, 117, 252, 0.1);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Categories Scroll Row */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 900;
}

.categories-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 25px;
    scrollbar-width: thin;
}

.category-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 80px;
}

.category-img-box {
    width: 75px;
    height: 75px;
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.category-chip.active .category-img-box {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.badge-offer {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-yellow);
    color: black;
    font-weight: 900;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 8px;
    z-index: 2;
}

.badge-discount {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--accent-red);
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 8px;
    z-index: 2;
}

.btn-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: var(--text-muted);
    z-index: 2;
}

.btn-wishlist.active {
    color: var(--accent-red);
}

.product-card-img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    background: #f1f5f9;
    cursor: pointer;
}

.product-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    cursor: pointer;
}

.product-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
}

.price-main {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary-blue);
}

.price-old {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Quantity Counter / Add Button */
.qty-btn-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(37, 117, 252, 0.1);
    border-radius: 14px;
    padding: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: var(--primary-blue);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
}

.qty-count {
    font-weight: 800;
    font-size: 1rem;
    padding: 0 10px;
}

.btn-add-main {
    width: 100%;
    padding: 10px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-add-main:hover {
    transform: translateY(-1px);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-box {
    background: white;
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    max-height: 90vh;
    overflow-y: auto;
}

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    font-size: 0.95rem;
}

.form-field input:focus { border-color: var(--primary-blue); }

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0; right: -400px;
    width: 100%; max-width: 380px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active { right: 0; }

.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.data-table th { background: #f8fafc; font-weight: 700; }

footer {
    background: #0f172a;
    color: white;
    text-align: center;
    padding: 25px 20px;
    margin-top: auto;
}
