:root {
    --primary: #ffc107;
    --primary-hover: #e0a800;
    --header-bg: #111827;
    --bg-light: #f9fafb;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
    --badge-hit: #8b5cf6;
    --badge-new: #10b981;
    --badge-discount: #f59e0b;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { font-family: inherit; cursor: pointer; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Top Bar */
.top-bar {
    background: #000;
    color: #ccc;
    font-size: 12px;
    padding: 8px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
}
.top-bar-left span { margin-right: 15px; }
.top-bar-right a, .top-bar-right span { margin-left: 15px; transition: color 0.2s; }
.top-bar-right a:hover { color: var(--white); }

/* Header */
.main-header {
    background: var(--header-bg);
    color: var(--white);
    padding: 15px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}
.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}
.btn-catalog {
    background: var(--primary);
    color: var(--header-bg);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-catalog:hover { background: var(--primary-hover); }

.search-bar {
    flex: 1;
    display: flex;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
}
.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
}
.search-bar button {
    background: var(--primary);
    border: none;
    padding: 0 15px;
}

.header-actions {
    display: flex;
    gap: 25px;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.action-item .icon {
    font-size: 20px;
    position: relative;
}
.badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--primary);
    color: var(--header-bg);
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}
.action-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}
.action-text small { color: var(--text-muted); font-size: 12px; }

/* Mega Menu */
.mega-menu {
    display: none;
    position: absolute;
    top: 110px;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 100;
    border-top: 1px solid var(--border);
}
.mega-menu.active { display: block; }
.mega-menu-inner {
    display: flex;
    padding: 20px 0;
    min-height: 400px;
}
.mega-categories {
    width: 250px;
    border-right: 1px solid var(--border);
}
.mega-cat-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    color: var(--text-dark);
    transition: background 0.2s;
    font-size: 15px;
}
.mega-cat-item:hover { background: var(--bg-light); color: var(--primary-hover); }

.mega-cat-item.active { background: #fffdf5; color: #b45309; }
.mega-cat-item.active .cat-icon-svg { color: #b45309; }

.mega-subcategories {
    flex: 1;
    padding: 0 40px;
}
.mega-subcategories h4 { margin-bottom: 20px; font-size: 18px; font-weight: 700; }
.mega-sub-list-container { display: flex; flex-direction: column; }
.mega-sub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--bg-light);
    color: var(--text-dark);
    font-size: 15px;
}
.mega-sub-item:last-child { border-bottom: none; }
.mega-sub-item:hover { color: var(--primary-hover); }
.mega-sub-item::after {
    content: "›";
    font-size: 18px;
    color: #ccc;
    font-family: monospace;
}
.mega-sub-item:hover::after { color: var(--primary-hover); }

.sub-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: var(--text-dark);
    font-size: 15px;
}
.sub-list a:hover { color: var(--primary-hover); }
.sub-list a::after {
    content: "›";
    font-size: 18px;
    color: #ccc;
    font-family: monospace;
}
.sub-list a:hover::after { color: var(--primary-hover); }

/* App Content Area */
#app-content {
    padding: 20px 0 40px;
    min-height: 50vh;
}

/* Layout Grids */
.layout-home {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}
.sidebar {
    width: 250px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 0;
    height: fit-content;
}
.sidebar-title {
    padding: 10px 15px;
    font-weight: bold;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

/* Hero Slider & Features */
.home-hero-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.slider-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 400px;
}
.slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.8s ease-in-out;
}
.slide.active {
    opacity: 1;
    z-index: 1;
}

.banner-clickable-btn {
    position: absolute;
    bottom: 5%;
    left: 4.5%;
    width: 22%;
    height: 15%;
    display: block;
    z-index: 10;
    cursor: pointer;
}

/* Category Icons */
.cat-icon-svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: inherit;
}
.sub-list a:hover .cat-icon-svg, .mega-cat-item:hover .cat-icon-svg, .mega-cat-item.active .cat-icon-svg {
    color: var(--primary-hover);
}

