/* =====================================================
   ShopOnline - Main Stylesheet
   ===================================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f1f5f9;
    --border-color: #222222;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #000000;
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #16a34a;
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

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

.btn-outline:hover {
    background: var(--light-color);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-text {
    background: none;
    color: var(--danger-color);
    padding: 0;
}

/* =====================================================
   Forms
   ===================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* =====================================================
   Alerts
   ===================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* =====================================================
   Header
   ===================================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 28px;
}

.header-search {
    flex: 1;
    max-width: 500px;
}

.header-search form {
    display: flex;
}

.header-search input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 14px;
}

.header-search button {
    padding: 10px 16px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: var(--white);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    position: relative;
}

.user-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    display: none;
    margin-top: 10px;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-color);
}

.dropdown-menu a:hover {
    background: var(--light-color);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* =====================================================
   Navigation
   ===================================================== */
.main-nav {
    background: var(--dark-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 20px;
    color: var(--white);
    font-size: 14px;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    list-style: none;
}

.has-dropdown:hover .dropdown {
    display: block;
}

.dropdown a {
    color: var(--text-color);
    padding: 12px 16px;
}

.dropdown a:hover {
    background: var(--light-color);
}

/* =====================================================
   Main Content
   ===================================================== */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.hero .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.hero .btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* =====================================================
   Stats Section
   ===================================================== */
.stats-section {
    background: var(--white);
    padding: 40px 0;
    margin-top: -30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-item i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
}

/* =====================================================
   Section
   ===================================================== */
.section {
    padding: 60px 0;
}

.section-gray {
    background: #f1f5f9;
}

.section-dark {
    background: var(--dark-color);
    color: var(--white);
}

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

.section-header h2 {
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

/* =====================================================
   Categories
   ===================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    color: var(--text-color);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.category-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.category-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--light-color);
}

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

.category-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* =====================================================
   Products
   ===================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.products-grid.small {
    grid-template-columns: repeat(4, 1fr);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card.small {
    font-size: 13px;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
}

.product-badge.featured {
    background: var(--warning-color);
}

.product-image {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--light-color);
}

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

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

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-category {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 16px;
    margin: 8px 0 12px;
    line-height: 1.4;
}

.product-title a {
    color: var(--text-color);
}

.product-title a:hover {
    color: var(--primary-color);
}

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

.sale-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--danger-color);
}

.original-price {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    padding: 10px;
    font-size: 13px;
}

.btn-add-cart i {
    color: #fff;
}

/* =====================================================
   Product Detail
   ===================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-muted);
}

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

.breadcrumb i {
    font-size: 12px;
    color: var(--text-muted);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.product-images {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

@media (max-width: 768px) {
    .product-images {
        position: relative;
        top: 0;
    }
}

.main-image {
    background: var(--light-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    object-fit: cover;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.product-info-detail {
    padding: 20px 0;
}

.product-category-link {
    color: var(--primary-color);
    font-size: 14px;
}

.product-name {
    font-size: 28px;
    margin: 10px 0 15px;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.product-meta .stock {
    color: var(--success-color);
}

.product-meta .stock.out-of-stock {
    color: var(--danger-color);
}

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

.product-price-detail .current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--danger-color);
}

.product-price-detail .original-price {
    font-size: 20px;
}

.discount-badge {
    background: var(--danger-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.short-description {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.8;
}

.product-features {
    background: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
}

.product-features h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-features ul {
    list-style: none;
    padding-left: 0;
}

.product-features li {
    padding: 5px 0;
    padding-left: 25px;
    position: relative;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.product-actions-detail {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 12px;
    font-size: 16px;
}

.qty-btn {
    padding: 12px 16px;
    background: var(--light-color);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--border-color);
}

.btn-add-cart-large {
    flex: 1;
}

.product-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.line { background: #00b900; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.copy { background: var(--secondary-color); }

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.description-content {
    line-height: 1.8;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.specs-table th {
    width: 200px;
    color: var(--text-muted);
    font-weight: 500;
}

/* =====================================================
   Products Page Layout
   ===================================================== */
.products-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.filters-sidebar {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    height: fit-content;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-color);
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--primary-color);
}

