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

:root {
    /* Color Palette - Dark Premium Theme */
    --bg-color: #050505;
    --card-bg: #111111;
    --card-border: #1a1a1a;
    --primary: #9d4edd;
    --primary-light: #c77dff;
    --primary-glow: rgba(157, 78, 221, 0.4);
    --secondary: #e0aaff;
    --text-main: #f8f9fa;
    --text-muted: #adb5bd;
    --alert: #ff4d4f;
    --success: #2b9348;
    
    /* Layout */
    --nav-height: 80px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.highlight {
    color: var(--primary-light);
    text-shadow: 0 0 20px var(--primary-glow);
}

.highlight-text {
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary), #5a189a);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-outline {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Navigation Bar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.header.scrolled {
    height: 70px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-light);
}

.search-bar-container {
    flex: 2;
    max-width: 450px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 2px 20px;
    transition: var(--transition);
}

.search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px;
    outline: none;
    font-size: 0.95rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--primary-light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    color: white;
    transform: scale(1.1);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-icon {
    font-size: 1.5rem;
    color: var(--text-main);
    position: relative;
}

.nav-icon:hover {
    color: var(--primary-light);
}

.badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--alert);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.btn-login {
    background: rgba(157, 78, 221, 0.15);
    border: 1px solid rgba(157, 78, 221, 0.4);
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
    order: 10; /* Keep at right on desktop */
}

.btn-login i {
    font-size: 1.25rem;
}

.btn-login:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: var(--nav-height);
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: radial-gradient(circle at center, #1a0b2e 0%, #050505 100%);
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.slide.active {
    opacity: 0.3; /* Subtle background visibility */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero-overlay h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-overlay p {
    font-size: 1.3rem;
    color: var(--text-main);
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: var(--transition);
    border-radius: 2px;
}

.dot.active {
    background: var(--primary);
    width: 60px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Sections */
.section {
    padding: 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-light);
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.15);
}

.category-card:hover i {
    transform: scale(1.2);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border-color: rgba(157, 78, 221, 0.3);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--alert);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
}

.product-img {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(5px);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.action-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.seller-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.seller-name i.verified {
    color: #3a86ff;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffb703;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.product-rating span {
    color: var(--text-muted);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-light);
}

.old-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 5px 15px var(--primary-glow);
}

/* Flash Sale Countdown */
.countdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.countdown span {
    font-weight: 600;
    color: var(--text-muted);
}

.time-block {
    background: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.time-block small {
    font-size: 0.7rem;
    font-weight: 400;
    margin-left: 2px;
}

.view-all-container {
    text-align: center;
    margin-top: 50px;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    padding: 80px 20px 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: white;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-methods {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transform: translateY(50px);
    transition: var(--transition);
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Premium Split Auth Layout */
.modal-content.split-auth-layout {
    max-width: 850px;
    display: flex;
    padding: 0;
    overflow: hidden;
    background: var(--card-bg);
}

.auth-visual {
    flex: 1;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.85), rgba(58, 12, 163, 0.95)), url('https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
}

.auth-visual::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.auth-visual-content {
    position: relative;
    z-index: 2;
}

.auth-visual-content h2 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.auth-visual-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.5;
}

.auth-features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 500;
}

.auth-features li i {
    color: #00f5d4;
    font-size: 1.4rem;
}

.split-auth-layout .auth-box {
    flex: 1;
    padding: 40px 50px;
    background: var(--card-bg);
}

