/* ==========================================
   ADITION ELECTRIC SOLUTION - Main Stylesheet
   Mobile-First Design
   ========================================== */

:root {
  --primary: #f0c040;
  --primary-dark: #d4a820;
  --accent: #232f3e;
  --accent2: #37475a;
  --text: #111;
  --text-muted: #666;
  --bg: #f5f5f5;
  --white: #fff;
  --red: #e74c3c;
  --green: #27ae60;
  --border: #ddd;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: 110px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ======== HEADER ======== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--accent);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.store-name {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  max-width: 120px;
}

.header-search {
  flex: 1;
  min-width: 0;
}

.search-box {
  display: flex;
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  border: none;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.search-btn {
  background: var(--primary);
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  font-size: 11px;
  padding: 4px 6px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.header-icon-btn .icon { font-size: 20px; }
.header-icon-btn .icon-label { font-size: 10px; color: #ccc; }

.cart-count {
  position: absolute;
  top: 0; right: 0;
  background: var(--red);
  color: white;
  border-radius: 50%;
  width: 16px; height: 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Category Nav */
.category-nav {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: var(--accent2);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar { display: none; }

.cat-btn {
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #ccc;
  background: transparent;
  border: 1px solid #555;
  transition: all 0.2s;
}

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

/* Back Button */
.back-btn {
  color: var(--primary);
  font-weight: 500;
  font-size: 14px;
  padding: 4px 0;
}

.page-title {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
}

.secure-badge {
  color: var(--primary);
  font-size: 12px;
}

/* ======== BANNER ======== */
.banner-section {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  padding: 24px 16px;
  color: white;
}

.banner-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.banner-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--primary);
}

.banner-sub {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 16px;
}

.banner-cta {
  background: var(--primary);
  color: var(--accent);
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* ======== FEATURE STRIP ======== */
.feature-strip {
  display: flex;
  overflow-x: auto;
  background: var(--white);
  padding: 8px 12px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.feature-strip::-webkit-scrollbar { display: none; }

.feature-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ======== MAIN CONTENT ======== */
.main-content {
  padding: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.sort-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  background: white;
}

/* ======== PRODUCTS GRID ======== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 600px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .products-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ======== PRODUCT CARD ======== */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

.product-card .badge {
  position: absolute;
  top: 6px; left: 6px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  z-index: 2;
}

.product-card .out-badge {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  border-radius: var(--radius);
}

.out-badge span {
  background: #333;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f8f8f8;
}

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

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

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

.product-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-prices {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.selling-price {
  font-size: 16px;
  font-weight: 700;
  color: #0f1111;
}

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

.discount-pct {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
}

.add-to-cart-btn {
  width: 100%;
  background: var(--primary);
  color: var(--accent);
  border: none;
  padding: 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.add-to-cart-btn:hover { background: var(--primary-dark); }

.add-to-cart-btn.added {
  background: var(--green);
  color: white;
}

/* ======== PRODUCT DETAIL ======== */
.product-detail {
  background: white;
  min-height: 80vh;
}

.product-detail-inner {
  max-width: 800px;
  margin: 0 auto;
}

.product-images {
  background: #f8f8f8;
  position: relative;
}

.main-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  cursor: zoom-in;
}

.product-detail-info {
  padding: 16px;
}

.product-detail-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-detail-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.detail-selling {
  font-size: 28px;
  font-weight: 700;
  color: #0f1111;
}

.detail-mrp {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.detail-discount {
  font-size: 16px;
  color: var(--red);
  font-weight: 600;
}

.delivery-info {
  background: #f8f8f8;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.delivery-info strong { color: var(--green); }

.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.qty-label { font-weight: 500; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  background: #f5f5f5;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-val {
  width: 40px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.action-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.atc-btn {
  flex: 1;
  padding: 14px;
  background: var(--primary);
  color: var(--accent);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.buy-btn {
  flex: 1;
  padding: 14px;
  background: #ff9f00;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-description {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.product-description h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent);
}

.product-description p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.product-features {
  padding: 0 16px 16px;
}

.product-features h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent);
}

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

.product-features ul li {
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

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

/* Sticky bottom bar */
.sticky-add-cart {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 50;
}

.sticky-price { flex: 1; }
.sticky-selling-price { font-size: 18px; font-weight: 700; }

.sticky-atc-btn {
  flex: 1;
  padding: 12px;
  background: var(--primary);
  color: var(--accent);
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.sticky-buy-btn {
  flex: 1;
  padding: 12px;
  background: #ff9f00;
  color: white;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ======== CART DRAWER ======== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  right: -100%;
  top: 0; bottom: 0;
  width: min(380px, 95vw);
  background: white;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
}

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

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

.cart-header h3 { font-size: 17px; font-weight: 700; }

.close-btn {
  color: white;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.cart-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.cart-empty .empty-icon { font-size: 48px; margin-bottom: 8px; }

.cart-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}

.cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  background: #f8f8f8;
  flex-shrink: 0;
}

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

.cart-item-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price { font-size: 14px; font-weight: 700; color: var(--text); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cart-qty-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-val { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }

.remove-item-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  align-self: center;
}

.cart-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.cart-summary { margin-bottom: 12px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.total-row {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 16px;
}

.checkout-btn {
  display: block;
  background: var(--primary);
  color: var(--accent);
  text-align: center;
  padding: 14px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* Sticky Cart */
.sticky-cart {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  cursor: pointer;
}

/* ======== CHECKOUT ======== */
.checkout-steps {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--accent2);
  gap: 4px;
}

.step {
  font-size: 12px;
  color: #999;
  padding: 4px 8px;
}

.step.active { color: var(--primary); font-weight: 700; }
.step-divider { color: #666; font-size: 14px; }

.checkout-main {
  padding: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.checkout-section { display: none; }
.checkout-section.active { display: block; }

.section-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent);
}

.checkout-items { margin-bottom: 12px; }

.checkout-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: white;
  border-radius: var(--radius);
  margin-bottom: 8px;
  align-items: center;
}

.checkout-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  background: #f8f8f8;
}

.checkout-item-info { flex: 1; }
.checkout-item-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.checkout-item-detail { font-size: 12px; color: var(--text-muted); }
.checkout-item-price { font-size: 14px; font-weight: 700; }

.price-breakdown {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

.login-panel, .address-form {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
}

.login-msg { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(240,192,64,0.2);
}

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

.mobile-input-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.country-code {
  padding: 10px 10px;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 600;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

.mobile-input-wrap input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.customer-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f7ff;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}

.change-btn {
  color: #0066cc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
}

.primary-btn {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: var(--accent);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover { background: var(--primary-dark); }
.primary-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.secondary-btn {
  width: 100%;
  padding: 11px;
  background: white;
  color: var(--accent);
  border: 2px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.payment-methods { margin-bottom: 16px; }
.payment-methods h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

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

.payment-option input { display: none; }

.pay-option-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pay-icon { font-size: 24px; }
.pay-option-content strong { display: block; font-size: 14px; }
.pay-option-content small { font-size: 12px; color: var(--text-muted); }

.pay-btn { background: var(--green); color: white; font-size: 16px; }
.pay-btn:hover { background: #219a52; }

.secure-payment-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.order-summary-final {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* ======== SUCCESS MODAL ======== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-content {
  background: white;
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.success-modal {
  text-align: center;
  padding: 32px 24px;
}

.success-icon { font-size: 60px; margin-bottom: 16px; }
.success-modal h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-modal p { font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }

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

/* ======== ACCOUNT ======== */
.account-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.account-hero {
  text-align: center;
  padding: 24px 0 16px;
}

.account-icon { font-size: 60px; margin-bottom: 12px; }
.account-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.account-hero p { font-size: 14px; color: var(--text-muted); }

.login-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.input-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.profile-avatar { font-size: 48px; }

.profile-info { flex: 1; }
.profile-info h2 { font-size: 18px; font-weight: 700; }
.profile-info p { font-size: 13px; color: var(--text-muted); }

.logout-btn {
  background: #f5f5f5;
  color: var(--red);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.account-tabs {
  display: flex;
  gap: 4px;
  background: white;
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--primary);
  color: var(--accent);
  font-weight: 700;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.orders-notice {
  background: #fff8e1;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  gap: 6px;
}

.orders-list { display: flex; flex-direction: column; gap: 10px; }

.order-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.order-id { font-size: 13px; font-weight: 700; color: var(--accent); }
.order-date { font-size: 12px; color: var(--text-muted); }

.order-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-preparing { background: #cce5ff; color: #004085; }
.status-ready { background: #d4edda; color: #155724; }
.status-shipped { background: #d1ecf1; color: #0c5460; }
.status-delivered { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.order-items-preview {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.order-total { font-size: 15px; font-weight: 700; }

.order-actions { display: flex; gap: 8px; margin-top: 10px; }

.view-details-btn {
  flex: 1;
  padding: 8px;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.download-invoice-btn {
  flex: 1;
  padding: 8px;
  background: #f5f5f5;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.profile-form {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Order Detail Modal */
.order-modal {
  padding: 20px;
  max-height: 85vh;
  overflow-y: auto;
}

.order-modal h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

/* ======== LOADING ======== */
.loading-spinner {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

.empty-state .empty-icon { font-size: 60px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; margin-bottom: 12px; }
.empty-state button {
  padding: 10px 20px;
  background: var(--primary);
  color: var(--accent);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

/* ======== TOAST ======== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  z-index: 400;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* ======== LOAD MORE ======== */
.load-more-wrap { text-align: center; padding: 16px; }

.load-more-btn {
  padding: 10px 30px;
  border: 2px solid var(--primary);
  background: white;
  color: var(--accent);
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

/* ======== FOOTER ======== */
.footer {
  background: var(--accent);
  color: #aaa;
  padding: 24px 16px;
  margin-top: 32px;
  text-align: center;
}

.footer-name { color: var(--primary); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.footer-links { margin-bottom: 8px; font-size: 13px; }
.footer-links a { color: #ccc; margin: 0 4px; }
.footer-copy { font-size: 12px; }

/* ======== RESPONSIVE ======== */
@media (min-width: 768px) {
  body { padding-top: 100px; }

  .header-top { padding: 12px 24px; }
  .store-name { font-size: 16px; max-width: 200px; }
  .banner-title { font-size: 32px; }
  .banner-section { padding: 40px 24px; }

  .action-btns { max-width: 400px; }
}
