/* ====================================
   SelectShelf Mobile App Styles
   Design: Brown/Orange/Cream Theme
   ==================================== */

:root {
    --primary: #8B4513;
    --primary-dark: #6B3410;
    --primary-light: #A0522D;
    --accent: #FF6B35;
    --accent-dark: #E55A2B;
    --bg: #FFF8F0;
    --bg-card: #FFFFFF;
    --bg-cream: #FDF5ED;
    --bg-beige: #F5E6D3;
    --text-dark: #2D1810;
    --text: #4A3728;
    --text-light: #8B7355;
    --text-muted: #B8A089;
    --border: #E8D5C4;
    --border-light: #F0E4D8;
    --success: #27AE60;
    --success-light: #E8F8EF;
    --error: #E74C3C;
    --error-light: #FDE8E8;
    --warning: #F39C12;
    --star: #F39C12;
    --shadow: 0 2px 12px rgba(139,69,19,0.08);
    --shadow-lg: 0 8px 32px rgba(139,69,19,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --nav-height: 64px;
    --header-height: 56px;
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { font-family: var(--font); background: var(--bg); color: var(--text-dark); font-size: 14px; overflow: hidden; height: 100%; -webkit-font-smoothing: antialiased; }

#app { height: 100%; width: 100%; max-width: 480px; margin: 0 auto; position: relative; background: var(--bg); overflow: hidden; box-shadow: 0 0 60px rgba(0,0,0,0.1); }

/* Screen System */
.screen { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: none; flex-direction: column; background: var(--bg); z-index: 1; overflow: hidden; }
.screen.active { display: flex; animation: screenSlideIn 0.3s ease; }
@keyframes screenSlideIn { from { transform: translateX(30px); opacity: 0.5; } to { transform: translateX(0); opacity: 1; } }

/* Screen Header */
.screen-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--primary); color: white; min-height: var(--header-height); position: sticky; top: 0; z-index: 10; }
.screen-header h2 { font-size: 18px; font-weight: 600; flex: 1; text-align: center; }
.screen-header.transparent { background: transparent; position: absolute; width: 100%; z-index: 10; }
.screen-header.transparent .btn-back, .screen-header.transparent .btn-icon { background: rgba(255,255,255,0.9); color: var(--text-dark); border-radius: 50%; width: 36px; height: 36px; }

.btn-back { background: none; border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; transition: all 0.2s; }
.btn-back:hover { background: rgba(255,255,255,0.15); }
.btn-icon { background: none; border: none; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; transition: all 0.2s; position: relative; }
.btn-text { background: none; border: none; color: white; cursor: pointer; font-family: var(--font); font-size: 14px; font-weight: 500; }
.header-actions { display: flex; gap: 4px; }