@media (max-width: 768px) {
    .modal-content.split-auth-layout {
        flex-direction: column;
        max-width: 450px;
    }
    .auth-visual {
        display: none; /* Hide visual side on mobile */
    }
    .split-auth-layout .auth-box {
        padding: 30px;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover {
    color: white;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 5px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.auth-form.active {
    display: flex;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px 15px 12px 45px;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(157, 78, 221, 0.05);
}

.form-options {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.forgot-pass {
    color: var(--primary-light);
}

.forgot-pass:hover {
    text-decoration: underline;
}

.full-width {
    width: 100%;
}

.divider {
    text-align: center;
    position: relative;
    margin: 10px 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.divider span {
    background: var(--card-bg);
    padding: 0 10px;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-google i {
    color: #ea4335;
    font-size: 1.3rem;
}

/* Role Selection */
.role-selection p {
    margin-bottom: 10px;
    font-weight: 500;
}

.role-options {
    display: flex;
    gap: 15px;
}

.role-option {
    flex: 1;
    cursor: pointer;
}

.role-option input {
    display: none;
}

.role-option span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: var(--transition);
}

.role-option i {
    font-size: 1.5rem;
}

.role-option input:checked + span {
    background: rgba(157, 78, 221, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 900px) {
    .nav-categories {
        display: none;
    }
    .slide-content h1 {
        font-size: 3rem;
    }
}
@media (max-width: 600px) {
    .slide {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .slide-image {
        display: none;
    }
    .section-header {
        flex-direction: column;
        gap: 15px;
    }
}

/* Dropdown Top Styling Fix */
.nav-categories {
    position: relative;
    cursor: pointer;
}
.dropdown-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}
.dropdown-btn:hover {
    background: rgba(157, 78, 221, 0.1);
    color: var(--primary-light);
}
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 100;
    overflow: hidden;
}
.nav-categories:hover .dropdown-content {
    display: flex;
    flex-direction: column;
}
.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}
.dropdown-content a:hover {
    background: rgba(157, 78, 221, 0.15);
    color: var(--primary-light);
    padding-left: 25px;
}

/* Utilities */
.mt-3 { margin-top: 1rem; }
.full-width { width: 100%; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }

/* Role Selection Card Styles */
.role-card {
    display: block;
    cursor: pointer;
}

.role-card input[type="radio"] {
    display: none;
}

.role-card-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.role-card:hover .role-card-inner {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.role-card input[type="radio"]:checked + .role-card-inner {
    background: rgba(157, 78, 221, 0.1);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.2);
}

.role-icon {
    width: 60px;
    height: 60px;
    background: rgba(157, 78, 221, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-light);
}

.role-icon i {
    color: inherit;
}

.role-icon.seller {
    background: rgba(255, 183, 3, 0.15);
    color: #ffb703;
}

.role-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #fff;
}

.role-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.role-check {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transition: 0.3s;
}

.role-card input[type="radio"]:checked + .role-card-inner .role-check {
    opacity: 1;
}

/* Toast Notification Premium Polish */
.toast-notification {
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: slideInToast 0.4s ease forwards;
}

@keyframes slideInToast {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


/* =========================================
   Product Detail Modal Enhancements
   ========================================= */
#productModal .modal-content {
    max-width: 1000px;
    width: 95%;
    background: var(--card-bg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

#modalLayout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

#modalImg {
    position: relative;
    background: #0a0a0a;
}

#modalImg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info-side {
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10;
    transition: 0.3s;
}

.modal-close-icon:hover {
    color: white;
    transform: rotate(90deg);
}

.modal-tab-header {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
    margin-top: 20px;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.modal-tab-header span {
    cursor: pointer;
    color: var(--text-muted);
    padding-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.modal-tab-header span.active {
    color: var(--primary-light);
    border-bottom: 2px solid var(--primary);
}

.modal-section-content {
    flex: 1;
    min-height: 250px;
}

.modal-action-row {
    display: flex;
    gap: 15px;
    margin-top: auto;
    padding-top: 30px;
}

/* Scrollbar for modal content */
.modal-info-side::-webkit-scrollbar {
    width: 6px;
}
.modal-info-side::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
.modal-info-side::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.3);
    border-radius: 10px;
}

/* Responsive Modal */
@media (max-width: 900px) {
    #modalLayout {
        grid-template-columns: 1fr;
    }
    #modalImg {
        height: 350px;
    }
    .modal-info-side {
        padding: 30px 20px;
        max-height: none;
    }
}

/* =========================================
   MOBILE DESIGN SYSTEM (TeroBazaar Mobile)
   ========================================= */

/* Mobile Navigation Bar (Fixed Bottom) */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: none; /* Desktop hidden */
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    padding: 0 10px;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
    transition: var(--transition);
}

