@import 'variables.css';

/* =========================================================
   PERFORMANCE FIX: DISABLE LOAD TRANSITIONS
   ========================================================= */

.preload * {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
}

.preload .theme-toggle-btn,
.preload .category-btn,
.preload .btn-primary,
.preload .product-card {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

[data-theme="dark"] img.product-image {
    will-change: filter;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-body);
    min-height: 100vh;
    color: var(--text-main);
}

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

/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
    background: var(--primary-gradient);
    color: var(--text-inverse);
    padding: 8px 0;
    font-size: 14px;
    position: relative;
    overflow: visible; /* Allow dropdowns to extend beyond top bar */
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    overflow: visible; /* Allow dropdowns to extend beyond container */
}

/* Top bar widgets container (left side - homepage only) */
.top-bar-widgets {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
}

/* Top bar actions container (right side - always visible) */
.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

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

.contact-info a {
    color: white;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.divider {
    opacity: 0.5;
}

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

.login-link {
    color: white;
    text-decoration: none;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
}

/* ========================================
   MAIN HEADER
   ======================================== */
.main-header {
    background: var(--bg-header);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible; /* Allow top bar dropdowns to extend below */
    border-bottom: 1px solid var(--border-color);
}

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

.logo h1 {
    font-size: 28px;
    color: #e91e63;
    margin: 0;
}

.logo .tagline {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.search-box {
    flex: 1;
    max-width: 600px;
    display: flex;
    gap: 10px;
    position: relative;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 8px;
}

.search-suggestions.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-header {
    padding: 12px 16px;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-header .clear-history {
    font-size: 11px;
    color: #e91e63;
    cursor: pointer;
    text-transform: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: #fff5f8;
}

.suggestion-item img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
}

.suggestion-item .no-image {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.suggestion-name mark {
    background: #ffe0e8;
    color: #e91e63;
    padding: 0 2px;
    border-radius: 2px;
}

.suggestion-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.suggestion-price {
    font-weight: 600;
    color: #e91e63;
    font-size: 14px;
    white-space: nowrap;
}

.suggestion-category {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.suggestion-category:hover {
    background: #fff5f8;
}

.suggestion-category .cat-icon {
    font-size: 16px;
}

.suggestion-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: #e91e63;
    font-weight: 600;
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-all:hover {
    background: #fff5f8;
}

.search-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-history-item:hover {
    background: #fff5f8;
}

.search-history-item .history-icon {
    color: #999;
    font-size: 14px;
}

.search-history-item .history-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.search-history-item .remove-history {
    color: #999;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.search-history-item:hover .remove-history {
    opacity: 1;
}

.no-results {
    padding: 30px 16px;
    text-align: center;
    color: #999;
}

.no-results .no-results-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.no-results p {
    font-size: 14px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ffc0cb;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #e91e63;
}

.search-btn {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.05);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: transform 0.2s;
}

.cart-link:hover {
    transform: scale(1.05);
}

.cart-badge {
    background: #fff;
    color: #e91e63;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
}

/* ========================================
   CATEGORIES NAVIGATION
   ======================================== */
.categories-nav {
    background: white;
    border-bottom: 2px solid #ffc0cb;
    padding: 15px 0;
    overflow-x: auto;
}

.categories-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.category-btn {
    background: white;
    border: 2px solid #ffc0cb;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
    color: #666;
    font-weight: 500;
}

.category-btn:hover {
    background: #fff0f5;
    border-color: #ff69b4;
}

.category-btn.active {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    border-color: #e91e63;
    color: white;
}

/* App Navigation Bar - Pink themed buttons */
.app-nav-bar {
    background: #fff5f8;
    padding: 10px 0;
    border-bottom: 1px solid #ffc0cb;
}

.app-nav .category-btn {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-nav .category-btn:hover {
    background: linear-gradient(135deg, #c2185b 0%, #e91e63 100%);
    transform: scale(1.02);
}

.app-nav .category-btn .cart-badge {
    background: #fff;
    color: #e91e63;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* ========================================
   FILTERS BAR
   ======================================== */
.filters-bar {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid #ffc0cb;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    background: white;
    cursor: pointer;
    min-width: 140px;
    transition: all 0.2s ease;
    color: #333;
}

.filter-select:hover {
    border-color: #ff9eb5;
    box-shadow: 0 2px 8px rgba(255, 158, 181, 0.3);
}

.filter-select:focus {
    border-color: #ff7a9e;
    box-shadow: 0 0 0 3px rgba(255, 122, 158, 0.15);
}

.results-info {
    margin-left: auto;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* New Filter Layout - Dropdown Based */
.filters-section {
    background: white;
    padding: 18px 24px;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.filters-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f5f5f5;
    gap: 15px;
    flex-wrap: wrap;
}

.filters-info-row:empty,
.filters-info-row:not(:has(.filter-tag)):not(:has(#resultsCount:not(:empty))) {
    display: none;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filters:empty {
    display: none;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe8ef 100%);
    color: #d4619e;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ffd1dc;
}

.filter-tag:hover {
    background: linear-gradient(135deg, #ffe8ef 0%, #ffd1dc 100%);
    color: #c44a8a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 97, 158, 0.2);
}

/* Searchable Select Dropdown */
.searchable-select {
    position: relative;
    min-width: 160px;
}

.searchable-input {
    cursor: text;
    padding-right: 32px;
    width: 100%;
    box-sizing: border-box;
}

.searchable-select::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    font-size: 14px;
}

.searchable-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: white;
    border: 2px solid #ffc0cb;
    border-radius: 15px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.searchable-dropdown.show {
    display: block;
    animation: dropdownFade 0.15s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.searchable-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f5f5f5;
}

.searchable-option:last-child {
    border-bottom: none;
}

.searchable-option:hover,
.searchable-option.highlighted {
    background: #fff0f5;
}

.searchable-option.selected {
    background: #ffe8ef;
    color: #d4619e;
    font-weight: 600;
}

.searchable-option:first-child {
    border-radius: 13px 13px 0 0;
}

.searchable-option:last-child {
    border-radius: 0 0 13px 13px;
}

.searchable-no-results {
    padding: 12px 16px;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* ========================================
   PRODUCTS GRID
   ======================================== */
.main-content {
    padding: 20px 0 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.2);
}

/* Product Image Wrapper for fallback handling */
.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f9 100%);
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: transparent;
    position: relative;
    z-index: 1;
}

/* No Image Fallback for Product Cards */
.product-image-wrapper .no-image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f9 100%);
}

.product-image-wrapper .no-image-icon {
    font-size: 48px;
    opacity: 0.4;
}

/* ========================================
   VARIANT SWATCHES (Product Card)
   ======================================== */
.variant-swatches {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
    z-index: 10;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 8px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.variant-swatch {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    background: white;
    flex-shrink: 0;
}

.variant-swatch:hover {
    transform: scale(1.1);
    border-color: #e91e63;
    box-shadow: 0 3px 10px rgba(233, 30, 99, 0.3);
}

.variant-swatch.active {
    border-color: #e91e63;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #e91e63;
}

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

.variant-swatch-more {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Make swatches smaller on mobile */
@media (max-width: 480px) {
    .variant-swatches {
        gap: 4px;
    }
    .variant-swatch {
        width: 28px;
        height: 28px;
    }
}

/* ========================================
   VARIANT THUMBNAILS (Product Detail Gallery)
   ======================================== */
.gallery-thumbnail.variant-thumbnail {
    border-color: #e91e63;
}

.gallery-thumbnail.variant-thumbnail .thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(233, 30, 99, 0.9);
    color: white;
    font-size: 9px;
    padding: 2px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-brand {
    font-size: 12px;
    color: #e91e63;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #e91e63;
    margin-top: auto;
}

.product-stock {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.product-stock.in-stock {
    color: #4caf50;
}

.product-stock.low-stock {
    color: #ff9800;
}

.product-stock.out-of-stock {
    color: #f44336;
}

/* ========================================
   QUICK ADD TO CART BUTTON & BADGE
   ======================================== */
/* Cart quantity badge on product card (top right) */
.product-cart-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.4);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-cart-badge.show {
    opacity: 1;
    transform: scale(1);
}

.product-cart-badge.pulse {
    animation: badgePulse 0.4s ease;
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Quick add button (bottom right of image area) */
.quick-add-btn {
    position: absolute;
    top: 228px; /* 280px image height - 42px button - 10px padding */
    right: 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
    transition: all 0.2s ease;
    z-index: 20;
    opacity: 0;
    transform: scale(0.8) translateY(10px);
}

.product-card:hover .quick-add-btn,
.product-card:focus-within .quick-add-btn {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Always show on mobile/touch devices */
@media (hover: none) {
    .quick-add-btn {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.quick-add-btn:hover {
    transform: scale(1.1) translateY(0);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.5);
}

.quick-add-btn:active {
    transform: scale(0.95) translateY(0);
}

.quick-add-btn.adding {
    pointer-events: none;
}

.quick-add-btn.adding::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
}

.quick-add-btn.success {
    background: #4caf50;
}

.quick-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Pre-order quick-add button (orange) */
.quick-add-btn.preorder-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.quick-add-btn.preorder-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

/* Toast for quick add feedback */
.quick-add-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-add-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   UPDATE NOTIFICATION TOAST
   ======================================== */
.update-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 10001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.update-toast button {
    background: white;
    color: #2E7D32;
    border: none;
    padding: 6px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.update-toast button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.update-toast button.dismiss {
    background: transparent;
    color: white;
    padding: 4px 8px;
    font-size: 18px;
    opacity: 0.8;
}

.update-toast button.dismiss:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.spinner {
    border: 4px solid #ffc0cb;
    border-top: 4px solid #e91e63;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-state .empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.btn-page {
    background: white;
    border: 2px solid #ffc0cb;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    transition: all 0.3s;
}

.btn-page:hover:not(:disabled) {
    background: #fff0f5;
    border-color: #ff69b4;
}

.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Page Numbers */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-page-num {
    width: 38px;
    height: 38px;
    border: 2px solid #ffc0cb;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-page-num:hover {
    background: #fff0f5;
    border-color: #ff69b4;
}

.btn-page-num.active {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    border-color: #e91e63;
    color: white;
}

.page-ellipsis {
    color: #999;
    padding: 0 5px;
}

.page-info {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* ========================================
   FOOTER - Modern Aesthetic Design
   ======================================== */
.footer {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 50%, #e91e63 100%);
    color: white;
    padding: 50px 0 25px;
    margin-top: 60px;
    position: relative;
}

/* Simple Footer Variant */
.footer.footer-simple {
    padding: 30px 0 20px;
}

.footer-simple-content {
    text-align: center;
}

.footer-simple-content .footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.footer-simple-content .footer-info {
    margin-bottom: 15px;
}

.footer-simple-content .footer-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 5px 0;
    line-height: 1.6;
}

.footer-simple-content .footer-info a {
    color: white;
    text-decoration: none;
}

.footer-simple-content .footer-info a:hover {
    text-decoration: underline;
}

.footer-simple-content .footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: 0;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff69b4, #ffc0cb, #ff69b4);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 50px;
    margin-bottom: 35px;
}

.footer-section h3 {
    color: #ff69b4;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h4 {
    color: #ffc0cb;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #ff69b4, transparent);
}

.footer-section p {
    line-height: 1.7;
    color: #b8c5d6;
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-section .tagline {
    font-style: italic;
    color: #ffc0cb;
}

.footer-section .brands-list {
    font-size: 13px;
    color: #8899aa;
}

.footer-section .brands-list strong {
    color: #ffc0cb;
}

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

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

.footer-section ul li a {
    color: #b8c5d6;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: #ff69b4;
    padding-left: 5px;
}

/* Contact Section Styling */
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.footer-contact-item:hover {
    background: rgba(255, 105, 180, 0.1);
    transform: translateX(3px);
}

.footer-contact-icon {
    font-size: 18px;
    min-width: 24px;
}

.footer-contact-info {
    flex: 1;
}

.footer-contact-info a {
    color: #ffc0cb;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: block;
    transition: color 0.3s;
}

.footer-contact-info a:hover {
    color: #ff69b4;
}

.contact-note {
    font-size: 11px;
    color: #7a8899;
    display: block;
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #7a8899;
    font-size: 13px;
}

.footer-bottom p {
    margin: 0;
}

/* Footer Responsive */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }
}

@media (max-width: 600px) {
    .footer {
        padding: 40px 0 20px;
    }

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

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact-item {
        justify-content: center;
        text-align: left;
    }

    .footer-section ul li a:hover {
        padding-left: 0;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
    }
    
    .logo {
        flex-shrink: 0;
    }
    
    .search-box {
        display: none; /* Hide search on mobile, keep logo and cart aligned */
    }
    
    .cart-link {
        flex-shrink: 0;
    }
    
    .categories-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .categories-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .filters-section {
        padding: 12px 15px;
    }

    .filters-row {
        flex-direction: column;
        gap: 12px;
    }

    .filters-info-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .active-filters {
        order: -1;
        width: 100%;
    }

    .results-info {
        margin-left: 0;
        text-align: left;
        width: 100%;
    }
    
    .results-info {
        margin-left: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-image {
        height: 200px;
    }

    .product-name {
        font-size: 14px;
        min-height: 40px;
    }

    .product-price {
        font-size: 18px;
    }
}

/* ========================================
   PRODUCT DETAIL PAGE
   ======================================== */

/* Simple Header for Detail Pages */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-btn {
    color: #e91e63;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.back-btn:hover {
    color: #c2185b;
}

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

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.btn-icon:hover {
    background: #fff0f5;
}

.cart-btn .cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e91e63;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 20px;
}

.loading-state p {
    color: #666;
    margin-top: 15px;
}

/* Product Detail Container */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px 0;
}

/* Product Image Section */
.product-image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f9 100%);
    min-height: 300px;
}

.product-detail-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 15px;
    background: transparent;
    display: block;
}

/* No Image Placeholder */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f9 100%);
    border-radius: 15px;
    color: #999;
}

.no-image-icon {
    font-size: 64px;
    opacity: 0.5;
    margin-bottom: 15px;
}

.no-image-text {
    font-size: 14px;
    color: #999;
}

/* Image Gallery Thumbnails */
.image-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: thin;
    scrollbar-color: #ffc0cb #fff;
}

