@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Montserrat:wght@700;800&display=swap');

:root {
    --bg-deep: #0a0e14; /* Midnight Navy instead of pure black */
    --bg-card: rgba(22, 27, 34, 0.7);
    --teal-glow: #00ffd5;
    --gold-glow: #d4a853;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --danger: #ff4d4d;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 213, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(212, 168, 83, 0.05) 0%, transparent 40%);
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.alert-success {
    background: rgba(0, 255, 213, 0.15);
    color: var(--teal-glow);
    border: 1px solid var(--teal-glow);
}

.alert-danger {
    background: rgba(255, 77, 77, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(5, 8, 10, 0.8);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--teal-glow), var(--gold-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a:hover {
    color: var(--teal-glow);
    text-shadow: 0 0 10px var(--teal-glow);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
}

/* Hero Section */
.hero {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8)), 
                url('https://images.unsplash.com/photo-1510443900742-53b318d17f09?auto=format&fit=crop&q=80&w=1920') center/cover no-repeat;
    position: relative;
    border-radius: 30px;
    margin: 1rem 5%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--bg-deep), transparent);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -2px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero h1 span {
    color: var(--teal-glow);
    text-shadow: 0 0 30px rgba(0, 255, 213, 0.6);
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 500px;
        padding: 4rem 1rem;
        margin: 0;
        border-radius: 0;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--teal-glow);
    box-shadow: 0 10px 30px rgba(0, 255, 213, 0.1);
}

/* Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(45deg, var(--teal-glow), #00b395);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--teal-glow);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold-glow);
    color: var(--gold-glow);
}

.btn-outline:hover {
    background: var(--gold-glow);
    color: #000;
}

.btn-sm {
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem !important;
}

/* Forms - Dark Theme (default) */
input, textarea, select {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 1rem;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--teal-glow);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 15px rgba(0, 255, 213, 0.15);
}

/* Fix for Select dropdown color */
select option {
    background: #111;
    color: #fff;
}

/* Forms - Light Theme (login, register white cards) */
.form-light input,
.form-light textarea,
.form-light select {
    background: #f5f5f5;
    border: 1.5px solid #ddd;
    color: #111;
    border-radius: 8px;
}

.form-light input:focus,
.form-light textarea:focus,
.form-light select:focus {
    border-color: var(--teal-glow);
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 255, 213, 0.2);
    color: #111;
}

.form-light label {
    color: #333 !important;
}


/* Product Card - Premium Grid Update */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-img-wrapper {
    width: 100%;
    height: 280px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.2rem;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    font-family: 'Montserrat';
    color: #fff;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    height: 3.2em; /* Keep it uniform */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold-glow);
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-glow);
}

/* Footer */
footer {
    padding: 4rem 5%;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-secondary);
}

/* Admin Panel Layout */
/* Admin Layout */
.admin-panel {
    background-color: var(--bg-dark);
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    padding: 2rem 1.5rem;
    background: rgba(13, 17, 23, 0.4);
    border-right: 1px solid var(--glass-border);
}

.admin-main {
    flex: 1;
    padding: 2rem 5%;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column; /* Force vertical stacking */
    gap: 0.5rem;
}