.slide-content {
    padding: 50px;
    color: white;
    background: rgba(0,0,0,0.4);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.slide-content h1 { font-size: 48px; margin-bottom: 10px; }
.slide-content h1 span { color: var(--primary); }

.home-features-bar {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.feat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.feat-item .icon { font-size: 28px; }
.feat-item div { display: flex; flex-direction: column; }
.feat-item strong { font-size: 14px; }
.feat-item small { font-size: 12px; opacity: 0.7; }

/* Home Categories Scrollable */
.home-categories-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.home-categories-header h2 { margin: 0; }
.cat-scroll-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.cat-scroll-container { display: flex; gap: 15px; overflow-x: auto; scroll-behavior: smooth; padding-bottom: 10px; scrollbar-width: none; width: 100%; }
.cat-scroll-container::-webkit-scrollbar { display: none; }
.cat-card-new { flex: 0 0 240px; height: 140px; border-radius: 12px; background-size: cover; background-position: center; position: relative; cursor: pointer; overflow: hidden; transition: transform 0.2s; border: 1px solid rgba(0,0,0,0.1); }
.cat-card-new:hover { transform: translateY(-3px); }
.cat-card-overlay { position: absolute; bottom: 0; left: 0; right: 0; top: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 70%); display: flex; flex-direction: column; justify-content: flex-end; padding: 15px; color: white; }
.cat-card-overlay h4 { margin: 0; font-size: 16px; font-weight: 600; }
.cat-card-overlay small { color: #ccc; font-size: 12px; }
.btn-scroll { position: absolute; background: white; border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 2; transition: background 0.2s; font-size: 18px; color: var(--text-dark); }
.btn-scroll:hover { background: var(--bg-light); }
.btn-scroll-left { left: -20px; }
.btn-scroll-right { right: -20px; }

/* Catalog View */
.catalog-layout {
    display: flex;
    gap: 20px;
}
.filters {
    width: 250px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}
.filters-header { display: none; }
.close-filters-btn { display: none; }
.mobile-filters-btn { display: none; }
.mobile-apply-btn { display: none; }
.additional-filters summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.additional-filters summary::after { content: '▼'; font-size: 12px; opacity: 0.5; }
.additional-filters[open] summary::after { content: '▲'; }
.filter-group { margin-bottom: 20px; }
.filter-group h4 { margin-bottom: 10px; }
.filter-label { display: block; margin-bottom: 5px; opacity: 0.8; cursor: pointer;}
.filter-label input { margin-right: 8px; }

.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.product-card:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.prod-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}
.prod-badge.hit { background: var(--badge-hit); }
.prod-badge.new { background: var(--badge-new); }
.prod-badge.discount { background: var(--badge-discount); }

.prod-fav { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 20px; color: var(--text-muted); }
.prod-img { width: 100%; height: 180px; object-fit: contain; margin-bottom: 15px; }
.prod-title { font-size: 14px; font-weight: 500; flex: 1; margin-bottom: 10px; color: var(--text-dark); }
.prod-rating { color: var(--primary); font-size: 12px; margin-bottom: 10px; }
.prod-rating span { color: var(--text-muted); }
.prod-price-row { display: flex; justify-content: space-between; align-items: flex-end; }
.prod-price { font-size: 20px; font-weight: 700; }
.prod-old-price { font-size: 12px; text-decoration: line-through; color: var(--text-muted); margin-left: 5px; }
.btn-cart-sm { background: var(--header-bg); color: white; border: none; width: 35px; height: 35px; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.btn-cart-sm:hover { background: var(--primary); color: var(--header-bg); }

/* Product Detail View */
.breadcrumb { margin-bottom: 20px; color: var(--text-muted); font-size: 14px; }
.breadcrumb a:hover { color: var(--primary-hover); }
.product-detail-layout {
    display: flex;
    gap: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.pd-gallery { width: 400px; }
.pd-main-img { width: 100%; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; }
.pd-thumbs { display: flex; gap: 10px; }
.pd-thumbs img { width: 80px; height: 80px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.pd-info { flex: 1; }
.pd-title { font-size: 28px; margin-bottom: 10px; }
.pd-rating { margin-bottom: 20px; color: var(--primary); }
.pd-price-block { margin-bottom: 30px; }
.pd-price { font-size: 32px; font-weight: bold; }
.pd-actions { display: flex; gap: 15px; margin-bottom: 30px; }
.btn-add-cart { flex: 1; background: var(--primary); padding: 15px; font-size: 16px; font-weight: bold; border: none; border-radius: 4px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.btn-buy-click { flex: 1; background: var(--white); border: 1px solid var(--border); padding: 15px; font-size: 16px; font-weight: bold; border-radius: 4px; }
.pd-desc { border-top: 1px solid var(--border); padding-top: 20px; color: var(--text-muted); }

/* Benefits / Footer */
.benefits-row { background: var(--white); border-top: 1px solid var(--border); padding: 30px 0; }
.benefits-inner { display: flex; justify-content: space-between; }
.benefit-item { display: flex; align-items: center; gap: 15px; }
.benefit-item .icon { font-size: 30px; }
.main-footer { background: var(--header-bg); color: var(--white); padding-top: 50px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col { flex: 1; }
.footer-col h4 { margin-bottom: 20px; font-size: 18px; }
.footer-col a { display: block; color: #ccc; margin-bottom: 10px; }
.footer-col a:hover { color: var(--primary); }
.brand-col p { color: #ccc; margin: 15px 0; font-size: 14px; }
.socials a { font-size: 24px; margin-right: 10px; }
.subscribe-form { display: flex; margin-top: 15px; }
.subscribe-form input { flex: 1; padding: 10px; border: none; border-radius: 4px 0 0 4px; outline: none; }
.subscribe-form button { border-radius: 0 4px 4px 0; }
.footer-bottom { padding: 20px 0; display: flex; justify-content: space-between; align-items: center; color: #ccc; font-size: 14px; }
.payment-methods span { margin-left: 15px; font-size: 18px; }

/* Admin Panel Modernization */
.admin-page-wrapper {
    background-color: #f3f4f6;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 40px;
}
.admin-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
}
.admin-form-card, .admin-list-card {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.admin-form-card { width: 350px; max-width: 100%; }
.admin-list-card { flex: 1; min-width: 0; max-width: 100%; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: #374151; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #f9fafb;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2);
}
.btn-danger {
    background: #ef4444; color: white; border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 500; transition: background 0.2s;
}
.btn-danger:hover { background: #dc2626; }
.admin-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.admin-table th {
    padding: 15px 10px;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    vertical-align: middle;
}
.admin-table tr { transition: background 0.2s; }
.admin-table tr:hover { background: #f8fafc; }
.admin-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Modern Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--white);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 25px;
}
.admin-tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-tab-btn:hover {
    background: #f3f4f6;
    color: #111827;
}
.admin-tab-btn.active {
    background: var(--primary);
    color: var(--header-bg);
    box-shadow: 0 4px 10px rgba(250, 204, 21, 0.3);
}

/* Admin Action Buttons in Table */
.btn-action {
    border: none;
    background: #f3f4f6;
    color: #374151;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-action:hover { background: #e5e7eb; }
.btn-action-primary { background: #ebf5ff; color: #2563eb; }
.btn-action-primary:hover { background: #dbeafe; }
.btn-action-success { background: #f0fdf4; color: #16a34a; }
.btn-action-success:hover { background: #dcfce7; }
.btn-action-danger { background: #fef2f2; color: #ef4444; }
.btn-action-danger:hover { background: #fee2e2; }
.btn-action-warning { background: #fefce8; color: #ca8a04; }
.btn-action-warning:hover { background: #fef08a; }

/* Auth Page Layout (Registration & Login) */
.auth-page {
    display: flex;
    min-height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 20px 0;
    background: #fff;
}

.auth-left {
    flex: 1.2;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
}

.auth-right {
    flex: 1;
    background-color: #1a1c23;
    color: white;
    padding: 50px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.auth-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: #111;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111;
}

.auth-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 15px;
}
.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.auth-form label span.req { color: #e11d48; }

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-wrapper .icon-left {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    width: 18px;
    height: 18px;
}
.auth-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.auth-input-wrapper input:focus { border-color: var(--primary); }
.auth-input-wrapper .icon-right {
    position: absolute;
    right: 12px;
    color: #9ca3af;
    cursor: pointer;
}

.auth-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    display: block;
}

.phone-wrapper { display: flex; }
.phone-prefix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    color: #333;
}
.phone-wrapper input {
    border-radius: 0 6px 6px 0;
    padding-left: 12px;
}

.password-rules {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 11px;
    color: #10b981;
}
.password-rules span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-auth-submit {
    background: #facc15;
    color: #111;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}
.btn-auth-submit:hover { background: #eab308; }

.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}
.auth-divider::before {
    content: ''; position: absolute; left: 0; top: 50%; width: 40%; height: 1px; background: #e5e7eb;
}
.auth-divider::after {
    content: ''; position: absolute; right: 0; top: 50%; width: 40%; height: 1px; background: #e5e7eb;
}
.auth-divider span { color: #9ca3af; font-size: 13px; }

.social-btns { display: flex; gap: 15px; }
.btn-social {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 10px; border: 1px solid #e5e7eb;
    border-radius: 6px; background: white; font-size: 14px;
    font-weight: 600; cursor: pointer;
}
.btn-social:hover { background: #f9fafb; }

.auth-bottom-link {
    text-align: center; margin-top: 20px; font-size: 14px; color: #6b7280;
}
.auth-bottom-link a { color: #eab308; font-weight: 600; text-decoration: none; }

.auth-right-logo {
    color: #facc15; font-size: 32px; font-weight: 800; letter-spacing: 3px; margin-bottom: 20px;
}
.auth-right-title {
    font-size: 20px; font-weight: 600; line-height: 1.4; margin-bottom: 40px; color: #fff;
}

.benefit-list { display: flex; flex-direction: column; gap: 25px; margin-bottom: 40px; }
.benefit-row { display: flex; gap: 15px; align-items: flex-start; }
.benefit-icon { color: #facc15; flex-shrink: 0; }
.benefit-text h5 { font-size: 15px; margin-bottom: 4px; font-weight: 600; }
.benefit-text p { font-size: 13px; color: #9ca3af; line-height: 1.4; }

.auth-right-image { margin-top: auto; text-align: center; }
.auth-right-image img { max-width: 100%; border-radius: 8px; }

/* Cart UI Styles */
.cart-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
}

.cart-main { flex: 1.8; }

.cart-sidebar {
    flex: 1;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 20px;
}

.cart-header-title {
    display: flex; align-items: center; gap: 10px; font-size: 28px; margin-bottom: 5px;
}
.cart-header-title .badge {
    background: #facc15; color: #111; font-size: 14px; padding: 2px 8px; border-radius: 12px; font-weight: 600;
}
.cart-status {
    color: #10b981; font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 25px;
}

.cart-table {
    width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb;
}
.cart-table th {
    background: #f9fafb; padding: 15px; text-align: left; font-size: 13px; color: #6b7280; font-weight: 600; border-bottom: 1px solid #e5e7eb;
}
.cart-table td {
    padding: 20px 15px; border-bottom: 1px solid #e5e7eb; vertical-align: middle;
}
.cart-table tr:last-child td { border-bottom: none; }

.cart-item-row { display: flex; align-items: center; gap: 15px; }
.cart-checkbox { width: 18px; height: 18px; accent-color: #facc15; cursor: pointer; }
.cart-item-img {
    width: 80px; height: 80px; object-fit: contain; background: #fff; border-radius: 8px; padding: 5px;
}
.cart-item-info h4 { font-size: 15px; margin-bottom: 5px; color: #111; }
.cart-item-meta { font-size: 12px; color: #6b7280; margin-bottom: 2px; }
.cart-item-stock { font-size: 12px; color: #10b981; margin-bottom: 10px; }
.cart-item-actions { display: flex; gap: 15px; font-size: 13px; color: #6b7280; }
.cart-item-actions span { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.cart-item-actions span:hover { color: #e11d48; }

.qty-controls {
    display: inline-flex; align-items: center; border: 1px solid #e5e7eb; border-radius: 4px; overflow: hidden;
}
.qty-controls button {
    background: #fff; border: none; padding: 5px 12px; cursor: pointer; font-size: 16px; color: #6b7280;
}
.qty-controls button:hover { background: #f3f4f6; }
.qty-controls input {
    width: 40px; text-align: center; border: none; border-left: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; font-size: 14px; padding: 5px 0; outline: none;
}

.cart-price { font-weight: 700; font-size: 16px; white-space: nowrap; }

.cart-actions-bottom { display: flex; justify-content: space-between; margin-top: 15px; }
.btn-outline {
    background: #fff; border: 1px solid #e5e7eb; padding: 10px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #333;
}
.btn-outline:hover { background: #f9fafb; }

.summary-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; color: #333; }
.summary-row.discount, .summary-row.free { color: #10b981; }
.summary-divider { height: 1px; background: #e5e7eb; margin: 15px 0; }
.summary-total { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.summary-total-val { font-size: 24px; font-weight: 800; }
.summary-save { text-align: right; font-size: 12px; color: #10b981; margin-bottom: 20px; }

.btn-checkout {
    background: #facc15; color: #111; border: none; width: 100%; padding: 14px; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 10px; transition: 0.2s;
}
.btn-checkout:hover { background: #eab308; }

.btn-1click { width: 100%; justify-content: center; margin-bottom: 20px; }

.summary-info-box {
    border: 1px solid #e5e7eb; border-radius: 6px; padding: 15px; margin-bottom: 10px; display: flex; gap: 12px; align-items: flex-start;
}
.summary-info-box svg { color: #333; flex-shrink: 0; }
.summary-info-box h6 { font-size: 13px; margin-bottom: 4px; }
.summary-info-box p { font-size: 12px; color: #6b7280; line-height: 1.4; }

.payment-methods { margin-top: 20px; }
.payment-methods p { font-size: 12px; color: #6b7280; margin-bottom: 10px; }
.payment-icons { display: flex; gap: 8px; align-items: center; }
.payment-icons span {
    border: 1px solid #e5e7eb; border-radius: 4px; padding: 4px 8px; font-size: 11px; font-weight: 600; background: #fff; color: #333;
}
/* FAQ Styles */
.faq-page-container { display: flex; gap: 40px; max-width: 1200px; margin: 40px auto; padding: 0 20px; align-items: flex-start; }
.faq-sidebar { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
.faq-sidebar-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; }
.faq-sidebar-box h3 { margin-bottom: 15px; font-size: 18px; color: #111; }
.faq-cat-list { list-style: none; padding: 0; margin: 0; }
.faq-cat-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; cursor: pointer; color: #4b5563; transition: 0.2s; }
.faq-cat-list li:hover { color: #111; padding-left: 5px; }
.faq-cat-list li svg { width: 18px; height: 18px; color: #9ca3af; }
.support-box { background: #fef9c3; border: 1px solid #fef08a; }
.support-box p { font-size: 14px; color: #4b5563; margin-bottom: 15px; }
.support-box .btn-primary { width: 100%; margin-bottom: 20px; background: #fbbf24; color: #111; border: none; padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.support-info p { font-size: 14px; color: #374151; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.faq-content-area { flex: 1; }
.faq-content-area h1 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.faq-content-area > p { color: #6b7280; font-size: 16px; margin-bottom: 30px; }
.faq-search { width: 100%; padding: 16px 20px; padding-left: 45px; font-size: 16px; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 30px; background: #fff url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 15px center; outline: none; }
.faq-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: 0.3s; }
.faq-item.active { border-color: #facc15; box-shadow: 0 4px 6px -1px rgba(250, 204, 21, 0.1); }
.faq-question { padding: 20px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 600; color: #111; font-size: 16px; }
.faq-question .q-left { display: flex; align-items: center; gap: 15px; }
.faq-question .q-icon { width: 36px; height: 36px; border-radius: 8px; background: #fef9c3; color: #ca8a04; display: flex; align-items: center; justify-content: center; }
.faq-question .chevron { transition: transform 0.3s; color: #9ca3af; }
.faq-item.active .chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 20px 65px; color: #4b5563; line-height: 1.6; font-size: 15px; display: none; }
.faq-item.active .faq-answer { display: block; background: #f9fafb; padding-top: 15px; margin-top: 10px; border-top: 1px solid #f3f4f6; border-radius: 0 0 12px 12px; padding-left: 20px; }

/* Support Widget */
.support-widget-btn { position: fixed; bottom: 30px; right: 30px; background: #0f172a; color: #fff; border-radius: 30px; padding: 12px 24px; display: flex; align-items: center; gap: 10px; cursor: pointer; z-index: 1000; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); font-weight: 600; border: 1px solid #1e293b; transition: transform 0.2s; }
.support-widget-btn:hover { transform: scale(1.05); }
.support-widget-btn img { width: 24px; height: 24px; border-radius: 50%; }
.support-widget-window { position: fixed; bottom: 90px; right: 30px; width: 350px; height: 500px; background: #f8fafc; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2); z-index: 1000; display: flex; flex-direction: column; overflow: hidden; transform: translateY(20px); opacity: 0; pointer-events: none; transition: 0.3s; }
.support-widget-window.active { transform: translateY(0); opacity: 1; pointer-events: all; }
.sw-header { background: #0f172a; color: #fff; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.sw-header-left { display: flex; align-items: center; gap: 12px; }
.sw-header-left img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #334155; }
.sw-header-title { display: flex; flex-direction: column; }
.sw-header-title strong { font-size: 15px; }
.sw-header-title small { font-size: 12px; color: #4ade80; }
.sw-close { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 20px; }
.sw-body { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; background: #f8fafc; }
.sw-msg { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; position: relative; }
.sw-msg.incoming { background: #e2e8f0; color: #1e293b; align-self: flex-start; border-bottom-left-radius: 2px; }
.sw-msg.outgoing { background: #fbbf24; color: #451a03; align-self: flex-end; border-bottom-right-radius: 2px; }
.sw-msg-time { font-size: 10px; color: rgba(0,0,0,0.4); margin-top: 4px; text-align: right; }
.sw-input-area { background: #fff; padding: 15px; display: flex; gap: 10px; border-top: 1px solid #e5e7eb; }
.sw-input-area input { flex: 1; border: 1px solid #e5e7eb; border-radius: 20px; padding: 10px 15px; font-size: 14px; outline: none; }
.sw-input-area button { background: none; border: none; color: #475569; cursor: pointer; }
.sw-input-area button:hover { color: #0f172a; }

/* Mobile Bottom Nav Base */
.mobile-bottom-nav { display: none; }

/* =========================================
   Mobile Responsiveness (max-width: 1024px)
   ========================================= */
@media (max-width: 1024px) {
    /* Top Bar */
    .top-bar-left { display: none; } /* Hide extra text on small screens */
    .top-bar-inner { justify-content: center; text-align: center; }
    
    /* Hide scroll arrows on mobile (users will swipe) */
    .btn-scroll { display: none !important; }
    
    /* Header Grid Restructuring */
    .header-inner { 
        display: grid !important;
        grid-template-columns: 50px 1fr 50px !important;
        grid-template-areas: 
            "burger logo admin"
            "search search search"
            "btn btn btn" !important;
        gap: 15px 10px !important;
        align-items: center;
        padding-bottom: 15px !important;
    }
    .mobile-burger { display: flex !important; grid-area: burger; color: #fff; background: none; border: none; cursor: pointer; padding: 0; align-items: center; justify-content: flex-start;}
    .logo { grid-area: logo; margin: 0 auto !important; justify-content: center !important; }
    .logo img { height: 45px !important; margin: 0 !important; }
    .header-actions { display: contents; } /* Let its children participate in grid */
    #msg-btn, #login-btn, .header-actions .fav-btn, .header-actions .cart-btn { display: none !important; } /* Hide on mobile, moved to mega menu */
    #admin-btn { grid-area: admin; justify-content: center; margin: 0; }
    
    .mobile-only-menu-items { display: flex !important; flex-direction: column; gap: 8px; border-bottom: 1px solid #e5e7eb; padding: 20px 20px 10px; margin-bottom: 10px; }
    .mobile-menu-btn { display: flex; align-items: center; gap: 12px; padding: 12px 15px; background: #f9fafb; border-radius: 8px; font-weight: 600; color: #1f2937; text-decoration: none; border: 1px solid #e5e7eb; }
    .action-item .icon { font-size: 24px; margin: 0 !important; }
    .action-item { margin: 0 !important; padding: 0 !important; background: transparent !important; }
    .action-text span, .action-text small { display: none; } /* Hide text, keep only icons */
    .search-bar { grid-area: search; width: 100%; margin: 0; }
    .btn-catalog { 
        grid-area: btn; width: 100%; justify-content: center; 
        background: #1f2937 !important; color: #fff !important; 
        border-radius: 8px !important; padding: 12px !important; font-size: 16px !important; margin: 0 !important;
    }
    .btn-catalog .catalog-text { display: inline-block !important; }
    
    /* Mobile Bottom Nav Layout */
    body { padding-bottom: 70px; }
    .mobile-bottom-nav { 
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: #111827; z-index: 2000; justify-content: space-around;
        padding: 10px 0; border-top: 1px solid #1f2937;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    .mobile-nav-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        color: #9ca3af; text-decoration: none; font-size: 11px; gap: 4px; transition: 0.2s;
    }
    .mobile-nav-item.active { color: #facc15; }
    .mobile-nav-item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }


    
    /* Layouts */
    .layout-home { flex-direction: column; }
    .sidebar { width: 100%; }
    #home-sidebar-cat-list { display: none; }
    .mobile-only-icon { display: inline-block; margin-left: 10px; font-size: 14px; color: #9ca3af; }
    .mobile-hidden-content { display: none; }
    .cabinet-layout { grid-template-columns: 1fr !important; }
    .admin-support-container { flex-direction: column !important; height: auto !important; }
    .admin-support-sidebar { width: 100% !important; border-right: none !important; border-bottom: 1px solid #e5e7eb; height: 350px !important; }
    #admin-support-chat-area { height: 450px !important; }
    .slider-container { height: 250px; border-radius: 16px; overflow: hidden; margin-bottom: 20px; }
    .slide-content { padding: 20px; }
    .slide-content h1 { font-size: 24px; }
    
    .home-features-bar { 
        flex-direction: row !important; flex-wrap: nowrap !important; overflow-x: auto; 
        padding-bottom: 15px; gap: 15px; margin-top: 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .home-features-bar::-webkit-scrollbar { display: none; }
    .feat-item {
        flex: 0 0 220px !important; scroll-snap-align: start;
        background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02); margin: 0;
    }
    
    .catalog-layout { flex-direction: column; }
    .filters { 
        display: none; 
        position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
        background: white; z-index: 9999; padding: 20px; 
        overflow-y: auto; border-radius: 0; border: none;
    }
    .filters.active { display: block; }
    .filters-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #e5e7eb; }
    .filters-header h3 { margin: 0; font-size: 24px; color: #111; font-weight: 800; }
    .close-filters-btn { display: block; background: none; border: none; color: #111; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .mobile-filters-btn { 
        display: flex; align-items: center; justify-content: center; gap: 8px; 
        width: 100%; padding: 12px; background: #f9fafb; border: 1px solid #e5e7eb; 
        border-radius: 8px; font-weight: 600; font-size: 16px; margin-bottom: 15px; cursor: pointer; color: #111;
    }
    .mobile-apply-btn { 
        display: block; width: 100%; padding: 16px; background: #10b981; color: white; 
        border: none; border-radius: 8px; font-weight: 600; font-size: 16px; margin-top: 20px; cursor: pointer;
    }
    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .product-card { padding: 10px; }
    .prod-img { height: 120px; }
    
    .product-detail-layout { flex-direction: column; gap: 20px; padding: 15px; }
    .pd-gallery { width: 100%; }
    .pd-title { font-size: 22px; }
    .pd-price { font-size: 26px; }
    .pd-actions { flex-direction: column; }
    
    /* Cart */
    .cart-layout { flex-direction: column; }
    .cart-main { flex: 1; width: 100%; overflow-x: auto; }
    .cart-sidebar { width: 100%; position: static; }
    .cart-table th, .cart-table td { padding: 10px 5px; font-size: 13px; }
    .cart-item-img { width: 50px; height: 50px; }
    .cart-item-row { gap: 10px; }
    
    /* Auth & Benefits */
    .auth-page { flex-direction: column; }
    .auth-left { padding: 30px 20px; }
    .auth-right { padding: 30px 20px; text-align: center; }
    .benefits-inner { flex-wrap: wrap; gap: 20px; }
    .benefit-item { width: 45%; flex-direction: column; text-align: center; }
    
    /* Footer */
    .footer-inner { flex-direction: column; gap: 20px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    
    /* Admin */
    .admin-layout { 
        display: grid !important; 
        grid-template-columns: minmax(0, 1fr) !important; 
        width: 100% !important; 
        max-width: 100vw !important; 
        overflow: hidden !important; 
        box-sizing: border-box !important; 
    }
    .admin-form-card, .admin-list-card { 
        width: 100% !important; 
        max-width: 100% !important; 
        overflow-x: auto !important; 
        min-width: 0 !important; 
        box-sizing: border-box !important; 
    }
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .admin-table {
        min-width: 600px !important; /* Force table to be wide enough, container will scroll */
    }
    #app-content h1 { font-size: 28px !important; }
    .admin-support-container { flex-direction: column !important; height: auto !important; }
    .admin-support-sidebar { width: 100% !important; border-right: none !important; border-bottom: 1px solid #e5e7eb !important; max-height: 300px !important; }
    #admin-support-chat-area { min-height: 400px !important; }
    
    /* Support Widget */
    .support-widget-btn { bottom: 90px !important; right: 20px !important; z-index: 2001 !important; }
    .support-widget-window { width: 90%; right: 5%; bottom: 100px; height: 450px; }
    
    /* FAQ Page */
    .faq-page-container { flex-direction: column !important; gap: 20px !important; }
    .faq-sidebar { width: 100% !important; }
    
    /* General Responsive Grids */
    .checkout-layout,
    .checkout-step-grid,
    .messages-layout,
    .client-details-grid { grid-template-columns: 1fr !important; }
    .checkout-payment-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .slider-container { height: 150px; }
    .slide-content h1 { font-size: 20px; }
    .benefit-item { width: 100%; }
    
    /* Make category cards smaller on mobile so more fit on screen (Android style) */
    .cat-card-new { flex: 0 0 160px !important; height: 110px !important; }
    .cat-card-overlay h4 { font-size: 14px !important; margin-bottom: 2px !important; }
    .cat-card-overlay small { font-size: 11px !important; }
}

@media (min-width: 769px) {
    .mobile-only-icon { display: none !important; }
    #home-sidebar-cat-list { display: block !important; }
}
