/* ---------- Buttons — Denim Spec: 0.2s ease-in → --secondary-wash ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  border: 1px solid transparent; border-radius: var(--r-md); padding: 10px 18px;
  font-size: var(--fs-sm); font-weight: 600;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  background: var(--ink-100); color: var(--ink-800); white-space: nowrap; user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--primary-denim); color: var(--pure-white); box-shadow: var(--shadow-sm); transition: background 0.2s ease-in, transform 0.2s ease-in, box-shadow 0.2s ease-in; }
.btn-primary:hover { background: var(--secondary-wash); }
.btn-accent { background: var(--primary-denim); color: var(--pure-white); transition: background 0.2s ease-in; }
.btn-accent:hover { background: var(--secondary-wash); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--light-indigo); }
.btn-outline { background: transparent; border-color: var(--ink-200); color: var(--ink-700); }
.btn-outline:hover { border-color: var(--primary-denim); color: var(--primary-denim); }
.btn-danger { background: var(--zuno-danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); }
.btn-sm { padding: 7px 12px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { padding: 14px 22px; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--ink-200); background: var(--surface);
  color: var(--ink-900); border-radius: var(--r-md); padding: 12px 14px; font-size: var(--fs-md);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary-denim); box-shadow: 0 0 0 4px var(--light-indigo); }
.input::placeholder { color: var(--ink-400); }
.field-error { color: var(--zuno-danger); font-size: var(--fs-xs); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: var(--sp-5); }
.elevated { box-shadow: var(--shadow-md); }

/* ---------- Product card — Souled Store inspired + Denim Shift ---------- */
.product-card { background: var(--pure-white); border: 1px solid var(--light-indigo); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s ease-in, box-shadow 0.2s ease-in, border-color 0.2s ease-in; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(28,37,65,0.12); border-color: var(--ink-200); }
.product-thumb { aspect-ratio: 4 / 5; background: var(--light-indigo); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.product-thumb .ph { width: 64px; height: 64px; border-radius: var(--r-md); background: var(--ink-100); color: var(--ink-700); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: var(--fs-xl); }
.product-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms var(--ease); }
.product-img-hover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s ease-in; }
.product-card:hover .product-img { transform: scale(1.04); }
.product-card:hover .product-img-hover { opacity: 1; }
.product-badge { position: absolute; top: 10px; left: 10px; background: var(--primary-denim); color: var(--pure-white); font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: var(--r-full); letter-spacing: 0.04em; text-transform: uppercase; z-index: 2; }
.accent-dot { position: absolute; top: 10px; left: 10px; width: 10px; height: 10px; border-radius: 50%; z-index: 2; }
.accent-dot.lime { background: #a3ff00; } .accent-dot.cyan { background: #00e5ff; } .accent-dot.orange { background: #ff6b00; } .accent-dot.pink { background: #ff2d95; }
.product-meta small { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.06em; color: #8a94a8; text-transform: uppercase; }

/* Quick Add removed — clean tee-only cards. Keep hidden for compat. */
.quick-add-panel, .quick-add { display: none !important; }

.wish-btn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--ink-500); font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(28,37,65,0.18); transition: transform 0.2s ease-in, color 0.2s ease-in, background 0.2s ease-in; z-index: 2; }
.wish-btn:hover { transform: scale(1.08); }
.wish-btn.active { color: var(--pure-white); background: var(--primary-denim); }
.btn.active { color: var(--primary-denim); }
.product-body { padding: var(--sp-3) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-name { font-weight: 700; color: var(--dark-charcoal); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; line-height: 1.35; }
.product-meta { font-size: var(--fs-xs); color: var(--ink-500); letter-spacing: 0.02em; }
.product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding-top: var(--sp-2); }
.price-current { font-weight: 800; color: var(--secondary-wash); }
.price { font-weight: 800; color: var(--dark-charcoal); }
.discount-price { color: var(--secondary-wash); font-weight: 800; }

