@keyframes coin-flip {
  0% { transform: rotateY(0deg); }
  25% { transform: rotateY(360deg); }
  100% { transform: rotateY(360deg); }
}

:root {
  --brand: #d6482b;
  --brand-dark: #a8351d;
  --brand-light: #ff6b45;
  --accent: #ffb800;
  --accent-dark: #e29c00;
  --bg: #f7f5f2;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #1a7f37;
  --danger: #c0362c;
  --display-font: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3,
.shop-logo, .topbar .brand,
.banner h1, .section-title, .carousel-name, .carousel-price,
.product-card .price, .price-now, .price-was,
.bundle-title, .bundle-info .price-now,
.store-showcase-title,
.login-card h1 {
  font-family: var(--display-font);
}

a { color: var(--brand); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand);
  color: #fff;
  padding: 14px 24px;
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .brand {
  perspective: 400px;
}

.topbar .brand img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 50%;
  animation: coin-flip 4s ease-in-out infinite;
}

.topbar nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.topbar nav a:hover { opacity: 1; text-decoration: underline; }

.topbar form { display: inline; margin-left: 18px; }

/* Phones: brand on its own row, then the menu as an even grid of tappable chips */
@media (max-width: 700px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .topbar .brand { justify-content: center; white-space: nowrap; }
  .topbar nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .topbar nav a {
    margin: 0;
    padding: 9px 4px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 1;
    background: rgba(255,255,255,0.14);
    border-radius: 8px;
    white-space: nowrap;
  }
  .topbar nav a:hover { background: rgba(255,255,255,0.24); text-decoration: none; }
  .topbar nav .badge { grid-column: span 2; margin: 0 !important; padding: 9px 6px; text-align: center; border-radius: 8px; font-size: 0.8rem; }
  .topbar nav form { margin: 0; display: block; }
  .topbar nav form button.link {
    width: 100%;
    padding: 9px 4px;
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 1;
    background: rgba(0,0,0,0.22);
    border-radius: 8px;
  }
}

.topbar button.link {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.9;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat .value { font-size: 1.8rem; font-weight: 700; }
.stat .label { color: var(--muted); font-size: 0.9rem; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th { color: var(--muted); font-weight: 600; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.login-card h1 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.login-card p.sub {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
  margin-top: 14px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

button, .btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(214, 72, 43, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover, .btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(214, 72, 43, 0.32);
}

button:active, .btn:active { transform: translateY(0); }

button.secondary,
a.btn.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
  font-weight: 600;
}

button.secondary:hover,
a.btn.secondary:hover {
  filter: none;
  border-color: var(--brand);
  box-shadow: none;
}

.error-msg {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f5c6c1;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
}

.success-msg {
  background: #eaf7ec;
  color: var(--success);
  border: 1px solid #c3e8c9;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #eef1f5;
  color: var(--muted);
}

.pos-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .pos-layout { grid-template-columns: 1fr; }
}

.product-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

.product-pick .meta { font-size: 0.85rem; color: var(--muted); }

.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--border);
}

.qty-input { width: 60px; }

/* ============ Public storefront (Abenson-style) ============ */

