/* Tucks e-commerce theme — shared with home.html + clothes product pages */

:root {
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-glow: rgba(37, 99, 235, 0.28);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --muted: #64748b;
  --radius: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-height: 68px;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 24px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  background: var(--surface-2);
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(37, 99, 235, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(16, 185, 129, 0.06), transparent),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.bg-orbs::before,
.bg-orbs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: orbFloat 20s ease-in-out infinite;
}
.bg-orbs::before {
  width: 360px; height: 360px;
  background: #93c5fd;
  top: -80px; left: -60px;
}
.bg-orbs::after {
  width: 320px; height: 320px;
  background: #6ee7b7;
  bottom: 15%; right: -80px;
  animation-delay: -10s;
  animation-direction: reverse;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.25;
  animation: orbFloat 16s ease-in-out infinite;
}
.orb-1 { width: 240px; height: 240px; background: #bfdbfe; top: 35%; left: 55%; animation-delay: -5s; }
.orb-2 { width: 180px; height: 180px; background: #fde68a; top: 65%; left: 8%; animation-delay: -8s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-25px, 20px) scale(0.95); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%) skewX(-12deg); }
  100% { transform: translateX(200%) skewX(-12deg); }
}
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes navFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-wrap {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 0 var(--border);
  border-bottom: 1px solid var(--border);
  animation: slideDown 0.6s var(--ease-out);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
  text-decoration: none;
}
.logo:hover { opacity: 0.88; transform: translateY(-1px); }
.logo-img {
  height: 36px;
  width: auto;
  max-width: 42px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.search-container {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search-container input {
  width: 100%;
  padding: 11px 44px 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.search-container input::placeholder { color: var(--text-muted); }
.search-container input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
#searchBtn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: color 0.25s, background 0.25s;
}
.search-container input:focus + #searchBtn { color: var(--accent); }
#searchBtn:hover { color: var(--accent); background: var(--accent-soft); }
#suggestionBox {
  position: absolute;
  top: calc(100% + 8px);
  width: 100%;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  max-height: 260px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  animation: fadeInUp 0.25s var(--ease-out);
  border: 1px solid var(--border);
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  font: inherit;
}
.search-suggestion:last-child { border-bottom: none; }
.search-suggestion:hover,
.search-suggestion:focus-visible {
  background: var(--accent-soft);
  outline: none;
}
.search-suggestion__thumb {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}
.search-suggestion__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.search-suggestion__name { font-weight: 600; font-size: 0.92rem; }
.search-suggestion__price { font-size: 0.8rem; opacity: 0.8; }
.search-suggestion--status {
  display: block;
  padding: 12px;
  color: var(--text-muted);
  cursor: default;
}

.card.highlighted-product {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--accent-soft), 0 12px 32px rgba(0, 0, 0, 0.18);
  animation: productHighlightPulse 1.2s ease-in-out 2;
}
@keyframes productHighlightPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.product-options {
  display: none;
  margin-top: 4px;
}
.product-options__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.4;
}
.product-options__field select:invalid,
.product-options__field select option:disabled {
  color: var(--text-muted);
}
.product-options__measurements {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.product-options__measurements-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.product-options__measurements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 520px) {
  .product-options__measurements-grid { grid-template-columns: 1fr; }
}

#menuToggle { display: none; }
.menu-icon {
  width: 28px;
  height: 24px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  display: block;
}
.menu-icon span {
  position: absolute;
  left: 0;
  height: 2.5px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s, top 0.35s var(--ease-out);
}
.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 10.75px; }
.menu-icon span:nth-child(3) { top: 21.5px; }
#menuToggle:checked + .menu-icon span:nth-child(1) { transform: rotate(45deg); top: 10.75px; }
#menuToggle:checked + .menu-icon span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#menuToggle:checked + .menu-icon span:nth-child(3) { transform: rotate(-45deg); top: 10.75px; }

.menu-dropdown {
  position: fixed;
  top: 62px;
  right: 16px;
  width: 200px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) scale(0.96);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  z-index: 998;
  border: 1px solid var(--border);
}
#menuToggle:checked ~ .menu-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.menu-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.25s, color 0.25s;
}
.menu-dropdown a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