.products-main .products-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* =====================================================
   Cart
   ===================================================== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.cart-items {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.select-all {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.cart-list {
    padding: 0 25px;
}

.cart-item {
    display: grid;
    grid-template-columns: 40px 80px 1fr 120px 100px 40px;
    gap: 15px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.item-price {
    color: var(--text-muted);
    font-size: 13px;
}

.item-subtotal {
    text-align: right;
    font-weight: 600;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 18px;
}

.cart-summary {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    border-bottom: none;
    font-size: 18px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

/* =====================================================
   Checkout
   ===================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.checkout-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.checkout-section h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover,
.payment-method:has(input:checked) {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.payment-method input {
    margin-right: 15px;
}

.method-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-content i {
    font-size: 20px;
}

.checkout-summary {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.summary-items {
    margin-bottom: 20px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-item .item-info {
    display: flex;
    gap: 10px;
}

.checkout-item .item-qty {
    color: var(--text-muted);
}

/* =====================================================
   Auth Pages
   ===================================================== */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-box.wide {
    max-width: 600px;
}

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

.auth-header i {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-muted);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.forgot-password {
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

/* =====================================================
   Profile
   ===================================================== */
.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.profile-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-card {
    padding: 30px;
    text-align: center;
    background: var(--primary-color);
    color: var(--white);
}

.profile-avatar {
    font-size: 80px;
    margin-bottom: 15px;
}

.profile-card h3 {
    margin-bottom: 5px;
}

.profile-card p {
    opacity: 0.9;
    font-size: 14px;
}

.profile-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.profile-menu a:hover,
.profile-menu a.active {
    background: var(--light-color);
    color: var(--primary-color);
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 20px;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: var(--light-color);
    border-radius: var(--radius);
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-main {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.profile-section h3 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =====================================================
   Orders
   ===================================================== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    padding: 20px 25px;
    background: var(--light-color);
}

.order-info-main {
    display: flex;
    gap: 30px;
}

.order-number span,
.order-date span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.order-number strong {
    font-size: 16px;
}

.order-status {
    display: flex;
    gap: 10px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-shipped { background: #e0e7ff; color: #3730a3; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.payment-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.payment-pending { background: #fef3c7; color: #92400e; }
.payment-paid { background: #dcfce7; color: #166534; }
.payment-failed { background: #fee2e2; color: #991b1b; }

.order-items-preview {
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
}

.order-item-mini {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.more-items {
    color: var(--text-muted);
    font-size: 13px;
    padding: 5px 0;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.order-total strong {
    color: var(--danger-color);
    font-size: 18px;
}

/* =====================================================
   Order Detail
   ===================================================== */
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.order-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.admin-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.admin-section h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-table {
    width: 100%;
}

.info-table th,
.info-table td {
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.info-table th {
    width: 150px;
    color: var(--text-muted);
    font-weight: 500;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item-detailed {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--light-color);
    border-radius: var(--radius);
}

.order-item-detailed .item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
}

.order-item-detailed .item-details {
    flex: 1;
}

.order-item-detailed .item-total {
    font-weight: 600;
    color: var(--danger-color);
}

/* =====================================================
   Success Page
   ===================================================== */
.success-page {
    text-align: center;
    padding: 60px 0;
}

.success-icon {
    font-size: 100px;
    color: var(--success-color);
    margin-bottom: 20px;
}

.success-page h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.success-message {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.order-info {
    background: var(--light-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    max-width: 400px;
    margin: 0 auto 30px;
}

.order-number {
    margin-bottom: 15px;
}

.order-number span {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.order-number strong {
    font-size: 24px;
    color: var(--primary-color);
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* =====================================================
   Empty State
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-state.large {
    padding: 100px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* =====================================================
   Pagination
   ===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

/* =====================================================
   Cart Sidebar
   ===================================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.cart-sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.cart-overlay.open {
    display: block;
}

/* =====================================================
   Features Grid
   ===================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-item i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-item p {
    opacity: 0.8;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section h3 {
    font-size: 20px;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: var(--white);
    opacity: 0.8;
}

.footer-section ul a:hover {
    opacity: 1;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

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

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info i {
    margin-top: 3px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-main .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-search {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .products-grid,
    .products-main .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        display: none;
    }
    
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 30px 60px 1fr 40px;
        gap: 10px;
    }
    
    .item-quantity,
    .item-subtotal {
        grid-column: span 2;
    }
    
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .order-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .order-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .order-info-main {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .products-grid,
    .products-main .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}


/* =====================================================
   Dark Mode
   ===================================================== */

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #3b82f6;
    --primary-dark: #60a5fa;
    --secondary-color: #94a3b8;
    --dark-color: #f1f5f9;
    --light-color: #1e293b;
    --border-color: #334155;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --white: #0f172a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

body.dark-mode {
    background-color: #0f172a;
    color: var(--text-color);
}

/* Header Dark Mode */
body.dark-mode .header {
    background: #1e293b;
    box-shadow: var(--shadow);
}

body.dark-mode .header-search input {
    background: #334155;
    border-color: #475569;
    color: var(--text-color);
}

/* Navigation Dark Mode */
body.dark-mode .main-nav {
    background: #0f172a;
}

body.dark-mode .nav-menu a {
    color: #e2e8f0;
}

body.dark-mode .header {
    background: #1e293b;
}

body.dark-mode .header-action,
body.dark-mode .logo {
    color: #e2e8f0;
}

/* Cards Dark Mode */
body.dark-mode .product-card,
body.dark-mode .category-card,
body.dark-mode .order-card,
body.dark-mode .profile-main,
body.dark-mode .profile-sidebar,
body.dark-mode .cart-items,
body.dark-mode .cart-summary,
body.dark-mode .checkout-section,
body.dark-mode .checkout-summary,
body.dark-mode .auth-box {
    background: #1e293b;
    box-shadow: var(--shadow);
    color: #e2e8f0;
}

body.dark-mode .product-title a,
body.dark-mode .product-category,
body.dark-mode .category-card h3,
body.dark-mode .category-card p {
    color: #e2e8f0;
}

body.dark-mode .original-price {
    color: #94a3b8;
}

body.dark-mode .category-icon {
    background: #334155;
}

body.dark-mode .product-features,
body.dark-mode .order-section {
    background: #334155;
}

/* Forms Dark Mode */
body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #334155;
    border-color: #475569;
    color: var(--text-color);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: var(--primary-color);
}

/* Tables Dark Mode */
body.dark-mode .specs-table th,
body.dark-mode .specs-table td,
body.dark-mode .info-table th,
body.dark-mode .info-table td {
    border-color: var(--border-color);
}

body.dark-mode .specs-table th,
body.dark-mode .info-table th {
    color: var(--text-muted);
}

/* Footer Dark Mode */
body.dark-mode .footer {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .footer-section h3,
body.dark-mode .footer-section h4 {
    color: #e2e8f0;
}

body.dark-mode .footer-section a {
    color: #94a3b8;
}

body.dark-mode .footer-section a:hover {
    color: #e2e8f0;
}

/* Dropdown Dark Mode */
body.dark-mode .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .dropdown-menu a {
    color: #e2e8f0;
}

body.dark-mode .dropdown-menu a:hover {
    background: #334155;
}

/* Sidebar Cart Dark Mode */
body.dark-mode .cart-sidebar {
    background: #1e293b;
}

body.dark-mode .cart-sidebar-header,
body.dark-mode .cart-sidebar-footer {
    border-color: var(--border-color);
}

/* Admin Dark Mode */
body.dark-mode .admin-sidebar {
    background: #0f172a;
}

body.dark-mode .admin-header {
    background: #1e293b;
}

body.dark-mode .admin-section,
body.dark-mode .admin-form,
body.dark-mode .admin-table {
    background: #1e293b;
}

body.dark-mode .admin-table th {
    background: #334155;
}

body.dark-mode .sidebar-nav a:hover,
body.dark-mode .sidebar-nav a.active {
    background: #334155;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    background: var(--light-color);
    transform: rotate(20deg);
}

body.dark-mode .dark-mode-toggle {
    color: #fbbf24;
}

body.dark-mode .dark-mode-toggle:hover {
    background: #334155;
}

/* Hero Section Dark Mode */
body.dark-mode .hero {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* Stats Section Dark Mode */
body.dark-mode .stats-section {
    background: #1e293b;
}

body.dark-mode .stat-item i {
    color: var(--primary-color);
}

body.dark-mode .stat-number {
    color: #e2e8f0;
}

body.dark-mode .stat-label {
    color: #94a3b8;
}

/* Section Gray Dark Mode */
body.dark-mode .section-gray {
    background: #1e293b;
}

body.dark-mode .section-header h2,
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4 {
    color: #e2e8f0;
}

/* Breadcrumb Dark Mode */
body.dark-mode .breadcrumb a {
    color: var(--text-muted);
}

body.dark-mode .breadcrumb a:hover {
    color: var(--primary-color);
}

/* Alerts Dark Mode */
body.dark-mode .alert-success {
    background: #166534;
    color: #dcfce7;
    border-color: #22c55e;
}

body.dark-mode .alert-error {
    background: #991b1b;
    color: #fee2e2;
    border-color: #ef4444;
}

body.dark-mode .alert-warning {
    background: #92400e;
    color: #fef3c7;
    border-color: #f59e0b;
}

body.dark-mode .alert-info {
    background: #1e40af;
    color: #dbeafe;
    border-color: #3b82f6;
}

/* Empty State Dark Mode */
body.dark-mode .empty-state {
    background: #1e293b;
}

body.dark-mode .empty-state i {
    color: #475569;
}

/* Pagination Dark Mode */
body.dark-mode .pagination .btn-outline {
    border-color: #475569;
    color: var(--text-color);
}

body.dark-mode .pagination .btn-outline:hover {
    background: #334155;
}

/* Tabs Dark Mode */
body.dark-mode .tabs {
    border-color: var(--border-color);
}

body.dark-mode .tab-btn {
    color: var(--text-muted);
}

body.dark-mode .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Order Status Dark Mode */
body.dark-mode .status-pending { background: #78350f; color: #fcd34d; }
body.dark-mode .status-processing { background: #1e3a8a; color: #93c5fd; }
body.dark-mode .status-shipped { background: #312e81; color: #c7d2fe; }
body.dark-mode .status-delivered { background: #14532d; color: #86efac; }
body.dark-mode .status-cancelled { background: #7f1d1d; color: #fca5a5; }

body.dark-mode .payment-pending { background: #78350f; color: #fcd34d; }
body.dark-mode .payment-paid { background: #14532d; color: #86efac; }
body.dark-mode .payment-failed { background: #7f1d1d; color: #fca5a5; }


/* Additional Dark Mode Text Fixes */
body.dark-mode .cart-item .item-name,
body.dark-mode .checkout-item .item-name,
body.dark-mode .order-item-mini .item-name,
body.dark-mode .order-item-detailed h4 {
    color: #e2e8f0;
}

body.dark-mode .cart-item .item-price,
body.dark-mode .checkout-item .item-price,
body.dark-mode .order-item-mini .item-qty,
body.dark-mode .order-item-detailed .item-price {
    color: #94a3b8;
}

body.dark-mode .cart-total,
body.dark-mode .summary-row,
body.dark-mode .order-total {
    color: #e2e8f0;
}

body.dark-mode .empty-state h3,
body.dark-mode .empty-state p {
    color: #e2e8f0;
}

body.dark-mode .view-all {
    color: var(--primary-color);
}

body.dark-mode .product-card .product-title a:hover {
    color: #60a5fa;
}

body.dark-mode .sale-price {
    color: #f87171;
}


/* =====================================================
   Mobile Optimizations
   ===================================================== */

@media (max-width: 768px) {
    /* Reduce font sizes */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    /* Smaller padding */
    .container {
        padding: 0 12px;
    }
    
    .section {
        padding: 30px 0;
    }
    
    /* Header adjustments */
    .header-inner {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo i {
        font-size: 22px;
    }
    
    .header-action {
        font-size: 12px;
    }
    
    .header-action i {
        font-size: 16px;
    }
    
    /* Hero section smaller */
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 28px !important;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Product cards smaller */
    .product-card {
        font-size: 13px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .sale-price {
        font-size: 16px;
    }
    
    .btn-add-cart {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Categories smaller */
    .category-card {
        padding: 20px 15px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .category-icon i {
        font-size: 20px;
    }
    
    .category-image {
        width: 60px;
        height: 60px;
    }
    
    /* Forms smaller */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Tables scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
    }
    
    /* Cart items smaller */
    .cart-item {
        padding: 12px 0;
    }
    
    .item-image img {
        width: 60px;
        height: 60px;
    }
    
    /* Auth forms */
    .auth-box {
        padding: 30px 20px;
    }
    
    .auth-header i {
        font-size: 48px;
    }
    
    /* Footer smaller */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 16px;
    }
    
    .footer-section p,
    .footer-section ul li {
        font-size: 13px;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    /* Even smaller for very small phones */
    body {
        font-size: 13px;
    }
    
    .hero h1 {
        font-size: 22px !important;
    }
    
    .section-header h2 {
        font-size: 18px !important;
    }
    
    /* Two columns for products on small phones */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card .product-title {
        font-size: 12px;
    }
    
    .product-card .sale-price {
        font-size: 14px;
    }
    
    .btn-add-cart {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* Stats grid 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-item i {
        font-size: 24px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Categories 2 columns */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 15px 10px;
    }
    
    .category-card h3 {
        font-size: 14px;
    }
    
    .category-card p {
        font-size: 11px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    .btn,
    .header-action,
    .nav-menu a,
    .dropdown-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .qty-btn {
        min-width: 36px;
        min-height: 36px;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}


/* =====================================================
   Mobile Menu - Desktop/Mobile visibility
   ===================================================== */

/* Desktop only - hide on mobile */
.desktop-only {
    display: flex;
}

/* Mobile only - hide on desktop */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    /* Hide desktop elements on mobile */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile elements */
    .mobile-only {
        display: block !important;
    }
    
    /* Mobile navigation styling */
    .main-nav.open {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        z-index: 99;
        overflow-y: auto;
    }
    
    body.dark-mode .main-nav.open {
        background: #0f172a;
    }
    
    .main-nav.open .nav-menu {
        flex-direction: column;
        padding: 20px;
    }
    
    .main-nav.open .nav-menu li {
        border-bottom: 1px solid #e2e8f0;
    }
    
    body.dark-mode .main-nav.open .nav-menu li {
        border-bottom-color: #334155;
    }
    
    .main-nav.open .nav-menu a {
        padding: 15px 0;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #1e293b !important;
        font-size: 16px;
        font-weight: 500;
    }
    
    body.dark-mode .main-nav.open .nav-menu a {
        color: #e2e8f0 !important;
    }
    
    .main-nav.open .nav-menu a i {
        width: 20px;
        text-align: center;
        color: #3b82f6;
    }
    
    body.dark-mode .main-nav.open .nav-menu a i {
        color: #60a5fa;
    }
    
    .main-nav.open .dropdown {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: var(--light-color);
        margin-left: 30px;
    }
    
    body.dark-mode .main-nav.open .dropdown {
        background: #1e293b;
    }
    
    .main-nav.open .has-dropdown.open .dropdown {
        display: block;
    }
    
    .main-nav.open .dropdown a {
        padding: 10px 15px;
        color: #334155 !important;
        font-size: 14px;
        font-weight: 400;
    }
    
    body.dark-mode .main-nav.open .dropdown a {
        color: #cbd5e1 !important;
    }
}


/* Mobile dropdown toggle button */
.dropdown-toggle-btn {
    margin-left: auto;
    padding: 5px 10px;
    cursor: pointer;
}

.dropdown-toggle-btn i {
    transition: transform 0.3s;
}

.has-dropdown.open .dropdown-toggle-btn i {
    transform: rotate(180deg);
}

/* =====================================================
   Wallet & Topup
   ===================================================== */

/* Wallet Card in Profile */
.wallet-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 20px;
    margin: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.wallet-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.wallet-label i {
    margin-right: 5px;
}

.wallet-amount {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.wallet-card .btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
}

.wallet-card .btn:hover {
    background: var(--light-color);
}

/* Topup Page */
.topup-layout {
    max-width: 600px;
    margin: 0 auto;
}

.balance-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 30px;
}

.balance-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.balance-amount {
    font-size: 36px;
    font-weight: 700;
}

.topup-form-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.amount-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.amount-btn {
    padding: 15px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

.amount-btn:hover,
.amount-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

.payment-method {
    margin: 25px 0;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option.active,
.payment-option:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
}

.payment-option i {
    font-size: 28px;
    color: var(--primary-color);
}

.payment-option span {
    font-weight: 500;
}

.topup-note {
    margin-top: 25px;
    padding: 20px;
    background: var(--light-color);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-muted);
}

.topup-note ul {
    margin-top: 10px;
    margin-left: 20px;
}

.topup-note li {
    margin-bottom: 5px;
}

/* Topup History */
.topup-actions {
    margin-bottom: 20px;
}

.status-pending {
    color: var(--warning-color);
}

.status-approved {
    color: var(--success-color);
}

.status-rejected,
.status-cancelled {
    color: var(--danger-color);
}

/* Topup Status Page */
.topup-status-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

.status-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.status-icon.status-pending {
    color: var(--warning-color);
}

.status-icon.status-approved {
    color: var(--success-color);
}

.status-icon.status-rejected,
.status-icon.status-cancelled {
    color: var(--danger-color);
}

.status-info h2 {
    margin-bottom: 10px;
}

.status-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.status-desc {
    color: var(--text-muted);
}

.status-details {
    background: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-muted);
}

.detail-row .value {
    font-weight: 500;
}

.detail-row .value.amount {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 700;
}

.qr-section {
    text-align: center;
    margin-bottom: 25px;
}

.qr-section h3 {
    margin-bottom: 20px;
}

.qr-placeholder {
    background: var(--light-color);
    padding: 40px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.qr-placeholder i {
    font-size: 120px;
    color: var(--text-muted);
}

.qr-placeholder p {
    margin-top: 15px;
    color: var(--text-muted);
}

.qr-note {
    font-weight: 600;
    color: var(--primary-color);
}

.qr-instructions {
    text-align: left;
    background: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
}

.qr-instructions ol {
    margin-top: 10px;
    margin-left: 20px;
}

.qr-instructions li {
    margin-bottom: 8px;
}

.status-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* =====================================================
   Mobile Optimizations
   ===================================================== */
@media (max-width: 768px) {
    /* Hero Section Mobile */
    .hero {
        padding: 40px 0 30px !important;
    }
    
    .hero-content {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 24px !important;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .hero p {
        font-size: 14px !important;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Stats Section Mobile */
    .stats-section {
        padding: 20px 16px !important;
        margin-top: -15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .stat-item {
        padding: 16px 8px;
    }
    
    .stat-item i {
        font-size: 24px !important;
        margin-bottom: 8px;
    }
    
    .stat-number {
        font-size: 20px !important;
        font-weight: 600;
    }
    
    .stat-label {
        font-size: 12px !important;
    }
    
    /* Section Mobile */
    .section {
        padding: 30px 0 !important;
    }
    
    .section-header {
        padding: 0 16px;
        margin-bottom: 20px !important;
    }
    
    .section-header h2 {
        font-size: 18px !important;
    }
    
    .section-header h2 i {
        font-size: 18px;
    }
    
    /* Category Cards Mobile */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 16px;
    }
    
    .category-card {
        padding: 16px 12px !important;
    }
    
    .category-icon {
        width: 44px !important;
        height: 44px !important;
    }
    
    .category-icon i {
        font-size: 18px !important;
    }
    
    .category-image {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 10px !important;
    }
    
    .category-card h3 {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .category-card p {
        font-size: 11px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Product Grid Mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
        padding: 0 20px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-info {
        padding: 12px !important;
    }
    
    .product-title {
        font-size: 13px !important;
        -webkit-line-clamp: 2;
    }
    
    .product-price .sale-price {
        font-size: 14px !important;
    }
    
    .btn-add-cart {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    /* Container padding */
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Even smaller screens */
    .hero h1 {
        font-size: 20px !important;
    }
    
    .stats-grid {
        gap: 8px !important;
    }
    
    .stat-item {
        padding: 12px 4px;
    }
    
    .stat-number {
        font-size: 18px !important;
    }
    
    .categories-grid {
        gap: 8px !important;
    }
    
    .category-card {
        padding: 12px 8px !important;
    }
    
    .products-grid {
        gap: 8px !important;
    }
}

/* Fix Header Mobile Padding */
@media (max-width: 768px) {
    .header-inner {
        padding: 12px 16px !important;
    }
    
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Fix Footer Mobile Padding */
@media (max-width: 768px) {
    .footer {
        padding: 40px 16px 20px !important;
    }
    
    .footer-grid {
        gap: 24px !important;
    }
    
    .footer-section {
        padding: 0;
    }
    
    .footer-section h3,
    .footer-section h4 {
        margin-bottom: 12px;
    }
    
    .footer-section p {
        margin-bottom: 16px;
    }
    
    .social-links {
        gap: 8px;
    }
    
    .footer-bottom {
        padding-top: 20px;
        margin-top: 20px;
    }
}

/* =====================================================
   Global Mobile Padding Fix
   ===================================================== */
@media (max-width: 768px) {
    /* Apply padding to all main content areas */
    .hero,
    .section,
    .stats-section,
    .product-detail,
    .auth-section,
    .cart-section,
    .orders-section,
    .profile-section,
    .checkout-section,
    .page-content {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Fix containers */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Fix product detail page */
    .product-info-detail {
        padding: 20px 16px !important;
    }
    
    /* Fix cart page */
    .cart-container {
        padding: 16px !important;
    }
    
    /* Fix auth pages */
    .auth-box {
        padding: 24px 16px !important;
    }
    
    /* Fix checkout page */
    .checkout-container {
        padding: 16px !important;
    }
    
    /* Fix profile page */
    .profile-content {
        padding: 16px !important;
    }
    
    /* Fix product grid gap */
    .products-grid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Fix categories grid */
    .categories-grid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Fix section header */
    .section-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .hero,
    .section,
    .stats-section,
    .product-detail,
    .auth-section,
    .cart-section,
    .orders-section,
    .profile-section,
    .checkout-section,
    .page-content,
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* Fix product detail page mobile */
@media (max-width: 768px) {
    .product-detail {
        padding: 16px !important;
        gap: 24px !important;
    }
    
    .product-images {
        padding: 0 !important;
    }
    
    .product-info-detail {
        padding: 0 !important;
    }
    
    .product-actions-bar {
        padding: 16px !important;
        margin: 0 -16px !important;
    }
    
    .share-section {
        padding: 16px 0 !important;
    }
    
    .product-features,
    .product-description {
        padding: 16px !important;
        margin: 0 -16px 20px !important;
        border-radius: 0 !important;
    }
    
    .related-products {
        padding: 0 16px !important;
    }
}

/* =====================================================
   Auth Pages Mobile Enhancement
   ===================================================== */
@media (max-width: 768px) {
    .auth-section {
        padding: 20px 16px !important;
    }
    
    .auth-box {
        max-width: 100% !important;
        width: 100% !important;
        padding: 32px 20px !important;
        border-radius: 16px !important;
    }
    
    .auth-box.wide {
        max-width: 100% !important;
    }
    
    .auth-header {
        margin-bottom: 32px !important;
    }
    
    .auth-header i {
        font-size: 64px !important;
    }
    
    .auth-header h1 {
        font-size: 28px !important;
    }
    
    .auth-header p {
        font-size: 16px !important;
    }
    
    .auth-form .form-group {
        margin-bottom: 20px !important;
    }
    
    .auth-form label {
        font-size: 16px !important;
        margin-bottom: 8px !important;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .auth-form label i {
        font-size: 18px !important;
    }
    
    .auth-form input {
        height: 52px !important;
        font-size: 16px !important;
        padding: 0 16px !important;
        border-radius: 12px !important;
    }
    
    .password-input input {
        padding-right: 50px !important;
    }
    
    .toggle-password {
        right: 16px !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .form-options {
        margin: 20px 0 !important;
    }
    
    .form-options label {
        font-size: 14px !important;
    }
    
    .form-options input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
    }
    
    .forgot-password {
        font-size: 14px !important;
    }
    
    .auth-form .btn-lg {
        height: 52px !important;
        font-size: 18px !important;
        border-radius: 12px !important;
        margin-top: 8px !important;
    }
    
    .auth-footer {
        margin-top: 24px !important;
        padding-top: 24px !important;
        font-size: 16px !important;
    }
    
    .auth-footer a {
        font-size: 16px !important;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 16px 12px !important;
    }
    
    .auth-box {
        padding: 24px 16px !important;
        border-radius: 12px !important;
    }
    
    .auth-header h1 {
        font-size: 24px !important;
    }
    
    .auth-header p {
        font-size: 14px !important;
    }
    
    .auth-form input {
        height: 48px !important;
        font-size: 16px !important;
    }
    
    .auth-form .btn-lg {
        height: 48px !important;
        font-size: 16px !important;
    }
}

/* =====================================================
   Mobile Menu Dropdown
   ===================================================== */
.mobile-menu {
    position: absolute;
    top: 100%;
    right: 16px;
    width: 280px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.mobile-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.mobile-menu-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: #2a2a2a;
    color: #fff;
}

.mobile-menu-nav {
    padding: 8px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-menu-item:hover {
    background: #252525;
    color: #fff;
}

.mobile-menu-item i {
    width: 20px;
    text-align: center;
    color: #888;
}

.mobile-menu-item:hover i {
    color: #3b82f6;
}

.mobile-menu-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 8px 16px;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* Light mode adjustments */
body:not(.dark-mode) .mobile-menu {
    background: #fff;
    border-color: #e5e5e5;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

body:not(.dark-mode) .mobile-menu-header {
    border-color: #e5e5e5;
}

body:not(.dark-mode) .mobile-menu-title {
    color: #1a1a1a;
}

body:not(.dark-mode) .mobile-menu-close {
    color: #666;
}

body:not(.dark-mode) .mobile-menu-close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

body:not(.dark-mode) .mobile-menu-item {
    color: #333;
}

body:not(.dark-mode) .mobile-menu-item:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

body:not(.dark-mode) .mobile-menu-item i {
    color: #666;
}

body:not(.dark-mode) .mobile-menu-divider {
    background: #e5e5e5;
}

/* =====================================================
   Header Mamomi Store Style
   ===================================================== */

/* Dark Header */
.header {
    background: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: 60px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.logo i {
    font-size: 24px;
    color: #3b82f6;
}

/* Credit Badge */
.credit-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 6px 12px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

@media (max-width: 480px) {
    .credit-badge {
        padding: 5px 10px;
        font-size: 12px;
        gap: 4px;
    }
    .credit-badge i {
        font-size: 14px;
    }
    .credit-currency {
        display: none;
    }
}

.credit-badge:hover {
    background: #252525;
    border-color: #3b82f6;
}

.credit-badge i {
    color: #3b82f6;
    font-size: 16px;
}

.credit-amount {
    color: #fff;
}

.credit-currency {
    color: #888;
    font-size: 12px;
    font-weight: 500;
}

/* Mobile Toggle */
.mobile-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-toggle:hover {
    background: #1a1a1a;
}

/* Mobile Menu Dark Style */
.mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    width: 280px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.mobile-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.mobile-menu-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: #1a1a1a;
    color: #fff;
}

.mobile-menu-nav {
    padding: 8px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.mobile-menu-item:hover {
    background: #1a1a1a;
    color: #fff;
}

.mobile-menu-item i {
    width: 20px;
    text-align: center;
    color: #666;
}

.mobile-menu-item:hover i {
    color: #3b82f6;
}

.mobile-menu-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 8px 16px;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* Dark mode for body */
body.dark-mode {
    background: #0a0a0a;
    color: #fff;
}

body.dark-mode .main-content {
    background: #0a0a0a;
}

/* Hide old elements */
.header-search,
.header-actions .header-action,
.user-menu {
    display: none;
}