.shop-topbar {
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.82rem;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.shop-topbar span,
.shop-topbar a { display: inline-flex; align-items: center; gap: 6px; }
.shop-topbar-contact { gap: 14px; }
.shop-topbar-login { padding-left: 14px; border-left: 1px solid rgba(255,255,255,0.35); }
.shop-topbar svg { flex-shrink: 0; opacity: 0.9; }
.shop-topbar a { color: #fff; text-decoration: none; white-space: nowrap; font-weight: 600; }

/* Phones: two tidy centered lines — branches, then a tap-to-call number */
@media (max-width: 600px) {
  .shop-topbar { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 16px; text-align: center; }
  .shop-topbar-branches { font-size: 0.78rem; opacity: 0.85; letter-spacing: 0.02em; }
  .shop-topbar-phone { font-size: 0.95rem; }
}
.shop-topbar a:hover { opacity: 1; text-decoration: underline; }
.shop-topbar form { display: inline; margin: 0; }
.shop-topbar button.link { background: none; border: none; color: #fff; opacity: 0.9; cursor: pointer; font-size: 0.82rem; padding: 0; }

.shop-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.shop-logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  perspective: 400px;
}

.shop-logo img {
  height: 56px;
  width: 56px;
  object-fit: contain;
  animation: coin-flip 4s ease-in-out infinite;
}

.shop-search {
  flex: 1;
  min-width: 200px;
  display: flex;
}

.shop-search input {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.shop-search button {
  border-radius: 0 8px 8px 0;
  padding: 10px 16px;
  flex-shrink: 0;
  white-space: nowrap;
}

.shop-header-icons {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.shop-header-icons a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
}

.cart-count {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  margin-left: 4px;
}

.shop-nav {
  background: var(--brand);
  padding: 0 24px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.shop-nav a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
  font-size: 0.9rem;
  opacity: 0.95;
}

.shop-nav a:hover { background: var(--brand-dark); opacity: 1; }

.banner {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,178,42,0.35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.12), transparent 50%),
    linear-gradient(120deg, var(--brand-light), var(--brand) 55%, var(--brand-dark));
  color: #fff;
  padding: 56px 24px;
  text-align: center;
  overflow: hidden;
}

.banner h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.banner p { margin: 0; opacity: 0.95; font-size: 1.05rem; }

@media (max-width: 640px) {
  .banner { padding: 40px 20px; }
  .banner h1 { font-size: 1.6rem; }
  .banner p { font-size: 0.9rem; }
}

.store-showcase {
  position: relative;
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 24px;
}

.store-showcase img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.store-showcase-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  padding: 24px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
  color: #fff;
}

.store-showcase-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.store-showcase-text { font-size: 0.9rem; opacity: 0.95; max-width: 600px; }

.store-showcase-dots {
  position: absolute;
  top: 16px;
  right: 40px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.store-showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
}
.store-showcase-dot.active { background: #fff; width: 22px; border-radius: 4px; }

@media (max-width: 640px) {
  .store-showcase img { max-height: 280px; }
  .store-showcase-caption { padding: 14px; }
  .store-showcase-title { font-size: 1.05rem; }
  .store-showcase-text { font-size: 0.8rem; }
}

.quick-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.quick-cat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 8px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-cat .name { font-size: 0.85rem; font-weight: 700; }
.quick-cat:hover {
  border-color: var(--brand-light);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(214, 72, 43, 0.14);
}

.cat-icon-badge {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  overflow: hidden;
}

.cat-icon-photo {
  background: linear-gradient(145deg, #fff3ea, var(--bg));
  border: 1px solid #ffe3cc;
}

.cat-icon-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  transition: transform 0.25s ease;
}

.quick-cat:hover .cat-icon-photo img {
  transform: scale(1.15);
}

.section-title {
  max-width: 1100px;
  margin: 32px auto 12px;
  padding: 0 24px;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-title span {
  position: relative;
  padding-left: 14px;
}

.section-title span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}

.section-title a { font-size: 0.85rem; font-weight: 600; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  border-color: var(--brand-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(31, 36, 48, 0.1);
}

.product-card .thumb {
  font-size: 2.6rem;
  text-align: center;
  padding: 12px 0;
  background: var(--bg);
  border-radius: 10px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-thumb {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg);
  font-size: 1.3rem;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card .name { font-size: 0.92rem; font-weight: 600; min-height: 2.4em; }
.product-card .price { color: var(--brand); font-weight: 700; }
.product-card .stock { font-size: 0.78rem; color: var(--muted); }

.featured-carousel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
}

.carousel-slide {
  min-width: 50%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  border-right: 1px solid var(--border);
}

.carousel-slide:last-child { border-right: none; }

.carousel-thumb {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
  font-size: 5rem;
}

.carousel-thumb img { width: 100%; height: 100%; object-fit: contain; }

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

.carousel-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd23f, var(--accent));
  color: #1a1a1a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(255, 184, 0, 0.35);
}