/* Screen Body */
.screen-body { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.screen-body::-webkit-scrollbar { display: none; }

/* =================== BUTTONS =================== */
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border: none; padding: 14px 28px; border-radius: var(--radius); font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 15px rgba(139,69,19,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139,69,19,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: none; border: 2px solid var(--primary); color: var(--primary); padding: 12px 28px; border-radius: var(--radius); font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-outline:hover { background: var(--bg-cream); }
.btn-sm { padding: 8px 18px; font-size: 12px; border-radius: 8px; font-weight: 600; border: none; background: white; color: var(--primary); cursor: pointer; font-family: var(--font); }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* =================== SPLASH SCREEN =================== */
.splash-container { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: linear-gradient(180deg, #FFF8F0 0%, #F5E6D3 50%, #E8D0B8 100%); position: relative; overflow: hidden; padding: 40px 24px; }
.splash-bg-pattern { position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 50%, rgba(139,69,19,0.05) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,107,53,0.05) 0%, transparent 50%), radial-gradient(circle at 50% 80%, rgba(139,69,19,0.03) 0%, transparent 50%); }
.splash-content { text-align: center; position: relative; z-index: 1; }
.splash-logo-wrap { margin-bottom: 20px; }
.splash-logo-icon { font-size: 64px; margin-bottom: 12px; animation: logoFloat 3s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.splash-title { font-size: 42px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.splash-title span { color: var(--accent); }
.splash-tagline { font-size: 18px; color: var(--text-light); margin-bottom: 32px; line-height: 1.5; font-weight: 400; }
.splash-features { display: flex; gap: 24px; margin-bottom: 40px; justify-content: center; }
.splash-feat { text-align: center; }
.splash-feat .material-icons-round { font-size: 28px; color: var(--primary); background: rgba(139,69,19,0.1); width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 50%; margin: 0 auto 6px; }
.splash-feat small { font-size: 11px; color: var(--text-light); font-weight: 500; }
.splash-btn { max-width: 280px; margin: 0 auto 16px; }
.splash-login-link { color: var(--text-light); font-size: 13px; }
.splash-login-link a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* =================== AUTH SCREEN =================== */
.auth-screen { padding: 24px; display: flex; flex-direction: column; align-items: center; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-icon { font-size: 48px; }
.auth-logo h2 { font-size: 28px; font-weight: 700; color: var(--primary); }
.auth-logo h2 span { color: var(--accent); }
.form-group { margin-bottom: 16px; width: 100%; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.input-icon-wrap { display: flex; align-items: center; background: white; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 0 14px; transition: all 0.3s; }
.input-icon-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,69,19,0.1); }
.input-icon-wrap .material-icons-round { color: var(--text-muted); font-size: 20px; }
.input-icon-wrap input { flex: 1; border: none; outline: none; padding: 14px 10px; font-family: var(--font); font-size: 14px; background: transparent; color: var(--text-dark); }
.input-icon-wrap input::placeholder { color: var(--text-muted); }
.toggle-pass { color: var(--text-muted) !important; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--text-light); font-size: 13px; }
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* =================== HOME SCREEN =================== */
.home-header { background: var(--primary); padding: 12px 16px 0; }
.home-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.location-wrap { display: flex; align-items: center; gap: 8px; color: white; }
.location-wrap .material-icons-round { font-size: 22px; color: var(--accent); }
.location-wrap small { font-size: 11px; opacity: 0.7; }
.location-wrap p { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 2px; }
.home-header .header-actions .btn-icon { color: white; }
.cart-badge, .nav-badge { position: absolute; top: 2px; right: 2px; background: var(--accent); color: white; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.search-bar { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; cursor: pointer; }
.search-bar .material-icons-round { color: rgba(255,255,255,0.7); }
.search-placeholder { color: rgba(255,255,255,0.6); font-size: 13px; }
.home-body { padding: 0; }

/* Banner Slider */
.banner-slider { position: relative; margin: 12px 16px; border-radius: var(--radius-lg); overflow: hidden; height: 160px; }
.banner-track { display: flex; transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); height: 100%; }
.banner-slide { min-width: 100%; height: 100%; display: flex; align-items: center; padding: 20px 24px; position: relative; }
.banner-text { color: white; position: relative; z-index: 1; }
.banner-badge { font-size: 11px; background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px; display: inline-block; margin-bottom: 8px; font-weight: 500; }
.banner-text h3 { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.banner-text .btn-sm { background: white; color: var(--primary); font-weight: 600; }
.banner-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dots .dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.4); transition: all 0.3s; cursor: pointer; }
.banner-dots .dot.active { width: 20px; background: white; }

/* Quick Categories */
.quick-cats { display: flex; gap: 14px; padding: 16px; overflow-x: auto; scrollbar-width: none; }
.quick-cats::-webkit-scrollbar { display: none; }
.quick-cat { text-align: center; cursor: pointer; flex-shrink: 0; }
.quick-cat-icon { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--bg-cream), var(--bg-beige)); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 6px; transition: all 0.3s; box-shadow: var(--shadow); }
.quick-cat:hover .quick-cat-icon { transform: scale(1.1); box-shadow: var(--shadow-lg); }
.quick-cat p { font-size: 11px; color: var(--text); font-weight: 500; white-space: nowrap; }