#tips {
  background: var(--accent-soft);
  color: var(--accent-2);
  text-align: center;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  animation: fadeInUp 0.7s var(--ease-out) 0.15s both;
  border-bottom: 1px solid var(--border);
}

/* Hero (clothes pages) */
.hero {
  text-align: center;
  padding: 28px 20px 12px;
  animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  animation: floatBadge 3s ease-in-out infinite;
}
.hero-content { max-width: 720px; margin: 0 auto; }
.hero-title,
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.hero-subtitle,
.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 560px;
  margin-inline: auto;
}

.attire-advert {
  margin: 16px 20px;
  padding: clamp(20px, 4vw, 28px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 8px 32px var(--accent-glow);
  animation: fadeInUp 0.7s var(--ease-out) 0.3s both;
  overflow: hidden;
  position: relative;
}
.attire-advert::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12), transparent 55%);
  pointer-events: none;
}
.advert-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.advert-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  margin: 0 0 8px;
}
.advert-text {
  font-size: 0.92rem;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
}
.advert-btn,
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--accent);
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.advert-btn:hover,
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

main {
  padding: 8px 20px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.category { margin: 20px 0; animation: fadeInUp 0.7s var(--ease-out) 0.35s both; }
.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.cat-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.filters button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.25s var(--ease-out);
}
.filters button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.filters button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin-top: 12px;
}

.product-grid .card {
  height: 300px;
  border-radius: calc(var(--radius) + 2px);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    opacity 0.5s var(--ease-out),
    border-color 0.3s,
    background-size 0.65s var(--ease-out);
  isolation: isolate;
}
.product-grid .card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 38%,
    rgba(15, 23, 42, 0.35) 100%
  );
  opacity: 0.85;
  transition: opacity 0.35s var(--ease-out);
  z-index: 1;
  pointer-events: none;
}
.product-grid .card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-16deg);
  transition: left 0.6s var(--ease-out);
  z-index: 2;
  pointer-events: none;
}
.product-grid .card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.product-grid .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
  background-size: 108%;
}
.product-grid .card:hover::before {
  opacity: 1;
  background: linear-gradient(
    165deg,
    rgba(37, 99, 235, 0.12) 0%,
    transparent 42%,
    rgba(15, 23, 42, 0.55) 100%
  );
}
.product-grid .card:hover::after {
  left: 130%;
}
.product-grid .card:active {
  transform: translateY(-4px) scale(1.01);
}

.card-overlay {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.82) 100%);
  color: #fff;
  transform: translateY(6px);
  transition: transform 0.35s var(--ease-out);
}
.product-grid .card:hover .card-overlay {
  transform: translateY(0);
}
.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 0.78rem;
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 5px 12px;
  font-weight: 800;
  font-size: 0.92rem;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.sold-out {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.2s;
}
.btn:hover {
  background: var(--accent-2);
  box-shadow: 0 6px 16px var(--accent-glow);
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.3);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1200;
  padding: 12px;
  animation: fadeIn 0.25s ease;
}
.lightbox.show { display: flex; }
.lb {
  width: 100%;
  max-width: 1000px;
  background: var(--surface);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 12px;
  padding: 16px;
  overflow: auto;
  max-height: 92vh;
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  animation: fadeInUp 0.35s var(--ease-out);
}
.lb-left { padding: 4px; }
.lb-main {
  height: 400px;
  border-radius: 12px;
  background: var(--surface-2);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  position: relative;
  overflow: hidden;
}
.lb-preview-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.lb-preview-btn:hover {
  background: rgba(37, 99, 235, 0.95);
}
.lb-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.thumb:hover { transform: scale(1.05); }
.thumb.active { border-color: var(--accent); }
.lb-right { padding: 4px 8px; }
.lb-title { font-size: 1.25rem; margin: 0; font-weight: 800; }
.lb-desc { color: var(--text-muted); line-height: 1.45; font-size: 0.92rem; }
.lb-price { color: var(--accent); font-weight: 800; font-size: 1.2rem; margin: 8px 0; }
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1400;
  padding: 12px;
}
.modal.show { display: flex; }
.modal-card {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  border: 1px solid var(--border);
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s var(--ease-out), opacity 0.25s;
}
.modal.show .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.form-row { margin-bottom: 10px; display: flex; flex-direction: column; }
label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
input, select, textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.totals {
  background: var(--surface-2);
  padding: 12px;
  border-radius: 12px;
  margin-top: 8px;
  border: 1px solid var(--border);
}
.totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.9rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.confirm-card {
  padding: 16px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
  border: 1px solid #a7f3d0;
}
.note { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.note a { color: var(--accent); }

#uploadPreview { display: flex; align-items: center; gap: 10px; }
#uploadPreview img { border: 1px solid var(--border); border-radius: 8px; }
#uploadStatus.success {
  color: #065f46;
  background: #ecfdf5;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #a7f3d0;
}
#uploadStatus.error {
  color: #991b1b;
  background: #fef2f2;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #fecaca;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: navFadeIn 0.5s var(--ease-out) both;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: clamp(0.6rem, 2.2vw, 0.72rem);
  font-weight: 600;
  line-height: 1.1;
  transition: color 0.25s, background 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item i {
  font-size: clamp(1.2rem, 4.5vw, 1.45rem);
  line-height: 1;
}
.nav-item:hover { color: var(--accent); background: var(--accent-soft); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); }
.nav-item.active i { color: var(--accent); }