.mobile-nav-item i {
    font-size: 1.5rem;
}

.mobile-nav-item.active {
    color: var(--primary-light);
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
    text-shadow: 0 0 8px var(--primary);
}

/* Base Responsive Rules */
@media (max-width: 768px) {
    /* Layout */
    body {
        padding-bottom: 70px; /* Space for mobile nav */
    }

    .section {
        padding: 40px 15px;
    }

    /* Header Redesign */
    .header {
        height: 70px;
    }

    .nav-container {
        gap: 15px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-categories, .nav-icon:not(.cart-icon) {
        display: none !important; /* Hide non-essential desktop items */
    }

    .btn-login {
        border-radius: 12px;
        background: var(--primary) !important;
        color: white !important;
        box-shadow: 0 5px 15px var(--primary-glow);
        border: none;
    }

    .nav-container {
        padding-left: 70px !important; /* Make room for the absolute button */
        gap: 10px;
    }

    .btn-login span {
        display: none;
    }

    .search-bar-container {
        max-width: none;
    }

    .search-form {
        padding: 2px 12px;
    }

    /* Hero Section */
    .hero-section {
        height: 80vh;
        min-height: 500px;
    }

    .hero-overlay h1 {
        font-size: 2.8rem;
    }

    .hero-overlay p {
        font-size: 1rem;
    }

    /* Grids */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .cat-icon-wrap {
        width: 100px !important;
        height: 100px !important;
        padding: 20px !important;
        border-radius: 30px !important;
    }

    .category-card {
        padding: 15px 10px;
    }

    .category-card i {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-img {
        height: 180px;
    }

    .product-info {
        padding: 12px;
    }

    .product-title {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }

    .current-price {
        font-size: 1.1rem;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        padding: 25px;
    }

    .mobile-nav {
        display: flex;
    }

    /* Dashboard Sidebar to Top Strip/Hidden Drawer */
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
        padding: 10px !important;
        flex-direction: row !important;
        overflow-x: auto;
        white-space: nowrap;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .sidebar-menu {
        display: flex !important;
        gap: 10px;
    }

    .sidebar-link {
        padding: 10px 15px !important;
        border-radius: 20px !important;
    }

    .sidebar-header, .sidebar-footer {
        display: none !important;
    }

    .main-content-area {
        padding: 15px !important;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Touch Optimizations */
@media (hover: none) {
    .product-actions {
        opacity: 1;
        transform: translateX(0);
        top: 10px;
        right: 10px;
    }

    .action-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .btn-primary, .btn-outline, .btn-add-cart {
        padding: 14px 20px; /* Larger hit zones */
    }
}

/* Specific Fix for smaller phones */
@media (max-width: 480px) {
    /* Header & Search Mobile Fixes */
    .header {
        height: auto;
        padding: 10px 0;
    }

    .nav-container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 15px;
        justify-content: space-between;
    }

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

    .nav-categories {
        display: none; /* Hide categories on mobile header to save space */
    }

    .search-bar-container {
        order: 4;
        flex: 1 1 100%; /* Take full width on mobile */
        max-width: none;
        margin-top: 5px;
    }

    .search-form {
        padding: 2px 15px;
        border-radius: 12px; /* Sleeker for mobile */
    }

    .nav-icons {
        order: 3;
        gap: 15px;
    }

    .mobile-nav {
        display: flex;
    }
}

/* Premium Search Dropdown Styling */
.search-results-dropdown {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.search-suggestion-item:hover {
    background: rgba(255,255,255,0.08);
}