/* Sections */
.section { padding: 8px 16px 16px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-header h3 { font-size: 17px; font-weight: 700; color: var(--text-dark); }
.section-header h4 { font-size: 15px; font-weight: 600; color: var(--text-dark); }
.section-header a { color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; }

/* Product Scroll */
.product-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.product-scroll::-webkit-scrollbar { display: none; }

/* Product Card */
.product-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; flex-shrink: 0; width: 150px; scroll-snap-align: start; cursor: pointer; transition: all 0.3s; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.product-card-img { width: 100%; height: 110px; background: var(--bg-beige); display: flex; align-items: center; justify-content: center; font-size: 48px; position: relative; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img .discount-badge { position: absolute; top: 8px; left: 8px; background: var(--error); color: white; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.product-card-body { padding: 10px; }
.product-card-body h4 { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card-body .product-weight { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.product-card-body .product-price { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.product-card-body .price-current { font-size: 15px; font-weight: 700; color: var(--primary); }
.product-card-body .price-original { font-size: 11px; color: var(--text-muted); text-decoration: line-through; }
.product-card-body .product-rating { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-light); }
.product-card-body .product-rating .star { color: var(--star); }
.product-card .add-btn { position: absolute; bottom: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: white; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; transition: all 0.2s; box-shadow: 0 2px 8px rgba(139,69,19,0.3); }
.product-card .add-btn:hover { background: var(--accent); transform: scale(1.1); }

/* Product List (Shop) */
.product-list { padding: 0 16px 16px; }
.product-list-item { display: flex; background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; cursor: pointer; transition: all 0.3s; }
.product-list-item:hover { box-shadow: var(--shadow-lg); }
.product-list-item .pli-img { width: 100px; min-height: 100px; background: var(--bg-beige); display: flex; align-items: center; justify-content: center; font-size: 40px; flex-shrink: 0; }
.product-list-item .pli-body { flex: 1; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; }
.product-list-item .pli-body h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; color: var(--text-dark); }
.product-list-item .pli-body .pli-weight { font-size: 11px; color: var(--text-muted); }
.product-list-item .pli-body .pli-rating { font-size: 11px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }
.product-list-item .pli-body .pli-rating .star { color: var(--star); }
.product-list-item .pli-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.product-list-item .pli-price { font-size: 16px; font-weight: 700; color: var(--primary); }
.product-list-item .pli-price-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }
.product-list-item .add-btn-sm { padding: 6px 14px; background: var(--primary); color: white; border: none; border-radius: 8px; font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.product-list-item .add-btn-sm:hover { background: var(--accent); }

/* Shop Search & Filters */
.shop-search { padding: 12px 16px 8px; }
.shop-search .input-icon-wrap { background: white; box-shadow: var(--shadow); border: none; }
.cat-tabs { display: flex; gap: 8px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { padding: 8px 18px; border-radius: 20px; border: 1.5px solid var(--border); background: white; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; transition: all 0.3s; }
.cat-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.shop-controls { display: flex; gap: 8px; padding: 8px 16px; }
.btn-filter { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: white; font-family: var(--font); font-size: 12px; color: var(--text); cursor: pointer; }
.btn-filter .material-icons-round { font-size: 16px; }

/* Categories Grid */
.categories-grid { padding: 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.category-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; cursor: pointer; transition: all 0.3s; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.category-card .cat-emoji { font-size: 40px; margin-bottom: 8px; }
.category-card h4 { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.category-card small { font-size: 11px; color: var(--text-muted); }

/* Top Categories (Home) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-grid-item { text-align: center; cursor: pointer; padding: 8px 4px; }
.cat-grid-item .cat-icon { width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(135deg, var(--bg-cream), white); display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 6px; box-shadow: var(--shadow); transition: all 0.3s; }
.cat-grid-item:hover .cat-icon { transform: scale(1.05); }
.cat-grid-item p { font-size: 10px; color: var(--text); font-weight: 500; line-height: 1.2; }

/* Promo Banner */
.promo-banner { margin: 4px 16px 12px; background: linear-gradient(135deg, var(--primary) 0%, #CD853F 100%); border-radius: var(--radius-lg); padding: 20px; cursor: pointer; transition: all 0.3s; }
.promo-banner:hover { transform: scale(1.01); }
.promo-content { color: white; }
.promo-content span { font-size: 14px; }
.promo-content h3 { font-size: 18px; font-weight: 700; margin: 6px 0 12px; }
.combo-banner { background: linear-gradient(135deg, #CD853F 0%, var(--accent) 100%); }

/* Why Choose Us */
.why-choose { background: white; margin: 0 16px 12px; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.why-choose h3 { text-align: center; margin-bottom: 16px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.why-item { text-align: center; }
.why-item .material-icons-round { font-size: 28px; color: var(--primary); background: var(--bg-cream); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; margin: 0 auto 6px; }
.why-item p { font-size: 11px; font-weight: 500; color: var(--text); }

/* =================== PRODUCT DETAIL =================== */
.product-detail-body { padding: 0; }
.pd-image { width: 100%; height: 280px; background: var(--bg-beige); display: flex; align-items: center; justify-content: center; font-size: 100px; position: relative; }
.pd-image-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.pd-image-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,0.2); }
.pd-image-dots .dot.active { background: var(--primary); }
.pd-content { padding: 20px 16px; background: white; border-radius: var(--radius-xl) var(--radius-xl) 0 0; margin-top: -20px; position: relative; }
.pd-name { font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.pd-desc { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.pd-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: 13px; }
.pd-rating .stars { color: var(--star); }
.pd-rating .count { color: var(--text-muted); }
.pd-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pd-price { font-size: 28px; font-weight: 800; color: var(--primary); }
.pd-price-old { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.pd-discount { background: var(--success-light); color: var(--success); padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }

/* Weight Options */
.pd-weights { margin-bottom: 16px; }
.pd-weights h4 { font-size: 14px; margin-bottom: 8px; }
.weight-options { display: flex; gap: 8px; }
.weight-opt { padding: 10px 18px; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; text-align: center; transition: all 0.2s; background: white; }
.weight-opt.active { border-color: var(--primary); background: var(--bg-cream); }
.weight-opt .wo-label { font-size: 13px; font-weight: 600; color: var(--text-dark); display: block; }
.weight-opt .wo-price { font-size: 12px; color: var(--primary); font-weight: 600; }

/* Coupon Section */
.pd-coupon { background: var(--bg-cream); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.pd-coupon input { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: var(--font); font-size: 13px; }
.pd-coupon .apply-btn { padding: 10px 18px; background: var(--primary); color: white; border: none; border-radius: 8px; font-family: var(--font); font-weight: 600; cursor: pointer; font-size: 13px; }

/* Price Details */
.pd-price-details { background: var(--bg-cream); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.pd-price-details h4 { margin-bottom: 10px; font-size: 14px; }
.price-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.price-row.total { border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 4px; font-weight: 700; font-size: 15px; color: var(--text-dark); }
.price-row .discount-text { color: var(--success); }
.savings-text { text-align: center; color: var(--success); font-size: 12px; font-weight: 600; margin-top: 6px; }

/* Highlights & Ingredients */
.pd-section { margin-bottom: 16px; }
.pd-section h4 { font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.pd-section ul { list-style: none; padding: 0; }
.pd-section ul li { font-size: 13px; color: var(--text); padding: 4px 0; padding-left: 18px; position: relative; }
.pd-section ul li::before { content: '•'; position: absolute; left: 0; color: var(--primary); font-weight: bold; }
.pd-section p { font-size: 13px; color: var(--text); }

/* Quantity */
.pd-quantity { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pd-quantity h4 { font-size: 14px; }
.qty-controls { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty-btn { width: 38px; height: 38px; background: var(--bg-cream); border: none; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font); color: var(--text-dark); transition: all 0.2s; }
.qty-btn:hover { background: var(--bg-beige); }
.qty-value { width: 40px; text-align: center; font-size: 16px; font-weight: 600; border: none; outline: none; }

/* Product Action Buttons */
.pd-actions { display: flex; gap: 12px; margin-bottom: 20px; padding-bottom: 100px; }
.pd-actions .btn-cart { flex: 1; background: white; border: 2px solid var(--primary); color: var(--primary); padding: 14px; border-radius: var(--radius); font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.pd-actions .btn-cart:hover { background: var(--bg-cream); }
.pd-actions .btn-buy { flex: 1; }

/* =================== CART =================== */
.cart-item { display: flex; background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin: 8px 16px; padding: 12px; gap: 12px; position: relative; }
.cart-item-img { width: 70px; height: 70px; border-radius: 10px; background: var(--bg-beige); display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.cart-item-info .ci-weight { font-size: 11px; color: var(--text-muted); }
.cart-item-info .ci-price { font-size: 16px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.cart-item-qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; height: 30px; position: absolute; bottom: 12px; right: 12px; }
.cart-item-qty button { width: 30px; height: 30px; background: var(--bg-cream); border: none; font-size: 16px; cursor: pointer; }
.cart-item-qty span { width: 30px; text-align: center; font-size: 13px; font-weight: 600; }

.bottom-action { position: absolute; bottom: var(--nav-height); left: 0; right: 0; background: white; border-top: 1px solid var(--border-light); padding: 12px 16px; z-index: 5; }
.cart-total-bar { display: flex; align-items: center; justify-content: space-between; }
.cart-total-bar h3 { font-size: 20px; color: var(--primary); }
.cart-total-bar .btn-primary { width: auto; padding: 14px 24px; }

/* =================== CHECKOUT =================== */
.checkout-body { padding: 16px; }
.step-indicator { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 24px; padding: 8px 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step span { width: 32px; height: 32px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-muted); transition: all 0.3s; }
.step.active span { background: var(--primary); color: white; }
.step.done span { background: var(--success); color: white; }
.step small { font-size: 11px; color: var(--text-muted); }
.step.active small { color: var(--primary); font-weight: 600; }
.step-line { width: 40px; height: 2px; background: var(--border); margin: 0 8px; margin-bottom: 18px; }
.checkout-section { margin-bottom: 20px; }
.checkout-section h4 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.checkout-section textarea { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px; font-family: var(--font); font-size: 13px; resize: none; }

/* Address Card */
.address-card { background: white; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; cursor: pointer; transition: all 0.3s; }
.address-card.selected { border-color: var(--primary); background: var(--bg-cream); }
.address-card .ac-name { font-weight: 600; font-size: 14px; }
.address-card .ac-details { font-size: 12px; color: var(--text-light); margin-top: 4px; line-height: 1.5; }
.address-card .ac-phone { font-size: 12px; color: var(--text-light); }

/* Radio & Checkbox */
.radio-card { display: flex; align-items: center; gap: 10px; background: white; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.3s; }
.radio-card.active, .radio-card:has(input:checked) { border-color: var(--primary); background: var(--bg-cream); }
.radio-content { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.radio-content span { font-size: 13px; }
.delivery-price { font-weight: 700; color: var(--primary); }
.delivery-price.free { color: var(--success); }
.checkbox-wrap { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; padding: 10px 0; }
.checkbox-wrap input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

/* =================== PAYMENT =================== */
.payment-body { padding: 16px; }
.payment-amount { text-align: center; background: white; border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.payment-amount small { font-size: 13px; color: var(--text-light); }
.payment-amount h2 { font-size: 32px; font-weight: 800; color: var(--primary); }
.payment-methods { margin-bottom: 20px; }
.payment-option { display: flex; align-items: center; gap: 12px; padding: 14px; background: white; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; transition: all 0.3s; }
.payment-option:has(input:checked) { border-color: var(--primary); background: var(--bg-cream); }
.payment-option input[type="radio"] { accent-color: var(--primary); }
.pm-icon { font-size: 20px; }
.pm-balance { margin-left: auto; font-size: 12px; color: var(--primary); font-weight: 600; }
.secure-badge { display: flex; align-items: center; gap: 10px; background: var(--success-light); border-radius: var(--radius); padding: 14px; margin-bottom: 20px; }
.secure-badge .material-icons-round { color: var(--success); }
.secure-badge strong { font-size: 13px; color: var(--success); display: block; }
.secure-badge small { font-size: 11px; color: var(--text-light); }
.pay-btn { font-size: 17px; }

/* =================== ORDER SUCCESS =================== */
.order-success-body { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; height: 100%; }
.success-animation { margin-bottom: 24px; }
.success-circle { width: 80px; height: 80px; border-radius: 50%; background: var(--success); display: flex; align-items: center; justify-content: center; animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.success-circle .material-icons-round { font-size: 40px; color: white; }
@keyframes successPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.order-success-body h2 { font-size: 24px; font-weight: 700; margin-bottom: 20px; color: var(--text-dark); }
.success-info { background: white; border-radius: var(--radius-lg); padding: 20px; margin-bottom: 24px; width: 100%; box-shadow: var(--shadow); }
.success-info p { font-size: 13px; color: var(--text-light); }
.success-info h3 { font-size: 20px; color: var(--primary); font-weight: 700; margin: 4px 0 12px; }
.success-msg { margin-bottom: 16px !important; }
.success-delivery { display: flex; align-items: center; gap: 10px; background: var(--bg-cream); border-radius: 10px; padding: 12px; }
.success-delivery .material-icons-round { color: var(--primary); font-size: 28px; }
.success-delivery small { font-size: 11px; color: var(--text-light); }
.success-delivery strong { font-size: 14px; color: var(--text-dark); }

/* =================== ORDERS =================== */
.order-tabs, .coupon-tabs, .wallet-tabs { display: flex; gap: 6px; padding: 12px 16px; overflow-x: auto; scrollbar-width: none; }
.order-tabs::-webkit-scrollbar, .coupon-tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 16px; border-radius: 20px; border: 1.5px solid var(--border); background: white; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; transition: all 0.3s; }
.tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.orders-list { padding: 0 16px; }
.order-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; padding: 16px; cursor: pointer; }
.order-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.order-card-header h4 { font-size: 14px; font-weight: 600; }
.order-card-header .order-date { font-size: 11px; color: var(--text-muted); }
.order-status { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; display: inline-block; }
.status-placed, .status-confirmed, .status-preparing { background: #FFF3E0; color: #F57C00; }
.status-packed, .status-dispatched, .status-out_for_delivery { background: #E3F2FD; color: #1976D2; }
.status-delivered { background: var(--success-light); color: var(--success); }
.status-cancelled { background: var(--error-light); color: var(--error); }
.order-card-items { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.order-card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-light); padding-top: 10px; }
.order-card-footer .order-total { font-size: 16px; font-weight: 700; color: var(--primary); }
.order-card-footer .track-link { color: var(--primary); font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; }

/* =================== TRACK ORDER =================== */
.track-order-content { padding: 16px; }
.track-header { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.track-header h3 { font-size: 16px; color: var(--primary); }
.tracking-timeline { padding: 0 16px; }
.timeline-item { display: flex; gap: 14px; padding-bottom: 24px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 1; }
.timeline-dot.active { background: var(--success); }
.timeline-dot .material-icons-round { font-size: 16px; color: white; }
.timeline-info h4 { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.timeline-info p { font-size: 12px; color: var(--text-muted); }
.timeline-info .timeline-status { font-size: 11px; padding: 2px 8px; border-radius: 4px; display: inline-block; margin-top: 4px; }
.delivery-partner-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 16px; display: flex; align-items: center; gap: 12px; }
.delivery-partner-card .dp-avatar { width: 40px; height: 40px; background: var(--bg-beige); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.delivery-partner-card h4 { font-size: 14px; font-weight: 600; }
.delivery-partner-card p { font-size: 12px; color: var(--text-muted); }

/* =================== WALLET =================== */
.wallet-body { padding: 0; }
.wallet-card { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); margin: 16px; border-radius: var(--radius-lg); padding: 24px; color: white; text-align: center; position: relative; overflow: hidden; }
.wallet-card::before { content: ''; position: absolute; top: -50%; right: -30%; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,0.1); }
.wallet-card small { opacity: 0.8; }
.wallet-card h1 { font-size: 36px; font-weight: 800; margin: 8px 0 16px; }
.wallet-add-btn { background: white !important; color: var(--primary) !important; }
.wallet-tabs { padding: 0 16px; }
.transaction-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.transaction-item .ti-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.transaction-item .ti-icon.credit { background: var(--success-light); color: var(--success); }
.transaction-item .ti-icon.debit { background: var(--error-light); color: var(--error); }
.transaction-item .ti-info { flex: 1; }
.transaction-item .ti-info h4 { font-size: 13px; font-weight: 600; }
.transaction-item .ti-info p { font-size: 11px; color: var(--text-muted); }
.transaction-item .ti-amount { font-size: 15px; font-weight: 700; }
.transaction-item .ti-amount.credit { color: var(--success); }
.transaction-item .ti-amount.debit { color: var(--error); }
.wallet-benefits { padding: 16px; }
.wallet-benefits h4 { margin-bottom: 12px; }
.benefits-grid { display: flex; gap: 12px; }
.benefit-item { flex: 1; text-align: center; background: white; border-radius: var(--radius); padding: 16px 8px; box-shadow: var(--shadow); }
.benefit-item span { font-size: 28px; display: block; margin-bottom: 6px; }
.benefit-item small { font-size: 11px; color: var(--text); font-weight: 500; }

/* =================== COUPONS =================== */
.coupon-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 16px 12px; overflow: hidden; display: flex; }
.coupon-left { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: 16px; min-width: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.coupon-left .coupon-value { font-size: 22px; font-weight: 800; }
.coupon-left small { font-size: 10px; opacity: 0.8; }
.coupon-right { flex: 1; padding: 14px; }
.coupon-right h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.coupon-right p { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.coupon-right .coupon-validity { font-size: 11px; color: var(--text-muted); }
.coupon-right .apply-coupon-btn { padding: 6px 16px; background: var(--primary); color: white; border: none; border-radius: 6px; font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.coupon-right .apply-coupon-btn.applied { background: var(--success); }
.referral-section { background: linear-gradient(135deg, var(--bg-cream), var(--bg-beige)); margin: 16px; padding: 20px; border-radius: var(--radius-lg); text-align: center; }
.referral-section h4 { margin-bottom: 4px; }
.referral-section p { font-size: 12px; color: var(--text-light); margin-bottom: 12px; }

/* =================== WISHLIST =================== */
.wishlist-item { display: flex; background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin: 8px 16px; padding: 12px; gap: 12px; align-items: center; }
.wishlist-item .wi-img { width: 70px; height: 70px; border-radius: 10px; background: var(--bg-beige); display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.wishlist-item .wi-info { flex: 1; }
.wishlist-item .wi-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.wishlist-item .wi-info .wi-weight { font-size: 11px; color: var(--text-muted); }
.wishlist-item .wi-info .wi-price { font-size: 15px; font-weight: 700; color: var(--primary); margin-top: 2px; }
.wishlist-item .wi-info .wi-stock { font-size: 11px; color: var(--success); }
.wishlist-item .wi-actions { display: flex; flex-direction: column; gap: 6px; }
.wishlist-item .wi-cart-btn { padding: 8px 14px; background: var(--primary); color: white; border: none; border-radius: 8px; font-family: var(--font); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wishlist-item .wi-remove-btn { padding: 6px; background: none; border: none; color: var(--text-muted); cursor: pointer; }

/* =================== ACCOUNT =================== */
.account-body { padding: 0; }
.account-profile { display: flex; align-items: center; gap: 16px; padding: 24px 16px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.account-avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }
.account-avatar .material-icons-round { font-size: 30px; }
.account-info h3 { font-size: 18px; font-weight: 600; }
.account-info p { font-size: 12px; opacity: 0.8; }
.account-menu { padding: 8px 0; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: all 0.2s; }
.menu-item:hover { background: var(--bg-cream); }
.menu-item .material-icons-round:first-child { color: var(--primary); font-size: 22px; }
.menu-item span:nth-child(2) { flex: 1; font-size: 14px; font-weight: 500; }
.menu-item .material-icons-round:last-child { color: var(--text-muted); font-size: 20px; }
.logout-btn { margin: 16px; color: var(--error) !important; border-color: var(--error) !important; }

/* =================== DRAWER =================== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 98; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: white; z-index: 99; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; box-shadow: -5px 0 30px rgba(0,0,0,0.2); }
.drawer.open { right: 0; }
.drawer-header { padding: 20px 16px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: space-between; }
.drawer-profile { display: flex; align-items: center; gap: 12px; }
.drawer-avatar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }
.drawer-avatar .material-icons-round { font-size: 24px; }
.drawer-profile h3 { font-size: 15px; font-weight: 600; }
.drawer-profile p { font-size: 11px; opacity: 0.8; }
.drawer-header .btn-icon { color: white; }
.drawer-menu { flex: 1; overflow-y: auto; padding: 8px 0; }
.drawer-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; cursor: pointer; transition: all 0.2s; }
.drawer-item:hover { background: var(--bg-cream); }
.drawer-item .material-icons-round { font-size: 22px; color: var(--primary); }
.drawer-item span:last-child { font-size: 14px; font-weight: 500; }
.drawer-divider { height: 1px; background: var(--border-light); margin: 4px 16px; }
.drawer-footer { text-align: center; padding: 16px; border-top: 1px solid var(--border-light); }
.drawer-logo { font-size: 18px; font-weight: 700; color: var(--primary); }
.drawer-logo span { color: var(--accent); }
.drawer-footer small { display: block; font-size: 11px; color: var(--text-muted); }

/* =================== BOTTOM NAV =================== */
.bottom-nav { position: absolute; bottom: 0; left: 0; right: 0; height: var(--nav-height); background: white; display: flex; align-items: center; justify-content: space-around; border-top: 1px solid var(--border-light); box-shadow: 0 -4px 20px rgba(0,0,0,0.05); z-index: 50; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; background: none; border: none; cursor: pointer; color: var(--text-muted); transition: all 0.3s; position: relative; font-family: var(--font); }
.nav-item .material-icons-round { font-size: 24px; transition: all 0.3s; }
.nav-item small { font-size: 10px; font-weight: 500; }
.nav-item.active { color: var(--primary); }
.nav-item.active .material-icons-round { color: var(--primary); transform: scale(1.1); }
.nav-badge { position: absolute; top: 2px; right: 2px; background: var(--accent); color: white; font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* =================== EMPTY STATE =================== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; text-align: center; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-top: 16px; color: var(--text-dark); }
.empty-state p { font-size: 13px; color: var(--text-light); margin: 6px 0 20px; }
.empty-state .btn-primary { width: auto; }

/* =================== TOAST =================== */
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--text-dark); color: white; padding: 12px 24px; border-radius: var(--radius); font-size: 13px; font-weight: 500; z-index: 999; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); opacity: 0; pointer-events: none; white-space: nowrap; max-width: 90%; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* =================== LOADING =================== */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 999; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =================== MODAL =================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: white; border-radius: var(--radius-xl) var(--radius-xl) 0 0; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px; }
.quick-amounts { display: flex; gap: 8px; margin-bottom: 16px; }
.quick-amounts button { flex: 1; padding: 10px; border: 1.5px solid var(--border); border-radius: 8px; background: white; font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.quick-amounts button:hover { border-color: var(--primary); background: var(--bg-cream); }

/* =================== RESPONSIVE =================== */
@media (min-width: 481px) {
    #app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
    body { background: linear-gradient(135deg, #2D1810 0%, #4A3728 100%); }
}

/* Notifications Placeholder */
#screen-notifications .screen-body { padding: 40px 24px; text-align: center; }