/* Grid — strict 4-col desktop → 2-col mobile (Flexbox/Grid mobile-first) */
.grid { display: grid; gap: var(--sp-5); }
.grid-products { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-quick { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .grid-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-quick { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid-products { grid-template-columns: repeat(2, 1fr); gap: 10px !important; }
  .grid-products .product-card{ border-radius:10px; }
}
@media (max-width: 360px) { .grid-products { gap: 8px !important; } }
@media (max-width: 900px) { .grid-quick { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .grid-quick { grid-template-columns: repeat(2, 1fr); } }

/* Quick action tile */
.quick { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-2); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--light-indigo); transition: transform 0.2s ease-in, box-shadow 0.2s ease-in, border-color 0.2s ease-in; text-align: center; min-height:44px; }
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--light-indigo); text-decoration: none; }
.quick .ic { width: 52px; height: 52px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--light-indigo); }
.quick.shop .ic { background: #EEF2FF; } .quick.grocery .ic { background: #ECFDF3; } .quick.food .ic { background: #FFF7ED; } .quick.services .ic { background: #FEF2F2; } .quick.payments .ic { background: #EFF6FF; } .quick.experiences .ic { background: #FAF5FF; }
@media (max-width: 480px){ .quick{ padding:12px 8px; } .quick .ic{ width:44px; height:44px; font-size:22px; } }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); }
.badge-success { background: var(--zuno-success-50); color: var(--zuno-success); }
.badge-danger { background: var(--zuno-danger-50); color: var(--zuno-danger); }
.badge-warning { background: var(--zuno-warning-50); color: var(--zuno-warning); }
.badge-info { background: var(--light-indigo); color: var(--primary-denim); }
.badge-denim { background: var(--primary-denim); color: var(--pure-white); }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--r-full); background: var(--light-indigo); color: var(--dark-charcoal); font-size: var(--fs-sm); font-weight: 600; border: 1px solid transparent; transition: all 0.2s ease-in; }
.chip:hover { background: var(--ink-200); text-decoration: none; }
.chip.active { background: var(--primary-denim); color: var(--pure-white); border-color: var(--primary-denim); }
.chip-active { background: var(--primary-denim); color: #fff; border-color: var(--primary-denim); }
.chip-outline { background: transparent; border-color: var(--ink-200); }

/* Mini-cart CTA */
.btn-checkout {
  display: block; width: 100%; text-align: center;
  background: var(--primary-denim); color: var(--pure-white);
  padding: 14px; border-radius: var(--r-full); font-weight: 800; letter-spacing: 0.04em;
  text-decoration: none; border: none;
  transition: background 0.2s ease-in, transform 0.2s ease-in;
}
.btn-checkout:hover { background: var(--secondary-wash); text-decoration: none; color: var(--pure-white); }
.btn-checkout:active { transform: scale(0.99); }

/* Skeletons */
.skeleton { background: linear-gradient(90deg, var(--light-indigo) 25%, var(--ink-50) 37%, var(--light-indigo) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-card { height: 260px; border-radius: var(--r-lg); }

/* Empty state */
.empty { text-align: center; padding: var(--sp-9) var(--sp-5); max-width: 460px; margin: 0 auto; }
.empty .em-ic { width: 72px; height: 72px; border-radius: var(--r-full); background: var(--light-indigo); display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto var(--sp-4); }
.empty h3 { margin-bottom: var(--sp-2); }

/* Toast */
.toast { display: flex; gap: var(--sp-3); align-items: flex-start; background: var(--surface); border: 1px solid var(--light-indigo); border-left: 4px solid var(--primary-denim); box-shadow: var(--shadow-md); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); min-width: 280px; animation: slideIn 0.2s ease-in; }
.toast.success { border-left-color: var(--zuno-success); }
.toast.error { border-left-color: var(--zuno-danger); }
.toast.warning { border-left-color: var(--zuno-warning); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Modal / overlay */
.overlay { position: fixed; inset: 0; background: rgba(28,37,65,0.5); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; z-index: 200; animation: fade 0.2s ease-in; }
@media (min-width: 760px) { .overlay { align-items: center; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); width: 100%; max-width: 520px; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--sp-6); max-height: 90vh; overflow: auto; animation: rise 0.2s ease-in; }
@media (min-width: 760px) { .modal { border-radius: var(--r-xl); } }
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* Tabs */
.tabs { display: flex; gap: var(--sp-2); border-bottom: 1px solid var(--light-indigo); overflow-x: auto; }
.tab { padding: var(--sp-3) var(--sp-4); font-weight: 600; color: var(--ink-500); border-bottom: 2px solid transparent; white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; transition: color 0.2s ease-in, border-color 0.2s ease-in; }
.tab.active { color: var(--primary-denim); border-bottom-color: var(--primary-denim); }

/* Stepper */
.stepper { display: flex; align-items: center; gap: var(--sp-2); }
.step { display: flex; align-items: center; gap: var(--sp-2); color: var(--ink-400); font-size: var(--fs-sm); font-weight: 600; }
.step .dot { width: 26px; height: 26px; border-radius: var(--r-full); background: var(--light-indigo); color: var(--ink-500); display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); }
.step.done .dot { background: var(--zuno-success); color: #fff; }
.step.active .dot { background: var(--primary-denim); color: #fff; }
.step.active { color: var(--dark-charcoal); }
.step-line { flex: 1; height: 2px; background: var(--light-indigo); min-width: 16px; }

/* Avatar */
.avatar { width: 40px; height: 40px; border-radius: var(--r-full); background: var(--primary-denim); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* misc */
.divider { height: 1px; background: var(--light-indigo); margin: var(--sp-4) 0; border: 0; }
.pill-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.notice { background: var(--light-indigo); border: 1px solid #d6deee; color: var(--dark-charcoal); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); font-size: var(--fs-sm); }

/* Cart drawer specifics */
.drawer__panel { background: var(--pure-white); }
.drawer__backdrop { background: rgba(28,37,65,0.4); }
/* ── Mini-cart drawer popup — appears after Add to Bag ── */
.cart-drawer { position: fixed; inset: 0; z-index: 320; display: flex; justify-content: flex-end; animation: fade 0.2s ease-in; }
.cart-drawer__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.45); backdrop-filter: blur(2px); }
.cart-drawer__panel { position: relative; width: min(420px, 100vw); max-width: 100%; height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(15,23,42,0.18); animation: drawerIn 0.22s cubic-bezier(0.22,1,0.36,1); }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.cart-drawer__head h3 { margin: 0; color: #0f172a; font-size: 16px; font-weight: 800; }
.cart-drawer__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e2e8f0; background: #f8fafc; display: grid; place-items: center; font-size: 16px; cursor: pointer; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.cart-drawer__foot { padding: 16px 20px; border-top: 1px solid #e2e8f0; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.cart-drawer__item { display: flex; gap: 12px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.cart-drawer__item img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #e2e8f0; }
@media (max-width: 480px) { .cart-drawer__panel { width: 100%; } }

/* ── Mobile polish: touch targets, bottom nav, product cards (tee-only) ── */
@media (max-width: 640px){
  .btn{ min-height:44px; }
  .icon-btn{ min-width:44px; min-height:44px; }
  .product-badge{ font-size:9px; padding:3px 7px; top:8px; left:8px; max-width: calc(100% - 52px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wish-btn{ width:32px; height:32px; font-size:16px; top:8px; right:8px; }
  .product-thumb{ aspect-ratio: 4 / 5; overflow: hidden; }
  .product-img, .product-img-hover{ width: 100%; height: 100%; object-fit: cover; }
  .product-body{ padding: 10px !important; min-width: 0; }
  .product-name{ overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 480px){
  .bottom-nav a{ font-size:10px; gap:1px; padding:6px 2px; }
  .bottom-nav a .em{ font-size:18px; }
  .product-name{ font-size:12px !important; line-height:1.3; }
  .price-current, .discount-price{ font-size:14px !important; }
}