.admin-nav-item {
    display: flex; /* Flex but as a block */
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.admin-sidebar {
    width: 250px;
    background: #0d1117;
    position: fixed;
    height: 100vh;
}

.admin-main {
    margin-left: 250px; /* Strong fixed margin */
    padding: 3rem;
    min-height: 100vh;
    width: calc(100% - 250px);
}

.admin-panel .logo {
    margin-bottom: 3.5rem;
    display: block;
    text-align: center;
    font-size: 1.5rem;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
}

.table-glass {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table-glass th, .table-glass td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.table-glass th {
    color: var(--teal-glow);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: rgba(255, 191, 0, 0.2); color: var(--gold-glow); }
.badge-success { background: rgba(0, 255, 213, 0.2); color: var(--teal-glow); }
.badge-danger { background: rgba(255, 77, 77, 0.2); color: var(--danger); }

.stat-card {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 200px; /* Ensure cards don't get too narrow */
}

.stat-card h4 {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Montserrat';
    color: var(--teal-glow);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.8rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(0, 255, 213, 0.12);
    color: var(--teal-glow);
    transform: translateX(5px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Modal Simulation or Simple Section Styling */
.admin-section {
    margin-bottom: 3rem;
}

/* Ticker Banner */
.top-ticker {
    background: #000;
    color: #fff;
    padding: 8px 0;
    font-size: 0.82rem;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 2px solid var(--gold-glow);
    letter-spacing: 1px;
}
.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 30s linear infinite;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* User auth nav badge */
.nav-user {
    color: var(--teal-glow);
    font-weight: 600;
}

.thumb-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

/* --- CATEGORY SLIDER PREMIUM --- */
.category-slider-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    background: rgba(255,255,255,0.02);
    margin: 3rem 0;
}

.category-track {
    display: flex;
    width: fit-content;
    animation: scroll-left var(--speed, 40s) linear infinite;
}

.category-item {
    width: 300px;
    flex-shrink: 0;
    padding: 0 1rem;
}

.category-item-content {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: #111;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.category-item-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent 60%);
    z-index: 1;
}

.category-item-content img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: var(--transition);
}

.category-item:hover .category-item-content {
    border-color: var(--teal-glow);
    transform: translateY(-5px);
}

.category-item:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.category-info {
    position: relative;
    z-index: 2;
}

.category-info h3 {
    font-family: 'Montserrat';
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.3rem;
}

.category-info p {
    color: var(--teal-glow);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.category-slider-wrapper:hover .category-track {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .category-item {
        width: 200px;
    }
    .category-item-content {
        height: 250px;
        padding: 1rem;
    }
    .category-info h3 {
        font-size: 1rem;
    }
}

/* Mobile Responsive Admin */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    .admin-main {
        margin-left: 0;
        padding: 1.5rem;
    }
    .admin-nav-item {
        display: inline-flex;
        margin-right: 1rem;
        padding: 0.6rem 1rem;
    }
    .admin-panel .logo {
        margin-bottom: 1.5rem;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    background: #25d366;
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 99999 !important;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    animation: bounce 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float img {
    width: 25px;
    height: 25px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@media (max-width: 768px) {
    .whatsapp-float span {
        display: none;
    }
    .whatsapp-float {
        padding: 15px;
        right: 20px;
        bottom: 20px;
    }
}

/* --- MOBILE NAVIGATION SYSTEM --- */
#mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--glass-border);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    line-height: 1;
}

@media (max-width: 992px) {
    nav {
        padding: 1rem 5%;
        flex-wrap: wrap;
    }

    #mobile-menu-btn {
        display: block;
        order: 2;
    }

    .logo {
        font-size: 1.4rem;
        order: 1;
    }

    .nav-search {
        order: 4;
        max-width: 100% !important;
        width: 100% !important;
        margin: 1rem 0 0 !important;
    }

    .nav-links, .nav-auth {
        display: none; /* Hidden by default on mobile */
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem 0;
        background: var(--bg-deep);
        position: fixed;
        left: 0;
        top: 70px; /* Adjust based on header height */
        height: auto;
        border-bottom: 1px solid var(--glass-border);
        z-index: 1001;
    }

    .nav-links.active, .nav-auth.active {
        display: flex;
    }

    .nav-auth {
        top: auto;
        bottom: 0;
        flex-direction: row;
        justify-content: center;
        padding: 1rem;
        top: calc(70px + 180px); /* Position after links */
    }
    
    /* Better refined mobile nav */
    .nav-links.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 14, 20, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    
    .nav-auth.active {
        display: flex;
        position: absolute;
        top: calc(100% + 200px); /* Push it below links */
        left: 0;
        right: 0;
        background: rgba(10, 14, 20, 0.98);
    }
}

/* PROMO BANNER RESPONSIVE */
.promo-banner {
    display: flex;
    height: 300px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.promo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-content {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 3rem;
    background: linear-gradient(to right, rgba(255,255,255,0.95) 75%, transparent);
    color: #111;
}

@media (max-width: 768px) {
    .promo-banner {
        height: auto;
        flex-direction: column;
    }
    .promo-content {
        position: static;
        width: 100%;
        padding: 2rem 1.5rem;
        background: #fff;
    }
    .promo-image {
        height: 200px !important;
    }
    .promo-content h2 {
        font-size: 1.5rem !important;
    }
}

/* PRODUCT DETAIL RESPONSIVE */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
/* CART & CHECKOUT LAYOUT */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 0;
}

@media (max-width: 576px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .cart-item img {
        width: 100% !important;
        height: 200px !important;
    }
}
