html { 
    scroll-behavior: smooth; 
    overflow-x: hidden;
}

/* Universal Hide Scrollbar */
* {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari and Opera */
}

html, body {
    scrollbar-width: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
}
:root {
    --primary: #6366f1; /* Aura Indigo */
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7; /* Aura Purple */
    --bg-color: #f8fafc;
    --surface: rgba(255, 255, 255, 0.75);
    --surface-hover: rgba(255, 255, 255, 0.95);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: rgba(0, 0, 0, 0.05);
    --glass-blur: blur(20px);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --header-h: 70px;
    --promo-h: 40px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-top: var(--header-h);
    -webkit-tap-highlight-color: transparent;
}

body.has-marquee {
    padding-top: calc(var(--header-h) + var(--promo-h));
}

@media (max-width: 1200px) {
    body { padding-top: 70px; }
    body.has-marquee { padding-top: 105px; }
}

body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05), transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.05), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

a { text-decoration: none; color: inherit; }

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    min-height: var(--header-h);
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-secondary);
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.nav-actions { display: flex; gap: 1rem; align-items: center; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    gap: 0.5rem;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.15);
}

.btn-danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fca5a5;
}
.btn-danger:hover { background: #fee2e2; }

.btn-success {
    background: #ecfdf5;
    color: #10b981;
    border: 1px solid #6ee7b7;
}
.btn-success:hover { background: #d1fae5; }

/* Glass Card */
.glass-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); font-weight: 500; font-size: 0.95rem;}
.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* Grid */
/* Grid */
.container { max-width: 1400px; margin: 0 auto; padding: 2.5rem 5%; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.badge { padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-processing { background: #e0f2fe; color: #0284c7; }
.badge-delivered { background: #d1fae5; color: #059669; }
.badge-cancelled { background: #fee2e2; color: #dc2626; }
.badge-approved { background: #d1fae5; color: #059669; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-custom { background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd;}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.75rem 1.25rem;
}
.product-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    background: #f3f4f6; /* placeholder back */
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.product-img { 
    max-width: 95%; 
    max-height: 95%; 
    object-fit: contain; 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-img {
    transform: scale(1.08);
}
.product-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--text-primary); letter-spacing: -0.01em;}
.product-desc { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1rem; flex-grow: 1; line-height: 1.35;}
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.product-price { color: var(--text-primary); font-weight: 800; font-size: 1.2rem; }

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    font-weight: 500;
}
.alert-success { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* Hero */
.hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}
.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.08;
    border-radius: 50%;
    z-index: -1;
}
.hero h1 { font-size: 4rem; margin-bottom: 1.5rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em;}
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Slider System */
.slider-container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: #000;
}
.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    background-size: cover;
    background-position: center;
}
.slide.active {
    opacity: 1;
    visibility: visible;
}
.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.4) 40%, transparent 100%);
}
.slide-content {
    position: relative;
    z-index: 10;
    height: 100%;
    padding: 0 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 12px;
}
.dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}
.dot.active { background: #fff; width: 32px; border-radius: 6px; }

.product-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
}

/* Footer */
footer { 
    background: #ffffff;
    padding: 1.5rem 5% 1rem; 
    border-top: 1px solid var(--border); 
    margin-top: 1.5rem; 
    color: var(--text-secondary); 
}

footer .container {
    padding: 0 !important;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.footer-brand {
    max-width: 650px;
    margin: 0 auto;
}

.footer-brand h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--text-primary); text-align: center;}
.footer-brand p { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); margin: 0 auto 1.25rem;}
.social-links { justify-content: center; margin-bottom: 0.25rem;}

.footer-heading { 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: var(--text-primary); 
    margin-bottom: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}

.footer-links { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 0 !important; 
    text-align: center;
}

.footer-links li { 
    margin-bottom: 0.5rem; 
    list-style: none !important; 
    list-style-type: none !important;
}

.footer-links a { 
    transition: var(--transition); 
    font-weight: 500; 
    font-size: 0.9rem; 
    color: var(--text-secondary); 
    text-decoration: none;
}

.footer-links a:hover { 
    color: var(--primary); 
}

.footer-contact p { display: flex; gap: 0.75rem; margin-bottom: 1rem; font-size: 0.95rem; align-items: flex-start; }
.footer-contact i { color: var(--primary); font-size: 1.25rem; margin-top: 0.1rem; }

.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-icon { 
    width: 40px; height: 40px; 
    background: #f1f5f9; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.25rem; 
    color: var(--text-secondary); 
    transition: var(--transition); 
}
.social-icon:hover { 
    background: var(--primary); 
    color: white; 
    transform: translateY(-5px); 
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.footer-bottom { 
    padding-top: 2rem; 
    border-top: 1px solid var(--border); 
    text-align: center; 
    font-size: 0.9rem; 
    font-weight: 500;
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .social-links { justify-content: center; }
    .footer-contact p { justify-content: center; }
}

/* Table */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 1rem; }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-primary); font-weight: 800; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; background: #f8fafc;}
tbody tr { transition: var(--transition); background: #ffffff;}
tbody tr:hover { background: #f1f5f9; }

/* Auth forms */
.auth-container { max-width: 420px; margin: 4rem auto; }
/* Detail Page Specifics */
.back-btn-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    cursor: pointer;
    text-decoration: none;
}

.back-btn-details:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-5px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.2);
}