.carousel-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.carousel-price { font-size: 1.7rem; font-weight: 800; color: var(--brand); margin-bottom: 6px; }
.carousel-stock { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.carousel-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(214, 72, 43, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.carousel-slide:hover .carousel-cta {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(214, 72, 43, 0.32);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  z-index: 2;
}
.carousel-nav:hover { background: var(--brand); color: #fff; }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
}
.carousel-dot.active { background: var(--brand); width: 22px; border-radius: 4px; }

@media (max-width: 640px) {
  .carousel-slide { min-width: 100%; flex-direction: column; text-align: center; padding: 20px; border-right: none; }
  .carousel-thumb { width: 160px; height: 160px; }
}

.trending-tags {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trending-tags a {
  background: #eef1f5;
  color: var(--text);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.trending-tags a:hover {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  transform: translateY(-1px);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 24px;
}

@media (max-width: 800px) {
  .product-detail { grid-template-columns: 1fr; }
}

.product-detail .thumb-large {
  font-size: 7rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 60px 0;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-detail .thumb-large img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery {
  display: flex;
  gap: 12px;
}

.thumb-strip-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-thumb-v {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  flex-shrink: 0;
}

.gallery-thumb-v.active { border-color: var(--brand); }

.gallery-thumb-v img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-image-wrap {
  position: relative;
  flex: 1;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 7rem;
}

.main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  z-index: 2;
}

.main-nav-prev, .main-nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.main-nav-prev:hover, .main-nav-next:hover { background: var(--brand); color: #fff; }
.main-nav-prev { left: 12px; }
.main-nav-next { right: 12px; }

.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.price-now {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand);
}

.price-was {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: line-through;
}

.discount-badge {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(214, 72, 43, 0.3);
}

.buy-now-btn {
  background: linear-gradient(135deg, #ffd23f, var(--accent));
  color: #1a1a1a;
  box-shadow: 0 3px 10px rgba(255, 184, 0, 0.35);
}

.buy-now-btn:hover { box-shadow: 0 5px 14px rgba(255, 184, 0, 0.45); }

.brand-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 24px 20px;
  max-width: 1100px;
  margin: 0 auto;
  scroll-snap-type: x proximity;
}

.brand-tile {
  flex: 0 0 130px;
  height: 90px;
  scroll-snap-align: start;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.brand-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-tile-fallback {
  font-family: var(--display-font);
  font-weight: 700;
  color: var(--text);
}

.brand-tile:hover {
  transform: translateY(-4px);
  border-color: var(--brand-light);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

@media (max-width: 640px) {
  .brand-row { padding: 4px 16px 16px; }
  .brand-tile { flex-basis: 100px; height: 70px; padding: 10px 12px; }
}

.bundle-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 24px 20px;
  max-width: 1100px;
  margin: 0 auto;
  scroll-snap-type: x proximity;
}

.bundle-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bundle-card:hover {
  border-color: var(--brand-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(31, 36, 48, 0.1);
}

.bundle-thumb {
  position: relative;
  width: 100%;
  height: 140px;
  background: #f3f4f6;
}
.bundle-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bundle-sale {
  position: absolute;
  top: 8px;
  left: 8px;
}

.bundle-info { padding: 12px; }
.bundle-title { font-weight: 600; font-size: 0.92rem; margin-bottom: 2px; }
.bundle-desc { font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; line-height: 1.35; }
.bundle-info .price-row { gap: 6px; }
.bundle-info .price-now { font-size: 1rem; }
.bundle-info .price-was { font-size: 0.78rem; }

@media (max-width: 640px) {
  .bundle-row { padding: 4px 16px 16px; }
  .bundle-card { flex-basis: 170px; }
  .bundle-thumb { height: 110px; }
}

.features-box {
  display: flex;
  gap: 32px;
  max-width: 1100px;
  margin: 24px auto;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.features-label {
  font-weight: 700;
  min-width: 100px;
  flex-shrink: 0;
  color: var(--text);
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  color: var(--text);
  flex: 1;
}

.highlight-item strong { color: var(--muted); font-weight: 600; }

@media (max-width: 600px) {
  .highlights-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .features-box { flex-direction: column; gap: 10px; margin-left: 24px; margin-right: 24px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.breadcrumb {
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 0 24px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }

.shop-footer {
  background: #1f2430;
  color: #cbd2df;
  margin-top: 40px;
  padding: 32px 24px 20px;
}

.shop-footer .footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.shop-footer h4 {
  color: #fff;
  font-size: 0.9rem;
  margin: 0 0 12px;
}

.shop-footer a {
  color: #cbd2df;
  text-decoration: none;
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.shop-footer a:hover { color: #fff; }

.shop-footer .footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem;
  color: #8b93a7;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-body { min-height: 60vh; }

.social-float {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-float-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.social-float-btn svg { width: 32px; height: 32px; }
.social-float-btn:hover { transform: scale(1.1); }

.social-float-btn.fb { background: #1877f2; }
.social-float-btn.ig { background: radial-gradient(circle at 30% 110%, #fdf497, #fd5949 30%, #d6249f 60%, #285AEB 90%); }
.social-float-btn.tiktok { background: #000; }
.social-float-btn.messenger { background: linear-gradient(135deg, #00c6ff, #0078ff 50%, #7000ff); }

@media (max-width: 640px) {
  .social-float {
    right: 10px;
    bottom: 70px;
    gap: 10px;
  }
  .social-float-btn {
    width: 54px;
    height: 54px;
  }
  .social-float-btn svg {
    width: 27px;
    height: 27px;
  }
}

.category-video-wrap {
  max-width: 1100px;
  margin: 0 auto 20px;
  padding: 0 24px;
}

.category-video {
  width: 100%;
  max-height: 480px;
  border-radius: 12px;
  background: #000;
  display: block;
}

.video-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.video-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
}
.video-dot.active { background: var(--brand); width: 22px; border-radius: 4px; }

.cart-item-row {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .cart-item-row { grid-template-columns: 1fr; }
}

/* ============ Trend charts (dashboard) ============ */

.trend-chart-wrap {
  position: relative;
  width: 100%;
}

.trend-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  outline: none;
}

.trend-chart-svg:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 2px;
  border-radius: 6px;
}

.trend-chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}

.trend-chart-tick {
  font-size: 10px;
  fill: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.trend-chart-end-label {
  font-size: 11px;
  font-weight: 700;
  fill: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.trend-chart-crosshair {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.trend-chart-hover-dot {
  stroke: var(--card);
  stroke-width: 2;
  pointer-events: none;
}

.trend-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--text);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.trend-chart-tooltip-value {
  font-weight: 700;
  font-size: 0.88rem;
}

.trend-chart-tooltip-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
}

/* ============ Bundles: cards, listing page, popup ============ */

.bundle-card { cursor: pointer; }
.bundle-card:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }

.bundle-count { font-size: 0.74rem; color: var(--muted); margin-bottom: 6px; }

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 24px;
}
.bundle-grid .bundle-card { flex: none; }

.bundle-filters {
  max-width: 1100px;
  margin: 0 auto 16px;
  padding: 0 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.bundle-filters input[type="text"] { flex: 1; min-width: 200px; width: auto; }
.bundle-filters select { width: auto; }
.bundle-filters-clear { font-size: 0.85rem; }

/* Admin: product picker for a bundle */
.bundle-picker { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.bundle-picker-search { margin-bottom: 8px; }
.bundle-picker-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.bundle-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}
.bundle-picker-row[hidden] { display: none; }
.bundle-picker-row:last-child { border-bottom: none; }
.bundle-picker-row:hover { background: var(--bg); }
.bundle-picker-row input { width: auto; flex: none; }
.bundle-picker-name { flex: 1; min-width: 0; }
.bundle-picker-price { color: var(--muted); white-space: nowrap; }
.bundle-picker-summary { margin-top: 8px; font-size: 0.85rem; font-weight: 600; }

/* Bundle popup */
.bundle-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(20, 16, 12, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.bundle-modal-overlay.open { opacity: 1; pointer-events: auto; background: rgba(20, 16, 12, 0.55); }

.bundle-modal {
  position: relative;
  width: 100%;
  max-width: 1040px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(20, 16, 12, 0.35);
  overflow: hidden;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.bundle-modal-overlay.open .bundle-modal { transform: scale(1) translateY(0); opacity: 1; }

.bundle-modal-scroll {
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bundle-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.bundle-modal-close:hover { background: var(--brand); color: #fff; filter: none; }

/* Top: the uploaded bundle pictures, large and centered; several slide automatically */
.bundle-modal-media {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  touch-action: pan-y;
}
.bundle-slides {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.bundle-slides.dragging { transition: none; }
.bundle-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Soft blurred copy of each picture fills any empty bands beside it */
.bundle-slide::before {
  content: "";
  position: absolute;
  inset: -30px;
  background-image: var(--media-bg);
  background-size: cover;
  background-position: center;
  filter: blur(36px) saturate(1.05);
  opacity: 0.4;
}
.bundle-slide img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: 64vh;
  min-height: 240px;
  margin: 0 auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}
.bundle-slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  padding: 0;
  margin-top: -21px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.15s ease, color 0.15s ease;
}
.bundle-slider-arrow--prev { left: 14px; }
.bundle-slider-arrow--next { right: 14px; }
.bundle-modal-media:hover .bundle-slider-arrow,
.bundle-slider-arrow:focus-visible { opacity: 1; }
.bundle-slider-arrow:hover { background: var(--brand); color: #fff; filter: none; }
.bundle-slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.bundle-slider-dot {
  pointer-events: auto;
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.3);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.7);
  transition: width 0.25s ease, background 0.2s ease;
}
.bundle-slider-dot:hover { filter: none; background: rgba(0,0,0,0.5); }
.bundle-slider-dot.active { width: 26px; background: var(--brand); }
.bundle-modal-badge { z-index: 2; position: absolute; top: 16px; left: 16px; font-size: 1rem; padding: 5px 14px; }

/* Bottom: Products (left) | Bundle (right) */
.bundle-modal-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  padding: 26px 30px 30px;
}
.bundle-modal-body--single { grid-template-columns: 1fr; }

.bundle-modal-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.bundle-modal-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.bundle-modal-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.bundle-modal-item:hover { border-color: var(--brand-light); background: var(--bg); }
.bundle-modal-item-thumb {
  width: 60px;
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
  font-size: 1.6rem;
}
.bundle-modal-item-thumb img { width: 100%; height: 100%; object-fit: contain; }
.bundle-modal-item-name { flex: 1; min-width: 0; font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.bundle-modal-item-price { font-size: 0.88rem; color: var(--muted); white-space: nowrap; }

.bundle-modal-info { align-self: start; position: sticky; top: 8px; }
.bundle-modal-title { font-size: 1.7rem; line-height: 1.15; margin: 0 0 8px; }
.bundle-modal-desc { color: var(--muted); margin: 0 0 16px; font-size: 0.98rem; line-height: 1.5; }

.bundle-modal-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.bundle-modal-price-now { font-family: var(--display-font); font-size: 2.3rem; line-height: 1.1; font-weight: 800; color: var(--brand); }
.bundle-modal-price-was { color: var(--muted); text-decoration: line-through; font-size: 1.05rem; overflow-wrap: anywhere; }

.bundle-modal-save {
  display: inline-block;
  background: #eaf7ec;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.bundle-modal-cta { display: flex; align-items: center; justify-content: center; width: 100%; padding: 16px 20px; font-size: 1.05rem; }

@media (max-width: 760px) {
  .bundle-modal-overlay { padding: 8px; align-items: flex-end; }
  .bundle-modal { border-radius: 20px; }
  .bundle-modal-scroll { max-height: 94vh; }
  .bundle-slide img { max-height: 46vh; min-height: 200px; }
  .bundle-slider-arrow { opacity: 1; width: 36px; height: 36px; margin-top: -18px; font-size: 1.3rem; }
  .bundle-slider-arrow--prev { left: 8px; }
  .bundle-slider-arrow--next { right: 8px; }
  .bundle-modal-body { grid-template-columns: 1fr; gap: 22px; padding: 18px 16px 22px; }
  /* Price and the order button come first on a phone, products below */
  .bundle-modal-info { order: -1; position: static; }
  .bundle-modal-title { font-size: 1.35rem; padding-right: 8px; }
  .bundle-modal-price-now { font-size: 1.9rem; }
  .bundle-modal-item-thumb { width: 52px; height: 52px; }
  .bundle-modal-close { top: 10px; right: 10px; }
  .bundle-grid { padding: 0 16px 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .bundle-filters { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .bundle-modal { transition: opacity 0.15s ease; transform: none; }
}

/* ============ Confirm-delete modal ============ */

body.confirm-modal-lock { overflow: hidden; }

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.confirm-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(20, 16, 12, 0.5);
}

.confirm-modal {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: 20px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(20, 16, 12, 0.28);
  transform: scale(0.85) translateY(14px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.confirm-modal-overlay.open .confirm-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.confirm-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f87171, var(--danger));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(192, 54, 44, 0.35);
  animation: confirm-icon-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
}

.confirm-modal-title {
  font-family: var(--display-font);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-modal-msg {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 22px;
}

.confirm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-modal-actions .btn {
  flex: 1;
  padding: 11px 0;
}

.confirm-modal-delete {
  background: linear-gradient(135deg, #f87171, var(--danger));
  box-shadow: 0 3px 10px rgba(192, 54, 44, 0.3);
}

.confirm-modal-delete:hover {
  box-shadow: 0 5px 14px rgba(192, 54, 44, 0.4);
}

@keyframes confirm-icon-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .confirm-modal, .confirm-modal-icon { animation: none; transition: opacity 0.15s ease; transform: none; }
}

/* Admin: bundle photo uploader */
.bundle-photo-hint { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.bundle-photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.bundle-photo-tile {
  position: relative;
  display: block;
  width: 110px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
}
.bundle-photo-tile img { display: block; width: 100%; height: 84px; object-fit: cover; }
.bundle-photo-cover {
  position: absolute; top: 5px; left: 5px;
  background: var(--brand); color: #fff; font-size: 0.65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
}
.bundle-photo-remove { display: flex; align-items: center; gap: 5px; padding: 5px 8px; font-size: 0.78rem; color: #b91c1c; }
.bundle-photo-remove input { width: auto; margin: 0; }


/* Dashboard quick actions: side by side on desktop, stacked full-width on phones */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) {
  .quick-actions { flex-direction: column; }
  .quick-actions .btn { display: block; width: 100%; text-align: center; }
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}
.field-hint { color: var(--muted); font-weight: 400; font-size: 0.8rem; }

/* Text-style buttons (Delete / Remove in admin tables): plain link look, not the gradient pill */
button.link {
  background: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand);
}
button.link:hover { background: none; box-shadow: none; transform: none; text-decoration: underline; filter: none; }

/* Admin: branch stock overview */
.table-scroll { overflow-x: auto; }
.stock-detail-row td { padding-top: 0; border-bottom: 1px solid var(--border); }
.stock-details summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; padding: 4px 0 8px; }
.stock-details summary:hover { color: var(--brand); }
.stock-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.stock-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.stock-list li:last-child { border-bottom: 0; }
.stock-list a { text-decoration: none; color: var(--text); }
.stock-list a:hover { color: var(--brand); text-decoration: underline; }
.stock-qty { white-space: nowrap; font-weight: 600; color: var(--success); }
.stock-qty--out { color: var(--muted); font-weight: 400; }

/* Search bar at the top of each category page */
.category-search { max-width: 1100px; margin: 0 auto 18px; padding: 0 24px; }
.category-search input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}
.category-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(214, 72, 43, 0.15); }
.product-card[hidden] { display: none; }
.category-search-empty { max-width: 1100px; margin: 0 auto; padding: 0 24px; color: var(--muted); }
@media (max-width: 600px) {
  .category-search { padding: 0 16px; }
}

/* Phones with many categories (more than 6 menu links): one swipeable row instead of a tall stack */
@media (max-width: 700px) {
  .shop-nav:has(a:nth-child(7)) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .shop-nav:has(a:nth-child(7))::-webkit-scrollbar { display: none; }
  .shop-nav:has(a:nth-child(7)) a { flex-shrink: 0; white-space: nowrap; }
}

/* Product photos: swipe sideways to change photo, while up/down still scrolls the page */
.main-image-wrap { touch-action: pan-y; }
/* The popup handles every gesture itself (pinch / double-tap zoom, drag, swipe) */
.lightbox { touch-action: none; overscroll-behavior: contain; }
.lightbox img { transform-origin: center center; will-change: transform; }
.lightbox-hint { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; color: rgba(255,255,255,0.75); font-size: 0.85rem; pointer-events: none; display: none; }
@media (pointer: coarse) { .lightbox-hint { display: block; } }
.main-image-wrap img, .lightbox img { user-select: none; -webkit-user-drag: none; }

/* Home banner: the headline changes every 2 seconds, sliding up and fading */
.banner-messages { display: grid; }
.banner-message {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 0.8, 0.3, 1);
  pointer-events: none;
}
.banner-message.active { opacity: 1; transform: none; pointer-events: auto; }
.banner-message.leaving { opacity: 0; transform: translateY(-26px) scale(0.98); }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; }
.banner-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.45); transition: width 0.3s ease, background 0.3s ease; }
.banner-dot.active { width: 24px; background: #fff; }
/* "Reduce motion" devices: the words still change, with a plain fade and no sliding */
@media (prefers-reduced-motion: reduce) {
  .banner-message, .banner-message.leaving { transform: none; transition: opacity 0.3s ease; }
  .banner-dot { transition: none; }
}
