/* ================================================================
   Delykart Design System v2
   Brand: Modern · Local · Fast · Trustworthy
   Colors: #045787 primary · #FFE7EA accent · #0a2540 dark text
   ================================================================ */

/* ── Base ─────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
*:focus-visible { outline: 2px solid #045787; outline-offset: 2px; border-radius: 4px; }

/* ── Typography ───────────────────────────────────────────────── */
.text-display   { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; }
.text-headline  { font-size: clamp(1.25rem, 3vw, 1.875rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.text-title     { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.text-body      { font-size: 0.9375rem; line-height: 1.6; color: #374151; }
.text-caption   { font-size: 0.75rem; line-height: 1.4; color: #6b7280; }
.text-micro     { font-size: 0.6875rem; line-height: 1.3; letter-spacing: 0.02em; }

.text-gradient-brand {
  background: linear-gradient(135deg, #045787 0%, #0369a1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Product Card (core UX component) ────────────────────────── */
.product-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #f1f5f9;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s cubic-bezier(.4,0,.2,1),
              box-shadow 0.22s cubic-bezier(.4,0,.2,1),
              border-color 0.22s;
  will-change: transform;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(4,87,135,0.11), 0 4px 12px rgba(0,0,0,0.05);
  border-color: #bfdbfe;
}

/* Image wrapper — aspect ratio container */
.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f8fafc;
}
.product-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.product-img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
}

/* Discount badge */
.badge-discount {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: #dc2626; color: #fff;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 3px 8px; border-radius: 6px;
  box-shadow: 0 2px 6px rgba(220,38,38,0.28);
  pointer-events: none;
}

/* Zone 1 badge on card image */
.badge-zone-1 {
  position: absolute; top: 10px; z-index: 2;
  background: rgba(22,163,74,0.9); color: #fff;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 3px 7px; border-radius: 5px;
  pointer-events: none; backdrop-filter: blur(4px);
}

/* Product info */
.product-card-body {
  padding: 12px 13px 13px;
  display: flex; flex-direction: column; gap: 5px;
  flex: 1;
}

.product-store-label {
  font-size: 0.6875rem; color: #9ca3af; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.product-name {
  font-size: 0.875rem; font-weight: 600; color: #0a2540;
  line-height: 1.4; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.15s;
}
.product-card:hover .product-name { color: #045787; }

/* Star rating row */
.rating-row { display: flex; align-items: center; gap: 4px; }
.rating-stars { color: #f59e0b; font-size: 0.75rem; letter-spacing: -1px; }
.rating-count { font-size: 0.6875rem; color: #9ca3af; }

/* Price row */
.price-row { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.price-now  { font-size: 1rem; font-weight: 800; color: #0a2540; line-height: 1; }
.price-was  { font-size: 0.75rem; color: #9ca3af; text-decoration: line-through; }
.price-save { font-size: 0.6875rem; font-weight: 600; color: #16a34a; }

/* Add to Cart button — full width */
.btn-add-cart {
  margin-top: 8px;
  width: 100%; padding: 9px 14px;
  background: #045787; color: #fff;
  border: none; border-radius: 10px;
  font-size: 0.8125rem; font-weight: 700;
  cursor: pointer; position: relative; overflow: hidden;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.btn-add-cart::after {
  content: '';
  position: absolute; top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: rgba(255,255,255,0.18);
  transform: skewX(-20deg); transition: left 0.38s ease;
}
.btn-add-cart:hover::after { left: 125%; }
.btn-add-cart:hover { background: #034e7a; box-shadow: 0 4px 14px rgba(4,87,135,0.32); }
.btn-add-cart:active { transform: scale(0.97); }

/* Wishlist button */
.wishlist-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1.5px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.wishlist-btn:hover { background: #fff; transform: scale(1.12); }
.wishlist-btn.active { background: #FFE7EA; border-color: #fda4af; }
.wishlist-btn svg { transition: transform 0.3s cubic-bezier(.4,0,.2,1); }
.wishlist-btn:hover svg { transform: scale(1.15); }
@keyframes heart-pop {
  0%  { transform: scale(1); }
  50% { transform: scale(1.4); }
  100%{ transform: scale(1); }
}
.wishlist-btn.just-added svg { animation: heart-pop 0.4s cubic-bezier(.4,0,.2,1); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 24px; background: #045787; color: #fff;
  border-radius: 10px; font-weight: 700; font-size: 0.9375rem;
  border: none; cursor: pointer; position: relative; overflow: hidden;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary::after {
  content: '';
  position: absolute; top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: rgba(255,255,255,0.15); transform: skewX(-20deg);
  transition: left 0.4s ease;
}
.btn-primary:hover::after { left: 125%; }
.btn-primary:hover { background: #034e7a; box-shadow: 0 6px 20px rgba(4,87,135,0.35); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; background: #FFE7EA; color: #045787;
  border-radius: 10px; font-weight: 700; font-size: 0.9375rem;
  border: 2px solid #fda4af; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-secondary:hover { background: #fecdd3; }
.btn-secondary:active { transform: scale(0.98); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; background: transparent; color: #045787;
  border-radius: 10px; font-weight: 600; font-size: 0.9375rem;
  border: 2px solid #045787; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.btn-outline:hover { background: #045787; color: #fff; }
.btn-outline:active { transform: scale(0.98); }

/* ── Card base ────────────────────────────────────────────────── */
.card { background: #fff; border-radius: 16px; border: 1.5px solid #f1f5f9; }
.card-hover { transition: transform 0.22s cubic-bezier(.4,0,.2,1), box-shadow 0.22s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(4,87,135,0.09); }
/* Keep old class working */
.card-premium { background:#fff; border-radius:16px; border:1.5px solid #f1f5f9; overflow:hidden; transition:transform .22s cubic-bezier(.4,0,.2,1),box-shadow .22s,border-color .22s; }
.card-premium:hover { transform:translateY(-4px); box-shadow:0 16px 36px rgba(4,87,135,.11); border-color:#bfdbfe; }

/* ── Category card ────────────────────────────────────────────── */
.cat-card { transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; }
.cat-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 10px 24px rgba(4,87,135,0.14); }

/* ── Filter sidebar ───────────────────────────────────────────── */
.filter-sidebar {
  position: sticky; top: 88px;
  max-height: calc(100vh - 100px);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent;
}
.filter-sidebar::-webkit-scrollbar { width: 3px; }
.filter-sidebar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* ── Filter pills ─────────────────────────────────────────────── */
.filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: #eff6ff; color: #045787;
  border: 1.5px solid #bfdbfe; border-radius: 20px;
  padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.filter-pill:hover { background: #dbeafe; }
.filter-pill .remove { opacity: 0.55; }
.filter-pill .remove:hover { opacity: 1; color: #dc2626; }

/* ── Mobile filter drawer ─────────────────────────────────────── */
#filter-drawer { position: fixed; inset: 0; z-index: 50; visibility: hidden; }
#filter-drawer.open { visibility: visible; }
#filter-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,37,64,0.5); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.3s ease;
}
#filter-drawer.open #filter-backdrop { opacity: 1; }
#filter-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 0 0 env(safe-area-inset-bottom);
  max-height: 85vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
#filter-drawer.open #filter-panel { transform: translateY(0); }

/* ── Zone badges ──────────────────────────────────────────────── */
.zone-badge-1 {
  display: inline-flex; align-items: center; gap: 5px;
  background: #dcfce7; color: #16a34a;
  border: 1px solid #bbf7d0; border-radius: 20px;
  padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
}
.zone-badge-2 {
  display: inline-flex; align-items: center; gap: 5px;
  background: #eff6ff; color: #045787;
  border: 1px solid #bfdbfe; border-radius: 20px;
  padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
}

/* ── Section accent line ──────────────────────────────────────── */
.section-divider { height: 3px; width: 48px; background: linear-gradient(90deg, #045787, #0ea5e9); border-radius: 2px; }

/* ── Size buttons ─────────────────────────────────────────────── */
.size-btn { padding: 7px 16px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.18s; background: #fff; color: #374151; }
.size-btn:hover:not(.unavailable) { border-color: #045787; color: #045787; }
.size-btn.selected { border-color: #045787; background: #045787; color: #fff; }
.size-btn.unavailable { opacity: 0.38; cursor: not-allowed; text-decoration: line-through; }

/* ── Checkout: steps ──────────────────────────────────────────── */
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; border: 2px solid #e5e7eb; background: #fff; color: #9ca3af; transition: all 0.25s; flex-shrink: 0; }
.step-dot.active { border-color: #045787; background: #045787; color: #fff; box-shadow: 0 0 0 4px rgba(4,87,135,0.15); }
.step-dot.done   { border-color: #16a34a; background: #16a34a; color: #fff; }
.step-line { flex: 1; height: 2px; background: #e5e7eb; transition: background 0.3s; }
.step-line.done  { background: #16a34a; }
.step-line.active{ background: #045787; }

/* ── Quantity control ─────────────────────────────────────────── */
.qty-control { display: inline-flex; align-items: center; border: 2px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.qty-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; color: #045787; background: #fff; cursor: pointer; border: none; transition: background 0.15s; }
.qty-btn:hover { background: #eff6ff; }
.qty-input { width: 44px; text-align: center; font-weight: 700; font-size: 0.9375rem; border: none; border-left: 2px solid #e5e7eb; border-right: 2px solid #e5e7eb; outline: none; background: #fff; color: #0a2540; line-height: 36px; }

/* ── Checkout: address + payment cards ────────────────────────── */
.address-card { border: 2px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.address-card:hover { border-color: #93c5fd; background: #f8faff; }
.address-card.selected { border-color: #045787; background: #eff6ff; }
.payment-card { border: 2px solid #e5e7eb; border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.payment-card:hover { border-color: #93c5fd; }
.payment-card.selected { border-color: #045787; background: #f0f9ff; }

/* ── Form inputs ──────────────────────────────────────────────── */
.input-field { width: 100%; padding: 11px 16px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 0.9375rem; color: #0a2540; background: #fff; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.input-field:focus { border-color: #045787; box-shadow: 0 0 0 4px rgba(4,87,135,0.08); }
.input-field::placeholder { color: #9ca3af; }
.input-label { display: block; font-size: 0.8125rem; font-weight: 600; color: #374151; margin-bottom: 5px; }

/* ── Image gallery thumbs ─────────────────────────────────────── */
.thumb-img { cursor: pointer; border: 2px solid transparent; border-radius: 10px; transition: border-color 0.2s, transform 0.2s; overflow: hidden; }
.thumb-img:hover  { border-color: #93c5fd; transform: scale(1.03); }
.thumb-img.active { border-color: #045787; }

/* ── Skeleton ─────────────────────────────────────────────────── */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: 8px; }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-img  { aspect-ratio: 4/5; }
.skeleton-title { height: 18px; width: 70%; }

/* ── Utilities ────────────────────────────────────────────────── */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes float    { 0%,100% { transform: translateY(0); }  50% { transform: translateY(-14px); } }
@keyframes breathe  { 0%,100% { transform: scale(1);    opacity: 0.6; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes ticker   { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@keyframes toast-up { from { transform: translateY(80px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse-dot{ 0%,100% { transform: scale(1);    opacity: 1; } 50% { transform: scale(1.5); opacity: 0.6; } }
@keyframes spin     { to { transform: rotate(360deg); } }

.float-anim   { animation: float   3s ease-in-out infinite; }
.ring-breathe { animation: breathe 3s ease-in-out infinite; }
.ticker-text  { animation: ticker 22s linear infinite; white-space: nowrap; }
.pulse-dot    { animation: pulse-dot 1.5s ease-in-out infinite; }
.spinner      { animation: spin 0.8s linear infinite; }

/* ── Toast ────────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { animation: toast-up 0.28s cubic-bezier(.4,0,.2,1); background: #0a2540; color: #fff; padding: 13px 20px; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,0.22); min-width: 200px; font-size: 0.9rem; font-weight: 500; border-left: 3px solid rgba(255,255,255,0.25); }
.toast.success { background: #16a34a; border-left-color: #86efac; }
.toast.error   { background: #dc2626; border-left-color: #fca5a5; }

/* ── Misc ─────────────────────────────────────────────────────── */
.nav-scrolled { box-shadow: 0 2px 20px rgba(4,87,135,0.12) !important; }
.otp-input { width: 44px; height: 52px; text-align: center; font-size: 1.25rem; font-weight: 700; border: 2px solid #e5e7eb; border-radius: 10px; outline: none; transition: border-color 0.2s; }
.otp-input:focus { border-color: #045787; box-shadow: 0 0 0 3px rgba(4,87,135,0.1); }
.otp-input.filled { border-color: #045787; background: #eff6ff; }
.drop-zone { border: 2px dashed #cbd5e1; border-radius: 14px; padding: 2rem; text-align: center; transition: border-color 0.2s, background 0.2s; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragover { border-color: #045787; background: #eff6ff; }
.color-tag { display: inline-flex; align-items: center; gap: 5px; background: #f3f4f6; border-radius: 20px; padding: 4px 10px; font-size: 0.75rem; }
.color-tag button { line-height: 1; color: #9ca3af; }
.color-tag button:hover { color: #dc2626; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px; font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.72); transition: all 0.18s; text-decoration: none; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(255,255,255,0.14); color: #fff; }
.size-toggle { padding: 6px 16px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.18s; background: #fff; color: #374151; }
.size-toggle:hover { border-color: #045787; color: #045787; }

/* ── Print ────────────────────────────────────────────────────── */
@media print {
  body > *:not(.label-print) { display: none !important; }
  .no-print { display: none !important; }
  .label-print { display: block !important; }
}