a { text-decoration: none; }

@media (min-width: 640px) {
  body { padding-bottom: calc(var(--nav-height) + 32px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    width: min(480px, calc(100% - 32px));
    max-width: 480px;
    transform: translateX(-50%);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 8px 10px;
    gap: 4px;
  }
  .nav-item { min-height: 56px; border-radius: 14px; font-size: 0.72rem; }
}

@media (min-width: 1024px) {
  .bottom-nav {
    width: min(560px, calc(100% - 48px));
    max-width: 560px;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
  }
  .product-grid { gap: 18px; }
}

@media (max-width: 980px) {
  .lb { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .product-grid .card { height: 240px; }
  .lb-main { height: 300px; }
}

  /* Floating bottom navigation (mobile & desktop) — unified with home.html styling */
  /* Bottom nav — floating pill shape with shadow and hidden-on-scroll behavior */
  .bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 12px;
    z-index: 999;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    width: min(calc(100% - 24px), 520px);
    max-width: 520px;
    transform: translateX(-50%);
    margin: 0 auto;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: navFadeIn 0.5s var(--ease-out) both;
    transition: transform 0.32s var(--ease-out), opacity 0.32s var(--ease-out), box-shadow 0.32s var(--ease-out);
    will-change: transform, opacity;
  }

  .bottom-nav.hidden {
    opacity: 0;
    transform: translate(-50%, 112%);
    pointer-events: none;
  }

  .bottom-nav-shadow {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.18), transparent);
    opacity: 0;
    transition: opacity 0.32s ease;
    z-index: 890;
  }

  .bottom-nav-shadow.visible { opacity: 1; }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 52px;
    padding: 8px 6px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: clamp(0.6rem, 2.2vw, 0.72rem);
    font-weight: 600;
    line-height: 1.1;
    transition: color 0.25s, background 0.25s, transform 0.25s;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-item i {
    font-size: clamp(1.2rem, 4.5vw, 1.45rem);
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.25s;
  }

/* Department index pages */
.dept-hero {
  text-align: center;
  padding: 24px 20px 8px;
  animation: fadeInUp 0.8s var(--ease-out) 0.15s both;
}
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  padding: 8px 20px 28px;
  max-width: 1200px;
  margin: 0 auto;
}
.dept-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    opacity 0.45s var(--ease-out),
    border-color 0.3s;
}
.dept-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.dept-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
}
.dept-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.55s var(--ease-out);
}
.dept-card:hover img {
  transform: scale(1.06);
}
.dept-card-body {
  padding: 16px;
}
.dept-card-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.dept-card-body p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 639px) {
  .menu-dropdown { width: min(72%, 240px); right: 12px; }
  main { padding-inline: 16px; }
  .attire-advert { margin-inline: 16px; }
  .site-header { padding: 10px 12px; gap: 10px; }
  .logo-text { display: none; }
  .logo-img { height: 32px; max-width: 36px; }
  .dept-grid { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .product-grid .card { opacity: 1; transform: none; }
}
