:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Light Theme */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-secondary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hamburger Menu Button */
.menu-btn {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn svg {
    width: 24px;
    height: 24px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo svg {
    width: 28px;
    height: 28px;
    fill: var(--primary);
}

/* Search Link (replaces search bar in header) */
.search-link {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-link:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

.search-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search Icon Button for Mobile */
.search-icon-btn {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

.search-icon-btn svg {
    width: 22px;
    height: 22px;
}

/* Cart Button Desktop */
.cart-btn {
    position: relative;
    background: var(--primary);
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.cart-btn:hover {
    background: var(--primary-dark);
}

.cart-btn svg {
    width: 18px;
    height: 18px;
}

.cart-count {
    background: white;
    color: var(--primary);
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Mobile Cart Button (Floating) */
.cart-btn-mobile {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    z-index: 99;
    align-items: center;
    justify-content: center;
}

.cart-btn-mobile svg {
    width: 22px;
    height: 22px;
}

.cart-btn-mobile .cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    font-size: 0.7rem;
}

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 201;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .logo {
    font-size: 1.2rem;
}

.sidebar-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.sidebar-close:hover {
    color: var(--danger);
}

.sidebar-user {
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.user-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-guest {
    text-align: center;
}

.sidebar-guest p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.sidebar-login-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-login-btn:hover {
    background: var(--primary-dark);
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.sidebar-nav a svg {
    width: 20px;
    height: 20px;
}

.sidebar-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* Categories */
.categories {
    padding: 18px 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 9px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Products Section */
.products-section {
    padding: 16px 0 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.products-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-image {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-image .no-image {
    color: var(--text-muted);
    font-size: 2.5rem;
}

.product-info {
    padding: 14px;
}

.product-category-tag {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
}

/* View Product Button - Blue by default, transparent on active */
.view-product-btn {
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.view-product-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.view-product-btn:active {
    background: transparent;
    color: var(--primary);
}

.view-product-btn svg {
    width: 14px;
    height: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
}

/* Product Detail Page */
.product-detail {
    padding: 32px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-detail-image {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.product-detail-category {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.product-detail-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 20px;
}

.product-detail-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.product-detail-actions {
    display: flex;
    gap: 12px;
}

.btn-add-cart {
    flex: 1;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

.btn-add-cart.added {
    background: var(--success);
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 28px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.payment-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.payment-logos {
    display: flex;
    align-items: center;
    gap: 16px;
}

.payment-logo {
    height: 26px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.payment-logo:hover {
    opacity: 1;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.auth-modal.active .auth-content {
    transform: scale(1) translateY(0);
}

.auth-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.auth-close:hover {
    color: var(--danger);
}

.auth-body {
    padding: 24px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-form .form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.auth-form .form-group input:focus {
    border-color: var(--primary);
}

.auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-submit:hover {
    background: var(--primary-dark);
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 10px;
    color: var(--danger);
    margin-bottom: 16px;
    text-align: center;
    font-size: 0.85rem;
    display: none;
}

.auth-error.show {
    display: block;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-modal.active {
    opacity: 1;
    visibility: visible;
}

.cart-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.cart-modal.active .cart-content {
    transform: scale(1) translateY(0);
}

.cart-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
}

.cart-header h2 {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.close-cart {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.close-cart:hover {
    color: var(--danger);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 3px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: var(--success);
    font-weight: 600;
    font-size: 0.8rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cart-item-qty {
    font-weight: 600;
    min-width: 22px;
    text-align: center;
    font-size: 0.8rem;
}

.remove-item {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
    align-self: flex-start;
}

.remove-item:hover {
    transform: scale(1.1);
}

.cart-empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-muted);
}

.cart-empty svg {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.cart-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-total-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.cart-total-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
}

.checkout-btn {
    width: 100%;
    padding: 13px;
    background: #25d366;
    border: none;
    border-radius: var(--radius);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.checkout-btn:hover {
    background: #128c7e;
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 12px 22px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast svg {
    color: var(--success);
    width: 18px;
    height: 18px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    opacity: 0.3;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {

    /* Hide desktop search link, show mobile search icon */
    .search-link {
        display: none;
    }

    .search-icon-btn {
        display: flex;
    }

    /* HIDE cart button in header on mobile - use floating button only */
    .cart-btn {
        display: none;
    }

    /* Show floating cart button on mobile */
    .cart-btn-mobile {
        display: flex;
    }

    /* Product grid: 2 columns on mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .product-price {
        font-size: 0.95rem;
    }

    .product-price-row {
        flex-direction: column;
        align-items: stretch;
    }

    .view-product-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .product-category-tag {
        font-size: 0.6rem;
    }

    /* Product Detail Mobile */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-detail {
        padding: 20px 0;
    }

    .product-detail-info h1 {
        font-size: 1.3rem;
    }

    .product-detail-price {
        font-size: 1.5rem;
    }

    .product-detail-actions {
        flex-direction: column;
    }

    .btn-add-cart {
        width: 100%;
    }

    .categories {
        padding: 12px 0;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-title {
        font-size: 1.15rem;
    }

    .toast {
        bottom: 85px;
        left: 14px;
        right: 14px;
        transform: translateX(0) translateY(100px);
    }

    .toast.show {
        transform: translateX(0) translateY(0);
    }

    .pagination {
        gap: 5px;
    }

    .page-btn {
        min-width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .footer {
        padding: 22px 0;
        margin-bottom: 70px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo svg {
        width: 24px;
        height: 24px;
    }

    .category-btn {
        padding: 7px 12px;
        font-size: 0.75rem;
    }

    .product-info {
        padding: 8px;
    }
}

/* ========================================
   ADMIN PANEL STYLES
   ======================================== */

.admin-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--primary);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-nav a,
.admin-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.admin-nav a:hover,
.admin-nav button:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.admin-nav a.active {
    background: var(--primary);
    color: white;
}

.admin-nav a svg,
.admin-nav button svg {
    width: 20px;
    height: 20px;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.admin-table th,
.admin-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-secondary);
}

.admin-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions button {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-xl);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-secondary);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
}

.login-logo {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--primary);
}

.login-box .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 12px;
    color: var(--danger);
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Config Card */
.config-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.config-card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.config-card h3 svg {
    color: #25d366;
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -260px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-main {
        margin-left: 0;
        padding: 20px;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }
}