/* ========================================
   TEMU-STYLE MARKETPLACE CSS
   ======================================== */

/* ========================================
   CSS VARIABLES - TEMU DESIGN SYSTEM
   ======================================== */
:root {
    /* Temu Primary Colors */
    --temu-orange: #FF6B35;
    --temu-orange-light: #FF8A5C;
    --temu-orange-dark: #E55A2B;
    --temu-pink: #FF477E;
    --temu-purple: #7B61FF;
    --temu-teal: #00C9A7;
    
    /* Background Colors */
    --bg-main: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F0F2F5;
    --bg-orange-light: #FFF5F2;
    
    /* Text Colors */
    --text-primary: #1A1A1A;
    --text-secondary: #5A5A5A;
    --text-muted: #8E8E8E;
    --text-white: #FFFFFF;
    
    /* Border & Divider */
    --border-color: #E5E5E5;
    --border-light: #F0F0F0;
    --divider: #EEEEEE;
    
    /* Status Colors */
    --success: #00C9A7;
    --warning: #FFB800;
    --error: #FF4757;
    --info: #3B82F6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 24px rgba(0,0,0,0.16);
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
    --font-size-4xl: 28px;
    --font-size-5xl: 32px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 32px;
    --spacing-4xl: 40px;
    
    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;
    
    /* Container */
    --container-max: 1280px;
    --header-height: 60px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

:focus {
    outline: none;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-md); }
h6 { font-size: var(--font-size-base); }

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 10px 20px;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--temu-orange) 0%, var(--temu-orange-dark) 100%);
    color: var(--text-white);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: var(--temu-orange);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    color: var(--temu-orange);
    border: 1.5px solid var(--temu-orange);
}

.btn-outline:hover {
    background: var(--temu-orange);
    color: var(--text-white);
}

.btn-white {
    background: var(--text-white);
    color: var(--temu-orange);
}

.btn-white:hover {
    background: var(--bg-secondary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: var(--font-size-lg);
}

/* ========================================
   HEADER STYLES
   ======================================== */
header {
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--temu-orange);
}

.logo img {
    height: 36px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-actions .action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.header-actions .action-item:hover {
    background: var(--bg-secondary);
}

.header-actions .action-item ion-icon {
    font-size: 20px;
    color: var(--text-primary);
}

/* Navigation */
nav ul {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

nav ul li a {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
}

nav ul li a:hover {
    color: var(--temu-orange);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--temu-orange);
    transition: width 0.2s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* ========================================
   SEARCH BAR
   ======================================== */
.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 4px;
    border: 1px solid var(--border-light);
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: var(--font-size-base);
}

.search-container input:focus {
    outline: none;
}

.search-container button {
    background: var(--temu-orange);
    color: var(--text-white);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all 0.2s ease;
}

.search-container button:hover {
    background: var(--temu-orange-dark);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF477E 50%, #7B61FF 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin: 20px 0 40px;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: var(--text-white);
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-buttons .btn {
    padding: 14px 32px;
    font-size: var(--font-size-lg);
}

/* ========================================
   CATEGORY GRID
   ======================================== */
.category-section {
    padding: 30px 0;
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all 0.25s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--temu-orange);
}

.category-card .icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-orange-light) 0%, #FFF0EB 100%);
    border-radius: 50%;
    margin-bottom: 12px;
}

.category-card .icon ion-icon {
    font-size: 28px;
    color: var(--temu-orange);
}

.category-card h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* ========================================
   PRODUCT GRID
   ======================================== */
.products-section {
    padding: 30px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.product-card {
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--temu-orange);
}

.product-card .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--temu-pink);
    color: var(--text-white);
    padding: 4px 8px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-xs);
    z-index: 2;
}

.product-card .image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

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

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

.product-card .info {
    padding: 12px;
}

.product-card .title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.product-card .price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--temu-orange);
    margin-bottom: 8px;
}

.product-card .original-price {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 6px;
}

.product-card .rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.product-card .rating ion-icon {
    color: var(--warning);
    font-size: 12px;
}

.product-card .sales {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 4px;
}

.product-card .add-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--temu-orange) 0%, var(--temu-orange-dark) 100%);
    color: var(--text-white);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.product-card .add-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features-section {
    background: var(--bg-secondary);
    padding: 60px 0;
    margin: 40px 0;
}

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

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

.feature-item .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.feature-item .icon ion-icon {
    font-size: 28px;
    color: var(--temu-orange);
}

.feature-item h3 {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--text-primary);
    color: var(--text-white);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-white);
}

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

.footer-column ul li a {
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,0.7);
}

.footer-column ul li a:hover {
    color: var(--temu-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,0.5);
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-main);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border-light);
}

.modal-body {
    padding: 20px;
}

/* ========================================
   DELIVERY FORM
   ======================================== */
.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 0.2s ease;
}

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

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

.form-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--temu-orange) 0%, var(--temu-orange-dark) 100%);
    color: var(--text-white);
    font-size: var(--font-size-lg);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3);
}

/* ========================================
   CART SUMMARY
   ======================================== */
.cart-summary {
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin: 30px 0;
}

.cart-summary h3 {
    font-size: var(--font-size-lg);
    margin-bottom: 16px;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-summary .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    margin-top: 12px;
}