.image-gallery::-webkit-scrollbar {
    height: 6px;
}

.image-gallery::-webkit-scrollbar-track {
    background: #fff5f9;
    border-radius: 3px;
}

.image-gallery::-webkit-scrollbar-thumb {
    background: #ffc0cb;
    border-radius: 3px;
}

.gallery-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: #fff5f9;
}

.gallery-thumbnail:hover {
    border-color: #ffc0cb;
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    border-color: #e91e63;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

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

.thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 9px;
    padding: 2px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

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

.badge.in-stock {
    background: #e8f5e9;
    color: #4caf50;
}

.badge.low-stock {
    background: #fff3e0;
    color: #ff9800;
}

.badge.out-of-stock {
    background: #ffebee;
    color: #f44336;
}

/* Product Info Section */
.product-info-section {
    padding: 20px 0;
}

.product-info-section .product-brand {
    font-size: 14px;
    color: #e91e63;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* Price Section */
.product-price-section {
    margin-bottom: 25px;
}

.price-primary {
    font-size: 32px;
    font-weight: bold;
    color: #e91e63;
}

.price-note {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Section Labels */
.section-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

/* Variants Section */
.variants-section {
    margin-bottom: 25px;
}

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

.variant-option {
    padding: 10px 20px;
    border: 2px solid #ffc0cb;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.variant-option:hover:not(.disabled) {
    border-color: #e91e63;
    color: #e91e63;
}

.variant-option.active {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    border-color: #e91e63;
    color: white;
}

.variant-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Out of stock variants - clickable for pre-order */
.variant-option.out-of-stock {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
    color: #795548;
    cursor: pointer;
}

.variant-option.out-of-stock:hover {
    border-color: #f57c00;
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
}

.variant-option.out-of-stock.active {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-color: #e65100;
    color: white;
}

/* Pre-order label in variant button */
.variant-preorder-label {
    font-size: 12px;
    margin-left: 5px;
}

/* Quantity Section */
.quantity-section {
    margin-bottom: 25px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 150px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ffc0cb;
    border-radius: 50%;
    background: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #e91e63;
}

.qty-btn:hover {
    background: #fff0f5;
    border-color: #e91e63;
}

.qty-input {
    width: 60px;
    height: 40px;
    border: 2px solid #ffc0cb;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    outline: none;
}

.qty-input:focus {
    border-color: #e91e63;
}

/* Remove spinner arrows from number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Description */
.product-description {
    margin-bottom: 25px;
}

.product-description p {
    color: #666;
    line-height: 1.7;
    font-size: 15px;
}

/* Action Buttons */
.action-buttons {
    margin-bottom: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Outline Button - Same design as primary but with border instead of fill */
.btn-outline {
    background: transparent;
    color: #e91e63;
    border: 2px solid #e91e63;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: rgba(233, 30, 99, 0.1);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
}

.btn-outline.btn-large {
    padding: 18px 35px;
    font-size: 18px;
}

.btn-outline.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-warning:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-icon {
    padding: 8px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.btn-icon.btn-danger {
    background: #fee;
    color: #e74c3c;
    padding: 8px;
    border-radius: 50%;
}

.btn-icon.btn-danger:hover {
    background: #e74c3c;
    color: white;
}

.btn-large {
    width: 100%;
    padding: 18px 30px;
    font-size: 18px;
}

/* Product Meta */
.product-meta {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

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

.meta-label {
    color: #999;
    min-width: 80px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    text-align: center;
    max-width: 90vw;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Product Detail Responsive */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-detail-image {
        max-height: 350px;
    }

    .product-title {
        font-size: 22px;
    }

    .price-primary {
        font-size: 26px;
    }

    .header .header-content {
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .product-detail-image {
        max-height: 280px;
    }

    .product-title {
        font-size: 20px;
    }

    .variant-option {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* ========================================
   LOGIN MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Modal Large */
.modal-lg {
    max-width: 700px;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

/* Edit Order Form Styles */
.edit-order-form {
    padding: 10px 0;
}

.edit-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.edit-section:last-of-type {
    border-bottom: none;
}

.edit-section h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.edit-note {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.edit-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edit-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 10px;
    gap: 15px;
}

.edit-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edit-item-info .item-name {
    font-weight: 600;
    color: #333;
}

.edit-item-info .item-variant {
    font-size: 12px;
    color: #888;
}

.edit-item-info .item-price {
    font-size: 13px;
    color: #666;
}

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

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e91e63;
    color: white;
}

.qty-input {
    width: 45px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.item-subtotal {
    font-weight: 600;
    color: #e91e63;
    min-width: 70px;
    text-align: right;
}

.edit-totals {
    margin-top: 15px;
    padding: 15px;
    background: #fff5f7;
    border-radius: 10px;
}

.edit-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.edit-totals-row.discount {
    color: #27ae60;
}

.edit-totals-row.total {
    border-top: 2px solid #ffc0cb;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 700;
}

.edit-totals-row.total span:last-child {
    color: #e91e63;
}

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

.edit-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 15px;
    flex-wrap: wrap;
}

.edit-help {
    margin-top: 20px;
    padding: 15px;
    background: #fff8e1;
    border-radius: 10px;
    font-size: 13px;
    color: #666;
}

.edit-help p {
    margin: 5px 0;
}

.edit-help a {
    color: #25d366;
    font-weight: 600;
}

.error-message {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
}

/* Form Inputs for Edit */
.edit-order-form textarea,
.edit-order-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffc0cb;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.edit-order-form textarea:focus,
.edit-order-form input[type="text"]:focus {
    border-color: #e91e63;
    outline: none;
}

.edit-order-form textarea {
    resize: vertical;
    min-height: 60px;
}

/* Mobile responsiveness for edit form */
@media (max-width: 600px) {
    .edit-item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .edit-item-actions {
        width: 100%;
        justify-content: space-between;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .edit-actions {
        flex-direction: column;
    }

    .edit-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Login step visibility control using .active class */
.login-step {
    display: none;
}

.login-step.active {
    display: block;
}

.login-step h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.phone-input-group {
    display: flex;
    align-items: center;
    border: 2px solid #ffc0cb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.phone-input-group:focus-within {
    border-color: #e91e63;
}

.country-code {
    background: #fff5f9;
    padding: 12px 15px;
    font-weight: 600;
    color: #666;
    border-right: 2px solid #ffc0cb;
}

.phone-input-group input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    outline: none;
}

.input-hint {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 12px;
}

.otp-input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid #ffc0cb;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s;
}

.otp-input:focus {
    border-color: #e91e63;
}

.btn-full {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: #e91e63;
    font-size: 14px;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
}

.btn-link:hover {
    color: #c2185b;
    text-decoration: underline;
}

.resend-section {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
    color: white;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* Login Modal Responsive */
@media (max-width: 480px) {
    .modal-content {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .login-step h2 {
        font-size: 20px;
    }

    .otp-input {
        font-size: 20px;
        letter-spacing: 5px;
    }
}

/* ========================================
   CART PAGE STYLES
   ======================================== */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-variant {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #e91e63;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 5px;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    color: #e91e63;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-btn:hover {
    background: #e91e63;
    color: white;
}

.cart-qty-btn:active {
    transform: scale(0.95);
}

.cart-qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
}

.cart-item-remove {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    padding: 5px;
}

.cart-item-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
    color: #555;
}

.summary-row:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.summary-total {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    padding-top: 15px;
    margin-top: 5px;
    border-top: 2px solid #e91e63;
}

.summary-total span:last-child {
    color: #e91e63;
}

.summary-note {
    font-size: 13px;
    color: #888;
    margin: 10px 0 0 0;
    font-style: italic;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.delivery-note {
    background: #fff8e1;
    border-radius: 10px;
    padding: 15px;
    font-size: 14px;
    color: #795548;
}

.delivery-note p {
    margin: 5px 0;
}

/* ========================================
   CUSTOMER IDENTIFICATION PAGE
   ======================================== */
.identify-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

.identify-container .page-title {
    text-align: center;
    margin-bottom: 10px;
}

.identify-container .page-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Identify step visibility control using .active class */
.identify-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.identify-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Customer Type Selection */
.customer-type-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.customer-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 20px;
    background: white;
    border: 2px solid #eee;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.customer-type-btn:hover {
    border-color: #e91e63;
    background: #fff5f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.15);
}

.customer-type-btn .type-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.customer-type-btn .type-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.customer-type-btn .type-desc {
    font-size: 14px;
    color: #888;
}

/* Identify Form Styles */
.identify-form {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.identify-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.identify-form .form-group {
    margin-bottom: 20px;
}

.identify-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.identify-form input[type="text"],
.identify-form input[type="tel"],
.identify-form input[type="email"],
.identify-form input[type="date"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.identify-form input:focus {
    outline: none;
    border-color: #e91e63;
}

.phone-input-group {
    display: flex;
    align-items: center;
    border: 2px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.phone-input-group:focus-within {
    border-color: #e91e63;
}

.phone-input-group .phone-prefix {
    padding: 14px 12px;
    background: #f8f8f8;
    color: #666;
    font-weight: 500;
    border-right: 1px solid #eee;
}

.phone-input-group input {
    flex: 1;
    border: none !important;
    padding: 14px 16px;
}

.phone-input-group input:focus {
    outline: none;
}

/* DOB Dropdown Group */
.dob-input-group {
    display: flex;
    gap: 10px;
}

.dob-select {
    flex: 1;
    padding: 14px 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.dob-select:focus {
    outline: none;
    border-color: #e91e63;
}

.dob-select option {
    padding: 10px;
}

/* Make month selector wider */
.dob-select:nth-child(2) {
    flex: 1.5;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

/* Consent Checkbox */
.consent-group {
    margin-top: 25px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label .checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #ddd;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-label input:checked + .checkmark {
    background: #e91e63;
    border-color: #e91e63;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.consent-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.consent-text a {
    color: #e91e63;
    text-decoration: none;
}

.consent-text a:hover {
    text-decoration: underline;
}

/* Back Link */
.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
}

.back-link a:hover {
    color: #e91e63;
}

/* OTP Input Group */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
}

.otp-input-group input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #eee;
    border-radius: 10px;
    transition: all 0.2s;
}

.otp-input-group input:focus {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.otp-instruction {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
}

.otp-instruction strong {
    color: #333;
}

/* Error & Success Messages */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.form-error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.attempts-warning {
    text-align: center;
    color: #ff9800;
    font-size: 13px;
    margin-top: 10px;
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-top: 20px;
}

.resend-section p {
    color: #888;
    font-size: 14px;
}

.btn-link {
    background: none;
    border: none;
    color: #e91e63;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.btn-link:hover {
    color: #c2185b;
}

/* Lockout Screen */
.lockout-container {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.lockout-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
}

.lockout-container h2 {
    color: #c62828;
    margin-bottom: 15px;
}

.lockout-timer {
    font-size: 18px;
    margin: 20px 0;
}

.lockout-timer strong {
    font-size: 28px;
    color: #e91e63;
    font-family: monospace;
}

.lockout-help {
    color: #888;
    font-size: 14px;
    margin-top: 20px;
}

.lockout-help a {
    color: #e91e63;
}

/* ========================================
   CHECKOUT PAGE STYLES
   ======================================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.checkout-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Sticky Order Summary (right column on desktop) */
.checkout-grid > .checkout-section:last-child {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.section-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffc0cb;
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: block;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    transition: all 0.3s;
}

.payment-option input[type="radio"]:checked + .payment-label {
    border-color: #e91e63;
    background: #fff5f8;
}

.payment-option.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.payment-option.disabled .payment-label {
    background: #f5f5f5;
    border-color: #ddd;
}

.payment-icon {
    font-size: 24px;
}

/* Order Summary in Checkout */
.order-summary {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.order-summary::-webkit-scrollbar {
    width: 6px;
}

.order-summary::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.order-summary::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.order-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.order-item-details {
    flex: 1;
    min-width: 0;
}

.order-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item-variant {
    font-size: 12px;
    color: #888;
}

.order-item-qty {
    font-size: 13px;
    color: #666;
}

.order-item-price {
    font-weight: 600;
    color: #e91e63;
    white-space: nowrap;
}

.checkout-note {
    background: #e8f5e9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #2e7d32;
}

.checkout-note p {
    margin: 5px 0;
}

/* Delivery Notes Dropdown Form */
.delivery-notes-dropdown-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.dropdown-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.dropdown-icon {
    font-size: 16px;
}

.delivery-dropdown {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 36px;
}

.delivery-dropdown:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.delivery-dropdown:hover {
    border-color: #bbb;
}

.delivery-notes-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.delivery-notes-input:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.delivery-notes-input::placeholder {
    color: #999;
}

.delivery-notes-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
}

.delivery-notes-summary .summary-text {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Property Type Badges */
.property-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.property-type-badge.hdb {
    background-color: #e3f2fd;
    color: #1565c0;
}

.property-type-badge.condo {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.property-type-badge.landed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.property-type-badge.commercial {
    background-color: #fff3e0;
    color: #e65100;
}

/* Condo Delivery Warning */
.condo-delivery-warning {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 10px 0;
    align-items: flex-start;
}

.condo-delivery-warning.error {
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
}

.condo-delivery-warning.info {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
}

.condo-delivery-warning .warning-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.condo-delivery-warning .warning-content {
    flex: 1;
}

.condo-delivery-warning .warning-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.condo-delivery-warning.error .warning-content strong {
    color: #c62828;
}

.condo-delivery-warning.info .warning-content strong {
    color: #1565c0;
}

.condo-delivery-warning .warning-content p {
    font-size: 13px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* Mobile responsive for delivery dropdowns */
@media (max-width: 600px) {
    .dropdown-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .dropdown-label {
        min-width: unset;
    }

    .delivery-dropdown,
    .delivery-notes-input {
        width: 100%;
    }
}

/* SmartPAC Confirmation Modal */
.smartpac-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.smartpac-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smartpac-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.smartpac-icon {
    font-size: 28px;
}

.smartpac-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.smartpac-modal-body {
    padding: 20px 24px;
}

.smartpac-modal-body p {
    margin: 0 0 16px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.smartpac-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.smartpac-checklist li {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #444;
    display: flex;
    align-items: center;
}

.smartpac-checklist li::before {
    content: "✓";
    color: #4caf50;
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
}

.smartpac-modal-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
}

.smartpac-btn-cancel {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.smartpac-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.smartpac-btn-confirm {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #e91e63;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.smartpac-btn-confirm:hover {
    background: #c2185b;
}

/* Success State */
.success-state {
    text-align: center;
    padding: 40px 20px;
}

.success-state h2 {
    color: #4caf50;
    margin-bottom: 10px;
}

.success-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

.order-details {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
    display: inline-block;
}

.order-details p {
    margin: 8px 0;
    font-size: 15px;
}

.success-note {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

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

/* Checkout Responsive */
@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    /* Disable sticky on mobile/tablet */
    .checkout-grid > .checkout-section:last-child {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 600px) {
    .cart-item {
        flex-wrap: wrap;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-item-details {
        flex: 1;
        min-width: calc(100% - 100px);
    }

    .cart-item-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }

    .checkout-section {
        padding: 20px 15px;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions a {
        width: 100%;
    }
}

/* ========================================
   ENHANCED CHECKOUT - TRANSACTION TYPE
   ======================================== */
.transaction-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.transaction-option {
    cursor: pointer;
}

.transaction-option input[type="radio"] {
    display: none;
}

.transaction-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    text-align: center;
}

.transaction-option input:checked + .transaction-card {
    border-color: #e91e63;
    background: #fff5f8;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.15);
}

.transaction-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.transaction-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.transaction-label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.transaction-desc {
    font-size: 12px;
    color: #666;
}

/* ========================================
   ENHANCED CHECKOUT - DELIVERY METHOD
   ======================================== */
.delivery-method-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.delivery-option {
    cursor: pointer;
}

.delivery-option input[type="radio"] {
    display: none;
}

.delivery-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
}

.delivery-option input:checked + .delivery-card {
    border-color: #e91e63;
    background: #fff5f8;
}

.delivery-icon {
    font-size: 28px;
    width: 45px;
    text-align: center;
}

.delivery-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.delivery-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.delivery-desc {
    font-size: 13px;
    color: #666;
}

.delivery-fee {
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    margin-top: 2px;
}

/* ========================================
   ENHANCED CHECKOUT - DATE PICKER
   ======================================== */
.date-picker-container {
    margin-bottom: 25px;
}

.available-dates {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    margin-bottom: 10px;
}

.date-option {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.date-option:hover {
    border-color: #f8bbd9;
}

.date-option.selected {
    border-color: #e91e63;
    background: #fff5f8;
}

.date-day {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

.date-num {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.date-month {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.date-note {
    color: #888;
    font-size: 12px;
}

/* Pickup Time Slots */
.pickup-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}

.time-slot-option {
    padding: 10px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.time-slot-option:hover {
    border-color: #f8bbd9;
}

.time-slot-option.selected {
    border-color: #e91e63;
    background: #fff5f8;
    color: #e91e63;
}

.pickup-hint, .no-dates-msg {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 0.5rem 0;
}

/* ========================================
   ENHANCED CHECKOUT - POSTAL CODE
   ======================================== */
.postal-input-group {
    display: flex;
    gap: 10px;
}

.postal-input-group .form-input {
    flex: 1;
}

.postal-status {
    margin-top: 8px;
    min-height: 20px;
}

.status-success {
    color: #4caf50;
    font-size: 13px;
    font-weight: 500;
}

.status-error {
    color: #f44336;
    font-size: 13px;
}

.status-loading {
    color: #2196f3;
    font-size: 13px;
}

/* ========================================
   ENHANCED CHECKOUT - PHONE INPUT
   ======================================== */
.phone-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-input-group .form-input {
    flex: 1;
    background: #f5f5f5;
}

.phone-verified-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #e8f5e9;
    color: #4caf50;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ========================================
   ENHANCED CHECKOUT - PAYMENT METHODS
   ======================================== */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-option {
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.payment-option input:checked + .payment-label {
    border-color: #e91e63;
    background: #fff5f8;
}

.payment-option.disabled .payment-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-icon {
    font-size: 24px;
    width: 35px;
    text-align: center;
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.payment-desc {
    font-size: 12px;
    color: #666;
}

/* ========================================
   ENHANCED CHECKOUT - STORE CREDIT
   ======================================== */
.credit-warning {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 15px;
}

.credit-warning p {
    margin: 0;
    font-size: 13px;
    color: #e65100;
}

/* ========================================
   ENHANCED CHECKOUT - SMARTPAC SECTION
   ======================================== */
.form-section {
    margin-bottom: 20px;
}

.subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #e91e63;
}

.locker-details {
    margin-top: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #e91e63;
}

.locker-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.locker-hours {
    color: #666;
    font-size: 13px;
    margin-top: 8px;
}

/* ========================================
   ENHANCED CHECKOUT - PICKUP SECTION
   ======================================== */
.pickup-address-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 3px solid #e91e63;
}

.pickup-address-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.pickup-address-card p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.store-hours {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 13px;
}

/* ========================================
   ENHANCED CHECKOUT - SMARTPAC SECTION
   ======================================== */
.smartpac-info-card {
    background: linear-gradient(135deg, #fff5e6 0%, #fff0db 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 3px solid #ff9800;
}

.smartpac-info-card p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.smartpac-info-card .delivery-estimate {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #ffe0b2;
    color: #e65100;
    font-size: 15px;
}

/* ========================================
   ENHANCED CHECKOUT - ORDER STEPS
   ======================================== */
.checkout-steps {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
}

.checkout-steps li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #555;
}

.checkout-steps li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #e91e63;
    font-weight: bold;
}

/* ========================================
   ENHANCED CHECKOUT - RESPONSIVE
   ======================================== */
@media (max-width: 600px) {
    .transaction-type-selector {
        grid-template-columns: 1fr;
    }

    .transaction-card {
        padding: 15px;
    }

    .delivery-card {
        padding: 12px 15px;
    }

    .available-dates {
        gap: 8px;
    }

    .date-option {
        padding: 10px 12px;
        min-width: 60px;
    }

    .date-num {
        font-size: 18px;
    }

    .postal-input-group {
        flex-direction: column;
    }

    .phone-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .phone-verified-badge {
        justify-content: center;
    }

    .payment-label {
        padding: 12px 15px;
    }

    .payment-icon {
        font-size: 20px;
        width: 30px;
    }
}

/* ========================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ======================================== */

/* --- Global Mobile Improvements --- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    /* Top Bar Mobile */
    .top-bar {
        padding: 6px 0;
        font-size: 13px;
    }

    .top-bar-content {
        gap: 8px;
    }

    .top-bar-widgets {
        gap: 6px;
    }

    .top-bar-actions {
        gap: 10px;
    }

    .contact-info {
        font-size: 12px;
    }

    .user-actions {
        gap: 8px;
    }

    .lang-btn {
        padding: 3px 10px;
        font-size: 12px;
    }

    /* Main Header Mobile */
    .main-header {
        padding: 15px 0;
    }

    .logo h1 {
        font-size: 22px;
    }

    .tagline {
        font-size: 12px;
    }

    /* Categories Nav Mobile */
    .categories-nav {
        padding: 12px 0;
    }

    .category-btn {
        padding: 8px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* Main Content Mobile */
    .main-content {
        padding: 15px 0;
    }

    /* Filters Bar Improvements */
    .filters-bar {
        padding: 15px;
        border-radius: 10px;
    }

    .filter-select {
        width: 100%;
        padding: 10px;
    }

    /* Product Card Mobile */
    .product-card {
        border-radius: 10px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 13px;
        line-height: 1.3;
    }

    .product-brand {
        font-size: 11px;
    }

    .product-price {
        font-size: 16px;
    }

    .add-to-cart-btn {
        padding: 10px;
        font-size: 14px;
    }

    /* Cart Link Mobile */
    .cart-link {
        padding: 10px 15px;
        font-size: 14px;
    }

    .cart-badge {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

/* --- Small Mobile (480px and below) --- */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    /* Top bar very small mobile */
    .top-bar {
        padding: 5px 0;
        font-size: 12px;
    }

    .top-bar-content {
        gap: 6px;
    }

    .top-bar-widgets {
        gap: 4px;
    }

    .top-bar-actions {
        gap: 8px;
    }

    /* Hero Section Mobile - Ensure visibility */
    .hero-section {
        padding: 50px 0 !important;
        min-height: 300px !important;
        height: auto !important;
        display: block !important;
        width: 100% !important;
        background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 50%, #ffb3c1 100%) !important;
        text-align: center !important;
        color: white !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    .hero-content {
        position: relative !important;
        z-index: 1 !important;
        display: block !important;
        width: 100% !important;
    }

    .hero-section h2 {
        font-size: 1.6rem !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
        color: white !important;
        font-weight: 700 !important;
        display: block !important;
        width: 100% !important;
    }

    .hero-section p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
        line-height: 1.4 !important;
        color: white !important;
        display: block !important;
        width: 100% !important;
    }

    .hero-btn {
        padding: 12px 28px !important;
        font-size: 15px !important;
        display: inline-block !important;
        font-weight: 700 !important;
        background: white !important;
        color: #e91e63 !important;
        text-decoration: none !important;
        border-radius: 30px !important;
        border: none !important;
        cursor: pointer !important;
    }

    /* Header Adjustments */
    .logo h1 {
        font-size: 20px;
    }

    .search-input {
        font-size: 14px;
        padding: 10px 15px;
    }

    .search-btn {
        padding: 10px 12px;
    }

    /* Categories Scroll */
    .categories-wrapper {
        gap: 8px;
        padding-bottom: 5px;
    }

    .category-btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    /* Product Grid 2 Columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 12px;
        min-height: 36px;
        -webkit-line-clamp: 2;
    }

    .product-price {
        font-size: 15px;
    }

    .add-to-cart-btn {
        padding: 8px;
        font-size: 12px;
    }

    /* Filters Stacked */
    .filter-group {
        width: 100%;
    }

    .filter-group label {
        font-size: 13px;
    }

    /* Modal Mobile */
    .modal {
        padding: 15px;
    }

    .modal-content {
        padding: 20px;
        border-radius: 15px;
        max-width: 100%;
    }

    .login-step h2 {
        font-size: 20px;
    }

    /* Toast Mobile */
    .toast {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 20px;
        max-width: 85vw;
    }
}

/* --- Very Small Screens (360px and below) --- */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .products-grid {
        gap: 8px;
    }

    .product-image {
        height: 130px;
    }

    .product-name {
        font-size: 11px;
    }

    .product-price {
        font-size: 14px;
    }

    .category-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .search-input {
        padding: 8px 12px;
    }
}

/* ========================================
   ACCOUNT PAGE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .account-container {
        padding: 15px;
    }

    .account-header {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .profile-photo {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }

    .profile-info h1 {
        font-size: 20px;
    }

    .account-nav {
        justify-content: center;
    }

    .account-nav button {
        padding: 10px 18px;
        font-size: 13px;
    }

    .account-section {
        padding: 20px 15px;
    }

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

    .credit-balance {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .account-header {
        padding: 20px 15px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .profile-photo {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .profile-info h1 {
        font-size: 18px;
    }

    .profile-info p {
        font-size: 14px;
    }

    .tier-badge {
        font-size: 11px;
        padding: 3px 10px;
    }

    .account-nav {
        gap: 8px;
    }

    .account-nav button {
        padding: 10px 14px;
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }

    .section-title {
        font-size: 16px;
    }

    .order-card {
        padding: 12px;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .order-footer {
        flex-direction: column;
        gap: 10px;
    }

    .credit-card {
        padding: 20px;
    }

    .credit-balance {
        font-size: 24px;
    }
}

/* ========================================
   ORDERS PAGE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .orders-container {
        padding: 15px;
    }

    .orders-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .orders-header h1 {
        font-size: 22px;
    }

    .orders-filters {
        padding: 15px;
    }

    .filter-group {
        flex: 1;
        min-width: calc(50% - 10px);
    }

    .filter-group select,
    .filter-group input {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 0;
    }

    .orders-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    .stat-card .stat-label {
        font-size: 12px;
    }

    .order-card-header {
        padding: 15px;
    }

    .order-card-body {
        padding: 15px;
    }

    .order-items-preview {
        gap: 8px;
    }

    .item-thumb {
        width: 50px;
        height: 50px;
    }

    .order-info {
        gap: 15px;
    }

    .order-total {
        font-size: 18px;
    }

    .order-card-footer {
        padding: 12px 15px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .orders-header h1 {
        font-size: 18px;
    }

    .orders-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
        min-width: 0;
    }

    .orders-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 12px;
    }

    .stat-card .stat-value {
        font-size: 20px;
    }

    .order-card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .order-items-preview {
        flex-wrap: wrap;
    }

    .item-thumb,
    .more-items {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .more-items {
        font-size: 12px;
    }

    .order-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-info {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .order-info-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .order-total {
        align-self: flex-end;
        margin-top: 10px;
    }

    .order-card-footer {
        justify-content: stretch;
    }

    .order-card-footer .btn {
        flex: 1;
        justify-content: center;
    }

    .empty-state {
        padding: 40px 20px;
    }

    .empty-state-icon {
        font-size: 48px;
    }

    .pagination button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ========================================
   CART PAGE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .cart-container {
        padding: 15px;
    }

    .cart-header h1 {
        font-size: 22px;
    }

    .cart-item {
        padding: 15px;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-name {
        font-size: 15px;
    }

    .cart-item-price {
        font-size: 16px;
    }

    .cart-summary {
        padding: 20px;
    }

    .checkout-btn {
        padding: 15px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .cart-item {
        padding: 12px;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-name {
        font-size: 14px;
    }

    .quantity-control button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .quantity-control span {
        width: 30px;
        font-size: 14px;
    }

    .cart-summary-row {
        font-size: 14px;
    }

    .cart-total {
        font-size: 18px;
    }
}

/* ========================================
   ORDER TRACKING PAGE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .tracking-container {
        padding: 15px;
    }

    .tracking-header h1 {
        font-size: 22px;
    }

    .tracking-timeline {
        padding-left: 30px;
    }

    .timeline-item::before {
        left: -25px;
    }

    .order-details-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .tracking-header h1 {
        font-size: 18px;
    }

    .tracking-search input {
        padding: 12px 15px;
    }

    .timeline-item h4 {
        font-size: 14px;
    }

    .timeline-item p {
        font-size: 13px;
    }
}

/* ========================================
   CREDITS PAGE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .credits-container {
        padding: 15px;
    }

    .balance-card {
        padding: 25px;
    }

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

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

    .package-card {
        padding: 20px;
    }

    .package-amount {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .balance-card {
        padding: 20px;
    }

    .balance-amount {
        font-size: 28px;
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }

    .transactions-list {
        padding: 0;
    }

    .transaction-item {
        padding: 12px;
    }
}

/* ========================================
   PRODUCT DETAIL PAGE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .product-detail-container {
        padding: 15px;
    }

    .product-gallery {
        margin-bottom: 20px;
    }

    .product-main-image {
        height: 350px;
    }

    .product-thumbnails {
        gap: 8px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-title {
        font-size: 22px;
    }

    .product-price-main {
        font-size: 26px;
    }

    .variant-options {
        gap: 8px;
    }

    .variant-option {
        padding: 10px 16px;
    }

    .quantity-section {
        flex-wrap: wrap;
    }

    .add-to-cart-large {
        width: 100%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .product-main-image {
        height: 280px;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }

    .product-title {
        font-size: 18px;
    }

    .product-price-main {
        font-size: 22px;
    }

    .variant-option {
        padding: 8px 14px;
        font-size: 13px;
    }

    .product-description {
        font-size: 14px;
    }
}

/* ========================================
   TOUCH-FRIENDLY IMPROVEMENTS
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .category-btn,
    .filter-select,
    .add-to-cart-btn,
    .variant-option {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .product-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
    }

    .product-card:active {
        transform: scale(0.98);
    }

    /* Improve scrolling */
    .categories-wrapper {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .category-btn {
        scroll-snap-align: start;
    }
}

/* ========================================
   LANDSCAPE MOBILE ORIENTATION
   ======================================== */
@media (max-width: 900px) and (orientation: landscape) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .product-detail {
        grid-template-columns: 1fr 1fr;
    }

    .checkout-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-content {
        max-width: 80%;
        max-height: 85vh;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #333;
    }

    .btn-primary {
        border: 2px solid white;
    }

    .category-btn.active {
        border: 2px solid #333;
    }
}

/* ========================================
   FLOATING WHATSAPP BUTTON
   ======================================== */
.floating-wa-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.floating-wa-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.floating-wa-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.floating-wa-btn.active {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.4);
}

.floating-wa-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    animation: slideUp 0.3s ease;
}

.floating-wa-menu.show {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wa-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    white-space: nowrap;
}

.wa-menu-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.wa-menu-item .wa-icon {
    font-size: 20px;
}

.wa-menu-item .wa-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.wa-menu-item .wa-text small {
    font-weight: 400;
    color: #666;
    font-size: 12px;
}

.wa-menu-item.wa-urgent {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ed 100%);
    border: 2px solid #ffb3c1;
}

.wa-menu-item.wa-urgent .wa-icon {
    color: #e91e63;
}

/* ========================================
   HOMEPAGE STYLES
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 50%, #ffb3c1 100%) !important;
    padding: 60px 0 !important;
    text-align: center !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
    width: 100% !important;
    min-height: 250px !important;
    visibility: visible !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.95;
}

.hero-btn {
    display: inline-block;
    background: white;
    color: #e91e63;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* Homepage Sections */
.home-section {
    padding: 50px 0;
}

.home-section.bg-light {
    background: #fff5f9;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.15);
    border-color: #ffc0cb;
}

.category-card .cat-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.category-card .cat-name {
    font-weight: 600;
    font-size: 14px;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.promo-banner h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    position: relative;
}

.promo-banner p {
    opacity: 0.9;
    margin-bottom: 20px;
    position: relative;
}

.promo-banner .promo-btn {
    display: inline-block;
    background: white;
    color: #764ba2;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: transform 0.3s;
}

.promo-banner .promo-btn:hover {
    transform: scale(1.05);
}

/* Featured Products */
.featured-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Brand Logos */
.brand-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    align-items: center;
}

.brand-logo {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.brand-logo:hover {
    color: #e91e63;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.15);
}

/* News/Updates Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.news-card .news-content {
    padding: 20px;
}

.news-card h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
}

.news-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.news-card .news-date {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* View All Button */
.view-all-container {
    text-align: center;
    margin-top: 30px;
}

.view-all-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    color: white;
    padding: 12px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.view-all-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

/* Mobile responsive for homepage */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0 !important;
        min-height: auto !important;
        display: block !important;
        width: 100% !important;
        visibility: visible !important;
        background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 50%, #ffb3c1 100%) !important;
    }

    .hero-content {
        display: block !important;
        width: 100% !important;
        visibility: visible !important;
    }

    .hero-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 12px !important;
        color: white !important;
        display: block !important;
        width: 100% !important;
    }

    .hero-section p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
        color: white !important;
        display: block !important;
        width: 100% !important;
    }

    .hero-btn {
        padding: 12px 30px !important;
        font-size: 15px !important;
        background: white !important;
        color: #e91e63 !important;
        display: inline-block !important;
    }

    .category-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

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

    .category-card .cat-icon {
        font-size: 30px;
    }

    .category-card .cat-name {
        font-size: 12px;
    }

    .promo-banner {
        padding: 25px 20px;
    }

    .promo-banner h3 {
        font-size: 1.3rem;
    }

    .floating-wa-container {
        bottom: 15px;
        right: 15px;
    }

    .floating-wa-btn {
        width: 55px;
        height: 55px;
    }

    .wa-menu-item {
        padding: 10px 15px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .top-bar,
    .main-header,
    .categories-nav,
    .filters-bar,
    .add-to-cart-btn,
    .cart-link,
    .modal,
    .floating-wa-container {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}

/* ========================================
   PRE-ORDER SECTION
   ======================================== */
.preorder-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 15px;
    border: 2px dashed #ff9800;
}

.preorder-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff9800;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}

.preorder-badge .badge-icon {
    font-size: 16px;
}

.preorder-info {
    color: #5d4037;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.preorder-details {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.preorder-details > div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.preorder-details > div:last-child {
    border-bottom: none;
}

.preorder-details .label {
    color: #666;
    font-size: 13px;
}

.preorder-details .value {
    font-weight: 600;
    color: #333;
}

.preorder-note {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 10px;
    padding: 10px;
    background: #ffebee;
    border-radius: 8px;
}

/* Pre-Order Modal */
.preorder-modal-content {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.preorder-modal-summary {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 20px;
}

.preorder-modal-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.preorder-modal-details h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.preorder-modal-variant {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.preorder-modal-qty,
.preorder-modal-price {
    font-size: 14px;
    margin: 3px 0;
}

.preorder-modal-tc {
    margin-bottom: 20px;
}

.preorder-modal-tc h4 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #333;
}

.preorder-tc-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.preorder-tc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.preorder-tc-checkbox input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.preorder-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.preorder-modal-actions button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
}

/* Spinner small for buttons */
.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pre-Order Overlay on Product Image */
.preorder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 152, 0, 0.90);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

.preorder-overlay-content {
    text-align: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.preorder-overlay-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.preorder-overlay-text {
    font-size: 32px;
    font-weight: 800;
    display: block;
    letter-spacing: 2px;
}

.preorder-overlay-subtext {
    font-size: 16px;
    font-weight: 500;
    display: block;
    margin-top: 8px;
    opacity: 0.95;
}

/* Pre-Order Warning Banner */
.preorder-warning-banner {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.preorder-warning-banner .warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.preorder-warning-banner .warning-text {
    flex: 1;
}

.preorder-warning-banner .warning-text strong {
    display: block;
    color: #e65100;
    font-size: 16px;
    margin-bottom: 4px;
}

.preorder-warning-banner .warning-text span {
    color: #795548;
    font-size: 14px;
    line-height: 1.4;
}

/* Pre-Order Button (orange) */
.btn-preorder {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.btn-preorder:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.btn-preorder:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Pre-Order Acknowledge Checkbox */
.preorder-acknowledge-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    padding: 12px;
    background: #fff8e1;
    border: 2px solid #ffb300;
    border-radius: 8px;
}

.preorder-acknowledge-checkbox input {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.preorder-acknowledge-checkbox span {
    color: #e65100;
    font-weight: 600;
    line-height: 1.4;
}

/* Product Grid Pre-Order Badge */
.card-preorder-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff9800;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Mobile adjustments for pre-order */
@media (max-width: 480px) {
    .preorder-modal-summary {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .preorder-modal-image {
        width: 100px;
        height: 100px;
    }

    .preorder-modal-actions {
        flex-direction: column;
    }

    .preorder-modal-actions button {
        width: 100%;
    }

    .preorder-overlay-icon {
        font-size: 36px;
    }

    .preorder-overlay-text {
        font-size: 24px;
    }

    .preorder-overlay-subtext {
        font-size: 14px;
    }

    .preorder-warning-banner {
        padding: 12px;
    }

    .preorder-warning-banner .warning-text strong {
        font-size: 14px;
    }

    .preorder-warning-banner .warning-text span {
        font-size: 13px;
    }
}

/* Pre-Order Cards (Account Page) */
.preorders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preorder-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.preorder-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preorder-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.preorder-number {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.preorder-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 500;
}

.preorder-status.status-pending,
.preorder-status.status-held {
    background: #fff3e0;
    color: #e65100;
}

.preorder-status.status-sourcing {
    background: #e3f2fd;
    color: #1565c0;
}

.preorder-status.status-shipped,
.preorder-status.status-ready {
    background: #e8f5e9;
    color: #2e7d32;
}

.preorder-status.status-fulfilled {
    background: #e8f5e9;
    color: #1b5e20;
}

.preorder-status.status-cancelled,
.preorder-status.status-expired {
    background: #ffebee;
    color: #c62828;
}

.preorder-card-body {
    padding: 15px;
}

.preorder-product {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.preorder-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

.preorder-details h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #333;
}

.preorder-qty,
.preorder-price {
    margin: 3px 0;
    font-size: 13px;
    color: #666;
}

.preorder-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.preorder-date {
    font-size: 12px;
    color: #888;
}

.section-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Clean Footer Support */
.footer-simple {
    background-color: var(--bg-footer);
    color: var(--text-inverse);
}
.footer-link {
    color: var(--text-inverse);
    text-decoration: none;
    font-size: 13px;
}
.footer-divider {
    color: rgba(255,255,255,0.6);
    margin: 0 10px;
}

/* Global Form Dark Mode Fix */
input, select, textarea {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

/* Fix Placeholders (Grey text) */
::placeholder {
    color: var(--text-muted) !important;
}

/* =========================================================
   PHASE 4: DARK MODE CONTENT FIXES (Products & Modals)
   ========================================================= */

@media (prefers-color-scheme: dark) {
    
    /* 1. Fix Product Cards */
    .product-card, .card {
        background-color: var(--bg-card) !important;
        border-color: var(--border-color) !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
    }
    
    /* Fix Product Titles & Prices */
    .product-title, .card-title {
        color: var(--text-main) !important;
    }
    .product-price, .price {
        color: var(--primary-light) !important; /* Make prices pop in pink */
    }

    /* 2. Fix Login Modal & Popups */
    .modal-content, .popup-content {
        background-color: var(--bg-card) !important;
        border: 1px solid var(--border-color);
    }
    .modal-header h2, .login-title {
        color: var(--text-main) !important;
    }
    .modal-close, .close-btn {
        color: var(--text-muted) !important;
    }

    /* 3. Fix Filters & Dropdowns (Shop Page) */
    .filter-section, .dropdown-menu {
        background-color: var(--bg-card) !important;
        color: var(--text-main) !important;
    }
    select {
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    }
}

/* =========================================================
   PHASE 5: DARK MODE COMPLETION & TOGGLE UI
   ========================================================= */

/* --- 1. THE TOGGLE BUTTON UI --- */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color); /* Slight border */
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    margin-left: 10px;
    transition: all 0.3s ease;
}
.theme-toggle-btn:hover {
    background-color: var(--bg-input);
}

/* --- 2. ACCOUNT PAGE FIXES (Overrides internal <style>) --- */
[data-theme="dark"] .account-section,
[data-theme="dark"] .account-nav button {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .section-title {
    color: var(--text-main) !important;
    border-bottom-color: var(--border-color) !important;
}

[data-theme="dark"] .form-group label {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-control {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .order-card {
    border-color: var(--border-color) !important;
    background-color: var(--bg-card) !important;
}

[data-theme="dark"] .order-number,
[data-theme="dark"] .order-total {
    color: var(--primary-light) !important;
}

/* --- 3. CART & CHECKOUT FIXES --- */
[data-theme="dark"] .cart-item,
[data-theme="dark"] .cart-summary {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .empty-state {
    color: var(--text-muted) !important;
}

/* --- 4. PRODUCT NAME FIX (The "Unreadable" Fix) --- */
[data-theme="dark"] .product-name,
[data-theme="dark"] .product-title,
[data-theme="dark"] .card-title {
    color: var(--text-main) !important;
}

[data-theme="dark"] .product-price {
    color: var(--primary-light) !important;
}

/* =========================================================
   PHASE 6: IMAGE HANDLING & FINAL ACCOUNT POLISH
   ========================================================= */

/* --- 1. THE "SUNGLASSES" FILTER FOR IMAGES --- */
[data-theme="dark"] img.product-image,
[data-theme="dark"] .profile-photo img,
[data-theme="dark"] .order-item-img {
    filter: brightness(0.85);       /* Dim the glare by 15% */
    transition: filter 0.3s ease;   /* Smooth transition */
}

/* Brighten up slightly when user hovers to see details */
[data-theme="dark"] img.product-image:hover {
    filter: brightness(1);
}

/* --- 2. ACCOUNT PAGE SPECIFIC PATCHES --- */

/* Fix the Profile Photo Circle (Was white) */
[data-theme="dark"] .profile-photo {
    background-color: var(--bg-input) !important;
    color: var(--primary-light) !important;
    border: 2px solid var(--border-color);
}

/* Darken the Account Pink Header (Too bright for dark mode) */
[data-theme="dark"] .account-header {
    background: linear-gradient(135deg, #880e4f 0%, #ad1457 100%) !important; /* Deep Pink */
    color: var(--text-inverse) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Fix Status Badges (Pending/Shipped backgrounds were too light) */
[data-theme="dark"] .status-pending { background: #4a3b00 !important; color: #ffca28 !important; }
[data-theme="dark"] .status-confirmed { background: #00363a !important; color: #4dd0e1 !important; }
[data-theme="dark"] .status-processing { background: #0d47a1 !important; color: #64b5f6 !important; }
[data-theme="dark"] .status-shipped { background: #1b5e20 !important; color: #81c784 !important; }
[data-theme="dark"] .status-delivered { background: #1b5e20 !important; color: #a5d6a7 !important; }
[data-theme="dark"] .status-cancelled { background: #b71c1c !important; color: #ef9a9a !important; }

/* Fix "Order Edit" Info Box */
[data-theme="dark"] .order-edit-hint {
    background-color: #3e2723 !important; /* Dark Orange/Brown */
    color: #ffcc80 !important;
}

/* Fix Address Cards */
[data-theme="dark"] .address-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

/* Fix Pagination Buttons */
[data-theme="dark"] .pagination button {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .pagination button.active {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* =========================================================
   PHASE 7: SHOP FILTERS & SEARCH FIXES
   ========================================================= */

/* 1. Fix the Top Filter Bar (Typo Correction) */
[data-theme="dark"] .filters-section {
    background-color: var(--bg-card) !important; /* Was white */
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

/* 2. Fix the "Active Filters" Tags (The little pill buttons) */
[data-theme="dark"] .filter-tag {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
}

/* 3. Fix Search Suggestions (The box that drops down when you type) */
[data-theme="dark"] .search-suggestions {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

[data-theme="dark"] .suggestion-item {
    border-bottom-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .suggestion-item:hover,
[data-theme="dark"] .suggestion-item.active {
    background-color: var(--bg-input) !important;
}

[data-theme="dark"] .suggestion-header {
    background-color: var(--bg-input) !important;
    color: var(--text-muted) !important;
    border-bottom-color: var(--border-color) !important;
}

/* =========================================================
   PHASE 8: HEADER & TEXT VISIBILITY OVERHAUL
   ========================================================= */

/* 1. Kill the Pink Top Bar -> Make it Dark */
[data-theme="dark"] .top-bar {
    background: var(--bg-header) !important;
    background-image: none !important; /* Removes the pink gradient */
    border-bottom: 1px solid var(--border-color);
}

/* 2. Kill the White Logo Area -> Make it Dark */
[data-theme="dark"] .main-header {
    background-color: var(--bg-header) !important;
}

/* 3. Fix the Navigation Bar (Beranda, Produk, etc.) */
[data-theme="dark"] .app-nav-bar,
[data-theme="dark"] .categories-nav {
    background-color: var(--bg-header) !important;
    border-bottom: 1px solid var(--border-color);
}

/* 4. Force Text Visibility (Logo & Links) */
[data-theme="dark"] .logo h1 {
    color: var(--text-inverse) !important; /* Force "SitiJY" to White */
}

[data-theme="dark"] .logo .tagline {
    color: var(--text-muted) !important; /* Force Tagline to Grey */
}

[data-theme="dark"] .category-btn {
    color: var(--text-main) !important; /* Force Menu Links to White */
}

[data-theme="dark"] .category-btn:hover,
[data-theme="dark"] .category-btn.active {
    background-color: var(--bg-input) !important;
    color: var(--primary-light) !important;
}

/* 5. Fix Search Bar Text (Often invisible grey-on-grey) */
[data-theme="dark"] .search-box input {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important; /* White text when typing */
}
[data-theme="dark"] .search-box .search-btn {
    color: var(--text-muted) !important;
}

/* =========================================================
   PHASE 9: ACTIVE NAVIGATION VISIBILITY FIX
   ========================================================= */

/* Force the "Active" button to be Solid Pink with White Text */
[data-theme="dark"] .category-btn.active {
    background-color: var(--primary) !important; /* Solid Pink */
    color: #ffffff !important;                   /* Bright White Text */
    border-color: var(--primary) !important;
    font-weight: 600;                            /* Make text bolder */
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.4); /* subtle glow */
}

/* Ensure Hover state is also visible */
[data-theme="dark"] .category-btn:hover {
    background-color: var(--bg-input) !important;
    color: var(--primary-light) !important;
}

/* Fix the Mobile Bottom Bar (if you use one) just in case */
[data-theme="dark"] .bottom-nav {
    background-color: var(--bg-header) !important;
    border-top-color: var(--border-color) !important;
}

/* =========================================================
   PHASE 10: PRAYER WIDGET DARK MODE FIX
   ========================================================= */

/* 1. The Main Dropdown Box */
[data-theme="dark"] .prayer-dropdown {
    background-color: var(--bg-card) !important; /* Dark Grey/Black */
    border-color: var(--border-color) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
}

/* 2. List Items & Text */
[data-theme="dark"] .prayer-item {
    border-bottom-color: var(--border-color) !important;
}

[data-theme="dark"] .prayer-item .name {
    color: var(--text-main) !important; /* White Text */
}

[data-theme="dark"] .prayer-item .time {
    color: var(--primary-light) !important; /* Pink/White Time */
    font-weight: 600;
}

[data-theme="dark"] .prayer-item .status {
    color: var(--text-muted) !important;
}

/* 3. Hover State */
[data-theme="dark"] .prayer-item:hover {
    background-color: var(--bg-input) !important; /* Slightly lighter grey */
}

/* 4. "Next Prayer" Highlight (Was bright blue) */
[data-theme="dark"] .prayer-item.next {
    background-color: rgba(233, 30, 99, 0.15) !important; /* Subtle Pink Tint */
    border-left: 3px solid var(--primary);
}

/* 5. Date at the bottom */
[data-theme="dark"] .prayer-date {
    color: var(--text-muted) !important;
    border-top: 1px solid var(--border-color);
}

/* =========================================================
   PHASE 11: SHOPPING CART CONTROLS FIX
   ========================================================= */

/* 1. Fix Quantity Buttons (- and +) */
[data-theme="dark"] .qty-btn,
[data-theme="dark"] .quantity-btn,
[data-theme="dark"] .btn-quantity,
[data-theme="dark"] .cart-item button.minus,
[data-theme="dark"] .cart-item button.plus {
    background-color: var(--bg-input) !important; /* Dark Grey */
    color: var(--text-main) !important;           /* White Text */
    border: 1px solid var(--border-color) !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .qty-btn:hover,
[data-theme="dark"] .quantity-btn:hover {
    background-color: var(--primary) !important;  /* Pink on Hover */
    color: white !important;
    border-color: var(--primary) !important;
}

/* 2. Fix the Quantity Input Box (The number in the middle) */
[data-theme="dark"] .qty-input,
[data-theme="dark"] .quantity-input,
[data-theme="dark"] input[type="number"].quantity {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

/* 3. Fix "Remove" / "Trash" Icons if they are buttons */
[data-theme="dark"] .remove-item-btn,
[data-theme="dark"] .btn-remove {
    background-color: transparent !important;
    color: var(--text-muted) !important;
}
[data-theme="dark"] .remove-item-btn:hover {
    color: #f44336 !important; /* Red on hover */
    background-color: rgba(244, 67, 54, 0.1) !important;
}

/* 4. Fix Cart Summary Box (Total price area) */
[data-theme="dark"] .cart-summary,
[data-theme="dark"] .checkout-summary {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

[data-theme="dark"] .cart-summary .summary-row {
    color: var(--text-main) !important;
    border-bottom-color: var(--border-color) !important;
}

/* =========================================================
   PHASE 12: HOMEPAGE WIDGETS FIX (News, Services, Sellers)
   ========================================================= */

/* --- 1. NEWS & PROMOTION SECTION --- */
[data-theme="dark"] .news-item {
    background-color: var(--bg-card) !important; /* Was #fff */
    border-color: var(--border-color) !important;
}

/* Fix Hover Effect */
[data-theme="dark"] .news-item:hover {
    background-color: var(--bg-input) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

/* Fix the "Placeholder" items (Grey boxes) */
[data-theme="dark"] .news-item.placeholder {
    background-color: var(--bg-input) !important; /* Was #f9f9f9 */
    border-color: var(--border-color) !important;
}

/* Fix Text Colors */
[data-theme="dark"] .news-content h4 {
    color: var(--text-main) !important; /* Was #212121 */
}
[data-theme="dark"] .news-excerpt {
    color: var(--text-muted) !important; /* Was #666 */
}
[data-theme="dark"] .news-date {
    color: var(--text-light) !important;
}
[data-theme="dark"] .view-all-link {
    color: var(--primary-light) !important;
}

/* --- 2. QUICK SERVICES GRID (The 4 buttons row) --- */
[data-theme="dark"] .quick-services-grid {
    background-color: var(--bg-input) !important; /* The container box */
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .service-btn {
    background-color: var(--bg-card) !important; /* The buttons */
    border-color: var(--border-color) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .service-btn:hover {
    background-color: var(--bg-header) !important;
}

[data-theme="dark"] .service-name {
    color: var(--text-main) !important;
}

/* --- 3. TOP SELLERS CARD (Small Horizontal Cards) --- */
[data-theme="dark"] .seller-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .seller-card .product-name {
    color: var(--text-main) !important;
}

[data-theme="dark"] .seller-card .price {
    color: var(--primary-light) !important;
}

[data-theme="dark"] .section-header-compact h3 {
    color: var(--text-main) !important;
}

/* =========================================================
   FINAL CART BUTTON FIX
   ========================================================= */

/* Target ANY button inside a cart item or quantity wrapper */
[data-theme="dark"] .cart-item button,
[data-theme="dark"] .quantity-wrapper button,
[data-theme="dark"] .qty-selector button {
    background-color: var(--bg-input) !important; /* Dark Grey */
    color: var(--text-main) !important;           /* White Text */
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
}

/* Ensure the input box between buttons is also dark */
[data-theme="dark"] .cart-item input,
[data-theme="dark"] .quantity-wrapper input {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

/* Fix the "Checkout" Section background */
[data-theme="dark"] .cart-footer,
[data-theme="dark"] .checkout-container {
    background-color: var(--bg-card) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Fix Login Modal Inputs */
[data-theme="dark"] .phone-input-group,
[data-theme="dark"] .otp-input {
    background-color: var(--bg-input) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .country-code {
    background-color: var(--bg-input) !important;
    color: var(--text-muted) !important;
    border-right: 1px solid var(--border-color) !important;
}

/* =========================================================
   FINAL CART BUTTON FIX (TARGETING TAGS)
   ========================================================= */

/* Force ALL buttons inside cart items to be Dark */
[data-theme="dark"] .cart-item button,
[data-theme="dark"] .cart-item .btn,
[data-theme="dark"] .qty-container button {
    background-color: #2d2d2d !important; /* Dark Grey */
    color: #ffffff !important;            /* White Text */
    border: 1px solid #444 !important;
}

/* Fix the Input Box (Quantity Number) */
[data-theme="dark"] .cart-item input,
[data-theme="dark"] .qty-container input {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border-color: #444 !important;
}

/* Hover State for Buttons */
[data-theme="dark"] .cart-item button:hover {
    background-color: #e91e63 !important; /* Pink on Hover */
    border-color: #e91e63 !important;
}

/* =========================================================
   PHASE 13: NUCLEAR CART INPUT FIX
   ========================================================= */

/* 1. Target the Input Box by TYPE (cannot be escaped) */
[data-theme="dark"] input[type="number"] {
    background-color: #2d2d2d !important; /* Dark Grey */
    color: #ffffff !important;            /* White Text */
    border: 1px solid #555 !important;
    box-shadow: none !important;
}

/* 2. Target the +/- Buttons using WILDCARDS */
/* Matches .qty-btn, .quantity-btn, .btn-qty, etc. */
[data-theme="dark"] [class*="qty"] button,
[data-theme="dark"] [class*="quantity"] button,
[data-theme="dark"] button.minus,
[data-theme="dark"] button.plus {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border: 1px solid #555 !important;
}

/* 3. Hover Effects for the wildcard buttons */
[data-theme="dark"] [class*="qty"] button:hover,
[data-theme="dark"] [class*="quantity"] button:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* 4. Fix the "Total" row background in Cart/Checkout */
[data-theme="dark"] .cart-total,
[data-theme="dark"] .checkout-total-row {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

/* =========================================================
   PHASE 14: CREDIT CARD COLOR STANDARDIZATION
   ========================================================= */

/* Override Account Page Internal Blue Style */
.credit-card,
.account-section .credit-card {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4) !important;
}

/* Ensure the text inside is white */
.credit-card .credit-label,
.credit-card .credit-balance {
    color: #ffffff !important;
    opacity: 1 !important;
}