.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 1rem; }
.detail-image-wrapper { display: flex; flex-direction: column; align-items: center; position: sticky; top: 120px; z-index: 5; }
.detail-image-wrapper img { max-width: 90%; max-height: 90%; object-fit: contain; transition: var(--transition); }
.detail-image-wrapper:hover img { transform: scale(1.1); }

.detail-info { display: flex; flex-direction: column; gap: 1.5rem; }
.rating-stars { display: flex; gap: 0.25rem; color: #fbbf24; font-size: 1.25rem; align-items: center;}
.rating-count { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; margin-left: 0.5rem;}

.price-tag-large { font-size: 2.5rem; font-weight: 800; color: var(--text-primary); display: flex; align-items: baseline; gap: 0.75rem; }
.price-old { font-size: 1.25rem; text-decoration: line-through; color: #94a3b8; font-weight: 500;}

.spec-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; color: #1e293b; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary); display: inline-block;}
.spec-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.spec-item { display: flex; flex-direction: column; background: #fff; padding: 1rem; border-radius: 0.75rem; border: 1px solid var(--border); }
.spec-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 0.25rem;}
.spec-val { font-weight: 600; color: #1e293b; }

@media (max-width: 768px) {
    .product-detail-grid { grid-template-columns: 1fr; }
    .detail-image-wrapper { height: 350px; position: relative; top: 0; }
    .price-tag-large { font-size: 2rem; }
}
/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.active .search-container {
    transform: translateY(0);
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem 0;
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    transition: var(--transition);
    outline: none;
}

/* Search Card Popup */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-card {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid var(--border);
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-overlay.active .search-card {
    transform: translateY(0);
}

.search-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 1rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    transition: var(--transition);
}

.search-field-wrapper:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-field-wrapper i {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-left: 1rem;
}

.search-input-simple {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
}

.search-input-simple::placeholder {
    color: #94a3b8;
}

.search-results-container {
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    display: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.suggestion-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.suggestion-icon {
    width: 40px; height: 40px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

.suggestion-info h4 {
    font-size: 0.95rem;
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
}

.suggestion-info p {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-secondary);
}

.search-close-simple {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    border: 1px solid var(--border);
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    color: var(--text-secondary);
    transition: var(--transition);
}

.search-close-simple:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

@media (max-width: 1024px) {
    .navbar { padding: 1rem 5%; }
    .nav-links { display: none; }
    .hero-slider { height: 60vh; }
    .slide-content h1 { font-size: 3rem !important; }
    .slide-content p { font-size: 1.15rem !important; }
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100% !important; height: auto !important; position: relative !important; padding: 1.5rem !important; }
    .main-content { max-width: 100% !important; padding: 1.5rem !important; }
}

@media (max-width: 768px) {
    .container { padding: 2rem 4% !important; }
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem !important; }
    .brand-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem !important; }
    .slide-content h1 { font-size: 2.25rem !important; letter-spacing: -0.02em !important; }
    .slide-content p { font-size: 1rem !important; margin-bottom: 1.5rem !important; }
    .btn { padding: 0.85rem 1.75rem !important; font-size: 0.95rem !important; }
    .glass-card { padding: 1.25rem !important; }
    .table-responsive { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        border-radius: 0.75rem; 
        margin-bottom: 2rem;
    }
    .table-responsive table { min-width: 700px; }
    .cart-text { display: none; } /* Show only icon for cart on small mobile */
    .search-overlay { padding-top: 5vh; }
    .search-card { border-radius: 1rem; width: 95%; }
    
    /* Product Details */
    .product-detail-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
    .detail-image-wrapper { position: relative !important; top: 0 !important; height: auto !important; padding: 2rem 0; }
    
    /* Footer */
    .footer-grid { grid-template-columns: 1fr !important; text-align: center; gap: 2.5rem; }
}

.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-top: 2rem; }
.brand-card {
    background: white; border: 1px solid var(--border); border-radius: 0.5rem; padding: 1.5rem 1rem;
    text-align: center; font-weight: 700; color: #334155; transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.9rem;
}
.brand-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--primary); color: var(--primary); }

@media (max-width: 480px) {
    .container { padding: 1.5rem 3% !important; }
    /* Keeping 2-column grid for premium eCommerce feel */
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; }
    .brand-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; }
    .product-card { padding: 0.5rem 0.75rem !important; }
    .product-title { font-size: 0.9rem !important; }
    .product-price { font-size: 1rem !important; }
    .slide-content h1 { font-size: 1.85rem !important; }
    .slide-content p { font-size: 0.9rem !important; }
    .brand { font-size: 1.4rem !important; }
}