.cart-summary .total-row .label {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.cart-summary .total-row .amount {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--temu-orange);
}

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb {
    padding: 12px 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

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

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

.breadcrumb span {
    margin: 0 8px;
}

/* ========================================
   CATEGORY BANNER
   ======================================== */
.category-banner {
    position: relative;
    height: 280px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin: 20px 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.category-banner h1 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--text-white);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 30px rgba(0,0,0,0.5);
    margin-bottom: 12px;
}

.category-banner p {
    font-size: var(--font-size-lg);
    color: var(--text-white);
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

/* ========================================
   FLOATING MENU
   ======================================== */
.floating-menu-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1500;
}

.floating-menu-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--temu-orange) 0%, var(--temu-orange-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: all 0.2s ease;
}

.floating-menu-btn ion-icon {
    font-size: 24px;
    color: var(--text-white);
}

.floating-menu-btn:hover {
    transform: scale(1.1);
}

.floating-menu-dropdown {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 180px;
    display: none;
    overflow: hidden;
}

.floating-menu-dropdown.active {
    display: block;
    animation: dropdownSlide 0.2s ease;
}

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

.floating-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.floating-menu-item:hover {
    background: var(--bg-secondary);
}

.floating-menu-item ion-icon {
    font-size: 20px;
    color: var(--text-secondary);
}

.floating-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.floating-menu-section {
    padding: 8px 20px 4px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Floating User Profile Styles */
.floating-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF477E 100%);
    border-radius: 12px;
    margin: 8px 12px;
}

.floating-user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.floating-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.floating-user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-user-email {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-menu-dropdown {
    max-height: 70vh;
    overflow-y: auto;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state ion-icon {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: var(--font-size-sm);
}

/* ========================================
   RESPONSIVE STYLES FOR ALL DEVICES
   ======================================== */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .hero-content {
        max-width: 600px;
    }
}

/* Small Laptop / Large Tablet (992px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet Portrait (768px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Base Mobile Styles */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 16px;
        max-width: 100%;
    }
    
    /* Header */
    header {
        padding: 12px 0;
    }
    
    .header-top {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .logo img {
        height: 28px !important;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        max-width: 100% !important;
        margin: 10px 0 0 0 !important;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .header-actions .action-item span {
        display: none;
    }
    
    /* Navigation */
    nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    nav ul {
        gap: 8px;
        padding-bottom: 8px;
    }
    
    nav a {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* Hero Section */
    .temu-hero {
        padding: 30px 20px !important;
        margin: 12px 0 24px !important;
    }
    
    .temu-hero h1 {
        font-size: 28px !important;
    }
    
    .temu-hero p {
        font-size: 14px !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .quick-links {
        flex-wrap: wrap;
    }
    
    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header */
    .header-top {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .logo img {
        height: 28px;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
    }
    
    nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }
    
    nav ul {
        gap: 8px;
    }
    
    nav a {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Hero */
    .hero-section {
        height: auto;
        min-height: 300px;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .temu-hero {
        padding: 24px 16px;
        margin: 12px 0;
    }
    
    .temu-hero h1 {
        font-size: 24px;
    }
    
    /* Grids */
    .product-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Flash Deals */
    .flash-deal-banner {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Product Landing Page */
    .product-landing-page > div {
        grid-template-columns: 1fr !important;
    }
    
    .product-landing-page img {
        height: 250px !important;
    }
    
    .product-landing-page h1 {
        font-size: 18px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    /* Category Explorer */
    .category-explorer {
        grid-template-columns: 1fr;
    }
    
    .category-nav {
        display: none;
    }
    
    .sub-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Auth */
    .auth-card {
        padding: 20px;
        margin: 10px;
    }
    
    /* Floating Menu */
    .floating-menu-container {
        bottom: 16px;
        right: 16px;
    }
    
    .floating-menu-btn {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .product-grid,
    .category-grid {
        gap: 8px;
    }
    
    .temu-hero h1 {
        font-size: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Large Phone (600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .container {
        padding: 0 14px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .temu-hero {
        padding: 40px 25px;
    }
    
    .temu-hero h1 {
        font-size: 32px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
}

/* Small Phone (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--temu-orange); }
.text-white { color: var(--text-white); }

.bg-primary { background: var(--bg-main); }
.bg-secondary { background: var(--bg-secondary); }
.bg-orange { background: var(--temu-orange); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ========================================
   AUTH PAGES (Login & Register)
   ======================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF477E 50%, #7B61FF 100%);
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: #FF6B35;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.form-input:focus {
    border-color: #FF6B35;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Auth Responsive */
@media (max-width: 480px) {
    .auth-page {
        padding: 16px;
    }
    
    .auth-card {
        padding: 24px;
        border-radius: 16px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-header img {
        height: 32px !important;
    }
}

/* ========================================
   MAIN NAVIGATION TABS
   ======================================== */
.main-nav-tabs {
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 60px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-tabs-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: #FF6B35;
    background: #FFF5F2;
}

.nav-tab.active {
    color: #FF6B35;
    border-bottom-color: #FF6B35;
    font-weight: 600;
}

.nav-tab ion-icon {
    font-size: 18px;
}

@media (max-width: 768px) {
    .main-nav-tabs {
        top: 50px;
    }
    
    .nav-tab {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .nav-tab ion-icon {
        font-size: 16px;
    }
}
