/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg-grad-start: #ffffff;
  --bg-grad-end:   #faf7ff;
  --text:          #1f2937;
  --muted:         #6b7280;

  --brand:         #667eea;
  --brand-dark:    #596de0;
  --brand-light:   #eef2ff;
  --brand-accent:  #a78bfa;

  --surface:       #ffffff;
  --surface-2:     #f6f7fb;
  --danger:        #e11d48;
  --success:       #16a34a;
  --warning:       #d97706;

  --radius:        16px;
  --radius-sm:     8px;
  --shadow:        0 12px 30px rgba(0,0,0,.08);
  --shadow-lg:     0 20px 48px rgba(0,0,0,.14);
  --container:     1200px;
  --nav-height:    64px;
  --nav-height-lg: 80px;
  --trans:         0.22s ease;

  --nav-icon-size: clamp(44px, 9vw, 52px);
  --nav-icon-gap:  clamp(10px, 3vw, 14px);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-grad-start) 0%, var(--bg-grad-end) 100%);
  line-height: 1.6;
}
img { max-width: 100%; display: block; height: auto; }
a   { color: inherit; text-decoration: none; }

/* ─── Utilities ─────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 24px);
}
section { padding-block: clamp(60px, 8vw, 100px); }
.grid   { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.bg-white     { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }
.mb-8 { margin-bottom: 8px; }
.muted { color: var(--muted); }
.brand-text { color: var(--brand); }
.subtitle   { font-size: 1.125rem; color: var(--muted); margin-bottom: 24px; }
.section-sub { text-align: center; color: var(--muted); margin: -20px 0 36px; font-size: 1.05rem; }

.section-title {
  font-size: clamp(28px, 4.5vw, 46px);
  text-align: center; margin: 0 0 28px;
  color: #0f172a; font-weight: 800;
}

/* ─── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff;
  padding: 8px 12px; border-radius: 8px; z-index: 9999;
}
.skip-link:focus { left: 8px; }

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed; inset-inline: 0; top: 0;
  z-index: 50; height: var(--nav-height);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid #e0e7ff;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 100%; padding: 8px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 32px; height: 32px; border-radius: 50%; }
.brand .logo {
  font-weight: 800; font-size: 16px;
  letter-spacing: -0.02em; color: var(--brand-dark); white-space: nowrap;
}
.nav-toggle {
  inline-size: 44px; block-size: 44px;
  display: grid; place-items: center;
  border: none; background: var(--brand-light);
  border-radius: 50%; cursor: pointer; transition: var(--trans);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--brand); border-radius: 1px; transition: var(--trans);
}
.nav-toggle span + span { margin-top: 5px; }
.nav-menu {
  position: fixed; inset: var(--nav-height) 0 auto 0;
  display: none; flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid #eee; box-shadow: var(--shadow);
  z-index: 49;
}
.nav-menu a {
  padding: 14px 16px; text-align: center;
  font-weight: 600; color: #334155;
  transition: background var(--trans), color var(--trans);
}
.nav-menu a.active, .nav-menu a:hover {
  background: var(--brand-light); color: var(--brand-dark);
}
.nav-menu.show { display: flex; }
.nav-social {
  display: flex; gap: var(--nav-icon-gap);
  align-items: center; justify-content: center; padding: 16px 0;
}
.nav-social .social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--nav-icon-size); height: var(--nav-icon-size);
  border-radius: 999px; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), inset 0 0 0 1px rgba(0,0,0,.05);
  transition: transform var(--trans), box-shadow var(--trans); color: #111;
}
.nav-social .social-link:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.nav-social .social-link svg { width: calc(var(--nav-icon-size) * .56); height: calc(var(--nav-icon-size) * .56); }
.nav-social .instagram {
  background: radial-gradient(120% 120% at 30% 30%,
    #feda77 0%, #f58529 25%, #dd2a7b 55%, #8134af 75%, #515bd4 100%);
  color: #fff;
}
.nav-social .facebook { background: #1877f2; color: #fff; }

@media (min-width: 1024px) {
  html { scroll-padding-top: var(--nav-height-lg); }
  .navbar { height: var(--nav-height-lg); }
  .nav-inner { padding: 8px 24px; }
  .brand img  { width: 40px; height: 40px; }
  .brand .logo { font-size: 20px; }
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important; position: static;
    flex-direction: row; background: transparent;
    border: 0; box-shadow: none; align-items: center; z-index: auto;
  }
  .nav-menu a { padding: 8px 12px; border-radius: 10px; }
  :root { --nav-icon-size: 36px; --nav-icon-gap: 10px; }
  .nav-social { padding: 0 0 0 12px; margin-left: 12px; border-left: 1px solid rgba(118,75,162,.15); }
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  color: #fff; position: relative;
  background: url('domasna_apteka/back_photo_index.jpg') center / cover no-repeat;
  padding-top: var(--nav-height);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,.3) 60%, rgba(0,0,0,.5) 100%);
  z-index: 1; pointer-events: none;
}
.hero > .container, .hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  font-size: clamp(.8rem, 2vw, 1rem);
  font-weight: 600; letter-spacing: .08em;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3);
  padding: .4rem 1rem; border-radius: 999px;
  display: inline-block; margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(40px, 9vw, 80px);
  margin: 0 0 16px; font-weight: 900;
  text-shadow: 0 4px 20px rgba(0,0,0,.5);
  line-height: 1.05;
}
.hero-sub {
  font-size: clamp(16px, 2.5vw, 22px);
  margin: 0 0 32px; opacity: .92; font-weight: 400;
  max-width: 600px; margin-inline: auto;
}
.hero-btns {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 3rem;
}
.hero-stats {
  display: flex; gap: clamp(24px, 5vw, 64px);
  justify-content: center;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 1rem 2rem;
  width: fit-content;
  margin-inline: auto;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.4rem; font-weight: 800; }
.hero-stat span   { font-size: .8rem; opacity: .8; }

/* Crossfade layers */
.hero-layer {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.5s ease;
  pointer-events: none;
}
.hero-layer--in { opacity: 1; }

/* Buttons */
.btn, .btn--primary, .btn--ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 14px 28px; border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  transition: transform var(--trans), box-shadow var(--trans), opacity var(--trans);
  white-space: nowrap; cursor: pointer; border: none;
}
.btn--primary, .btn {
  background: linear-gradient(45deg, var(--brand-accent), var(--brand));
  color: #fff;
  box-shadow: 0 8px 20px rgba(102,126,234,.4);
}
.btn--primary:hover, .btn:hover {
  transform: translateY(-2px); box-shadow: 0 12px 28px rgba(102,126,234,.5);
}
.btn--ghost {
  background: rgba(255,255,255,.15);
  color: #fff; border: 2px solid rgba(255,255,255,.5);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255,255,255,.25); transform: translateY(-2px); }

/* ─── About ─────────────────────────────────────────────────── */
.about { display: grid; gap: 40px; }
.about-text p { color: var(--muted); font-size: clamp(15px, 1.8vw, 18px); margin-bottom: 12px; }
.about-text p strong { color: var(--text); }
.about-badges {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.about-badge {
  background: var(--brand-light); color: var(--brand-dark);
  border: 1px solid rgba(102,126,234,.2);
  border-radius: 999px; padding: .35rem .85rem;
  font-size: .85rem; font-weight: 600;
}
.about-img {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); position: relative;
}
.about-img img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }
.about-img figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
  color: #fff; padding: 1.5rem 1rem .9rem;
  font-weight: 600; font-size: .95rem;
}
@media (min-width: 900px) {
  .about { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 64px; }
  .about-img img { min-height: 440px; }
}

/* ─── Category tabs ──────────────────────────────────────────── */
.category-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.cat-tab {
  padding: .45rem 1.1rem; border-radius: 999px;
  border: 2px solid #d1d5db; background: var(--surface);
  color: var(--muted); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all var(--trans);
}
.cat-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.cat-tab--active {
  background: var(--brand); border-color: var(--brand);
  color: #fff;
}

/* ─── Products toolbar ───────────────────────────────────────── */
.products-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; margin-bottom: 28px;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap input {
  width: 100%; padding: 11px 16px 11px 42px;
  border: 2px solid #e5e7eb; border-radius: 12px;
  font-size: .95rem; background: var(--surface);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.search-wrap input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}
.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.filter-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-group select {
  padding: 10px 14px; border: 2px solid #e5e7eb;
  border-radius: 12px; font-size: .9rem;
  background: var(--surface); cursor: pointer;
  transition: border-color var(--trans);
}
.filter-group select:focus { outline: none; border-color: var(--brand); }
.stock-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: .9rem; color: var(--muted); cursor: pointer; user-select: none;
}
.stock-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* ─── Skeleton ───────────────────────────────────────────────── */
@keyframes skel-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.skel {
  border-radius: 8px;
  background: linear-gradient(90deg, #e8e8e8 0%, #f5f5f5 50%, #e8e8e8 100%);
  animation: skel-pulse 1.4s ease-in-out infinite;
}
.skel-img   { width: 100%; aspect-ratio: 16/10; border-radius: 0; }
.skel-title { height: 22px; width: 70%; margin-bottom: 10px; }
.skel-line  { height: 14px; width: 90%; margin-bottom: 8px; }
.skel-line--short { width: 50%; }
.skel-btn   { height: 38px; width: 120px; margin-top: 12px; }
.card--skel { pointer-events: none; }

/* ─── Product cards ──────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; position: relative;
  transition: box-shadow var(--trans), transform var(--trans);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card .media {
  aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2);
  position: relative;
}
.card .media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s cubic-bezier(.25,.1,.3,1);
}
.card:hover .media img { transform: scale(1.08); }

/* Fallback for broken images */
.card .media.img-failed {
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-light);
}
.card .media.img-failed::after {
  content: '🍾';
  font-size: 3.5rem;
  display: block;
}

.card .body {
  padding: 20px; display: flex; flex-direction: column;
  gap: 8px; flex-grow: 1;
}
.card h3 { font-size: 1.2rem; color: var(--brand-dark); margin: 0; font-weight: 700; }
.price { font-weight: 800; color: var(--danger); font-size: 1.3rem; }
.price small { color: #94a3b8; font-weight: 600; font-size: .75em; }

.badge {
  position: absolute; top: 12px; right: 12px;
  background: #ef4444; color: #fff;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
}
.badge--new  { background: var(--success); }
.badge--sale { background: #f59e0b; }
.badge--out  { background: #6b7280; }

.stock-warn { color: var(--warning); font-size: .82rem; margin: 0; }
.stock-warn--urgent { color: var(--danger); font-weight: 700; }

/* Stock progress bar */
.stock-bar {
  height: 5px; background: #e5e7eb; border-radius: 3px;
}
.stock-bar__fill {
  height: 100%; border-radius: 3px;
  transition: width 0.6s ease;
}
.stock-bar__fill--med { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.stock-bar__fill--low { background: linear-gradient(90deg, var(--danger), #f87171); }

/* Card actions */
.card-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; flex-wrap: wrap;
}
.qty-control { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 30px; height: 30px;
  border: 1.5px solid #d1d5db; background: #fff;
  border-radius: 50%; font-size: 1rem; cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--trans), border-color var(--trans);
}
.qty-btn:hover:not(:disabled) { background: #f3f4f6; border-color: var(--brand); }
.qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-display { min-width: 22px; text-align: center; font-weight: 700; font-size: .95rem; }
.btn-add {
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .85rem; font-weight: 600;
  transition: opacity var(--trans), transform var(--trans);
}
.btn-add:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-add--disabled { opacity: .45; cursor: not-allowed; background: #9ca3af; }

.no-results {
  grid-column: 1 / -1; text-align: center;
  color: var(--muted); padding: 3rem 0; font-size: 1.05rem;
}
.load-error { grid-column: 1 / -1; text-align: center; padding: 3rem 0; }
.btn-retry {
  margin-top: .75rem; padding: .5rem 1.2rem;
  background: var(--brand); color: #fff; border: none;
  border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem;
  transition: opacity var(--trans);
}
.btn-retry:hover { opacity: .85; }

/* ─── Services ───────────────────────────────────────────────── */
.services-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.service {
  background: var(--surface); color: var(--text);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
  border: 1px solid rgba(102,126,234,.12); box-shadow: var(--shadow);
  transition: transform var(--trans), box-shadow var(--trans);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon { font-size: 2.2rem; margin-bottom: 12px; }
.service h3 { color: var(--brand-dark); margin: 0 0 8px; font-size: 1.1rem; }
.service p  { color: var(--muted); font-size: .9rem; margin: 0; }

/* ─── Gallery ───────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin: 0; position: relative;
}
.gallery-item--tall { grid-row: span 2; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  min-height: 200px; display: block;
  transition: transform 0.5s cubic-bezier(.25,.1,.3,1);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: #fff; padding: 1.5rem .9rem .8rem;
  font-weight: 700; font-size: .9rem;
  opacity: 0; transition: opacity var(--trans);
}
.gallery-item:hover figcaption { opacity: 1; }
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: 1.2fr 0.9fr 0.9fr; }
  .gallery-item img { min-height: 240px; }
}
.gallery-cta { margin-top: 28px; text-align: center; }
.btn-instagram {
  display: inline-flex; align-items: center; gap: 10px;
  padding: .75rem 1.5rem; border-radius: 999px;
  background: radial-gradient(120% 120% at 30% 30%,
    #feda77 0%, #f58529 25%, #dd2a7b 55%, #8134af 75%, #515bd4 100%);
  color: #fff; font-weight: 700; font-size: .95rem;
  box-shadow: 0 6px 20px rgba(221,42,123,.3);
  transition: transform var(--trans), box-shadow var(--trans);
}
.btn-instagram:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(221,42,123,.4); }

/* ─── Contact info ───────────────────────────────────────────── */
.contact-quick { display: grid; gap: 16px; }
.contact-item {
  display: flex; gap: 16px; align-items: center;
  background: var(--surface); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06); border: 1px solid #f3f4f6;
}
.contact-item .ico { font-size: 22px; }
.contact-item h4 { margin: 0; font-weight: 700; color: var(--brand-dark); font-size: .95rem; }
.contact-item p  { margin: 0; color: var(--muted); font-size: .9rem; }
.contact-item a  { color: var(--brand); font-weight: 600; text-decoration: underline; }

/* ─── Testimonials ───────────────────────────────────────────── */
#testimonials { background: var(--surface); }

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

.testi-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--trans), box-shadow var(--trans);
}
.testi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.testi-quote {
  font-size: 3.5rem;
  line-height: 1;
  color: var(--brand-accent);
  font-family: Georgia, serif;
  margin-bottom: -.5rem;
}

.testi-text {
  color: var(--text);
  font-size: .95rem;
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.testi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .25rem;
  flex-wrap: wrap;
}

.testi-stars {
  color: #f59e0b;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.testi-author {
  display: flex;
  flex-direction: column;
  text-align: right;
}
.testi-author strong {
  font-size: .9rem;
  color: var(--brand-dark);
}
.testi-author span {
  font-size: .78rem;
  color: var(--muted);
}

.testi-product {
  display: inline-block;
  align-self: flex-start;
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 1px solid rgba(102,126,234,.2);
  border-radius: 999px;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Order form + map ──────────────────────────────────────── */
.contact-wrap { display: grid; gap: 48px; }
form { display: grid; gap: 14px; }
.form-group-grid { display: grid; gap: 14px; }
@media (min-width: 600px) { .form-group-grid { grid-template-columns: 1fr 1fr; } }

input, textarea, button { font: inherit; }
input, textarea {
  width: 100%; padding: 13px 16px;
  border: 2px solid #e5e7eb; border-radius: 12px;
  transition: border-color var(--trans), box-shadow var(--trans);
  background: var(--surface);
}
input:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(102,126,234,.15);
}
textarea { min-height: 120px; resize: vertical; }

form label {
  display: block; font-size: .85rem;
  font-weight: 600; color: var(--muted); margin-bottom: 4px;
}
input.field--invalid { border-color: var(--danger); }
input.field--invalid:focus { box-shadow: 0 0 0 4px rgba(225,29,72,.12); }
input.field--valid { border-color: var(--success); }
.field-hint {
  display: block; font-size: .8rem; color: var(--danger); margin-top: -4px;
}
.field-hint[hidden] { display: none; }

button[type="submit"] {
  background: linear-gradient(45deg, var(--brand-accent), var(--brand));
  color: #fff; padding: 15px 24px;
  border: none; border-radius: 12px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 15px rgba(102,126,234,.4);
  transition: opacity var(--trans), transform var(--trans);
}
button[type="submit"]:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
button[type="submit"]:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.alert { padding: 14px 16px; border-radius: 12px; font-weight: 600; margin-bottom: 4px; }
.alert[hidden] { display: none; }
.alert.ok  { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.err { background: #fee2e2; color: #7f1d1d; border: 1px solid #fecaca; }

/* Order confirmation */
.order-confirm[hidden] { display: none; }
.confirm-card {
  background: var(--surface); border-radius: var(--radius);
  border: 2px solid #a7f3d0; padding: 2rem;
  box-shadow: var(--shadow);
}
.confirm-icon { font-size: 3rem; text-align: center; margin-bottom: .75rem; }
.confirm-card h3 { text-align: center; font-size: 1.4rem; color: var(--success); margin: 0 0 .5rem; }
.confirm-card > p { text-align: center; color: var(--muted); margin-bottom: 1.25rem; }
.confirm-items {
  border-top: 1px solid #e5e7eb; padding-top: 1rem;
  display: grid; gap: .5rem; margin-bottom: 1.25rem;
}
.confirm-row {
  display: flex; justify-content: space-between;
  font-size: .9rem; color: var(--muted);
}
.confirm-row small { opacity: .7; }
.confirm-total {
  display: flex; justify-content: space-between;
  border-top: 1px solid #e5e7eb; padding-top: .75rem;
  font-size: 1rem;
}
.confirm-total strong { color: var(--brand-dark); font-size: 1.1rem; }
.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: .85rem; border-radius: 12px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; font-weight: 700; font-size: 1rem;
  margin-bottom: .75rem;
  transition: opacity var(--trans), transform var(--trans);
}
.btn-wa:hover { opacity: .92; transform: translateY(-1px); }
.btn-order-again {
  display: block; width: 100%; padding: .7rem;
  border: 2px solid #d1d5db; background: none;
  border-radius: 10px; color: var(--muted); font-size: .9rem;
  cursor: pointer; transition: border-color var(--trans), color var(--trans);
  margin-top: .5rem;
}
.btn-order-again:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-continue {
  display: block; width: 100%; padding: .7rem;
  border: 2px solid var(--brand-light); background: var(--brand-light);
  border-radius: 10px; color: var(--brand-dark); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: background var(--trans), border-color var(--trans);
  margin-bottom: .5rem;
}
.btn-continue:hover { background: #dde4fd; border-color: var(--brand); }

/* Map */
.location-info {
  background: var(--brand-light); padding: 14px 16px;
  border-radius: 12px; margin-bottom: 14px;
  border: 1px solid rgba(102,126,234,.12);
}
.location-info strong { color: var(--brand-dark); }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map iframe { width: 100%; aspect-ratio: 16/9; border: 0; min-height: 250px; }

@media (min-width: 1000px) {
  .contact-wrap { grid-template-columns: 1fr 1.2fr; align-items: start; }
}

/* ─── Order status lookup ─────────────────────────────────────── */
#track { background: var(--brand-light); }
.status-lookup {
  display: flex; gap: 10px; max-width: 480px; margin: 0 auto 28px;
  flex-wrap: wrap;
}
.status-lookup input {
  flex: 1; min-width: 180px;
  padding: 13px 16px; border: 2px solid rgba(102,126,234,.25);
  border-radius: 12px; font-size: 1rem; background: var(--surface);
}
.status-lookup input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(102,126,234,.15);
}
.btn-lookup {
  padding: 13px 24px; border-radius: 12px;
  background: var(--brand); color: #fff; border: none;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: opacity var(--trans), transform var(--trans);
  white-space: nowrap;
}
.btn-lookup:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-lookup:disabled { opacity: .6; cursor: wait; }
.status-result { max-width: 480px; margin: 0 auto; }
.status-loading, .status-empty {
  text-align: center; color: var(--muted); padding: 1rem 0;
}
.status-card {
  background: var(--surface); border-radius: 12px;
  padding: 1rem 1.25rem; margin-bottom: 10px;
  box-shadow: var(--shadow); border: 1px solid #e5e7eb;
}
.status-card__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .5rem;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .3rem .8rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
}
.status--new       { background: #dbeafe; color: #1d4ed8; }
.status--proc      { background: #fef9c3; color: #854d0e; }
.status--shipped   { background: #e0f2fe; color: #0369a1; }
.status--delivered { background: #d1fae5; color: #065f46; }
.status--cancelled { background: #fee2e2; color: #991b1b; }
.status-date  { font-size: .8rem; color: var(--muted); }
.status-items { font-size: .85rem; color: var(--muted); margin: 0 0 .4rem; }
.status-amt   { font-weight: 700; color: var(--brand-dark); font-size: .95rem; margin: 0; }

/* ─── Cart overlay ───────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1100; opacity: 0; pointer-events: none;
  transition: opacity var(--trans);
}
.cart-overlay.show { opacity: 1; pointer-events: auto; }

/* ─── Cart FAB ───────────────────────────────────────────────── */
.cart-fab {
  position: fixed; top: 14px; right: 16px; z-index: 1100;
  background: var(--brand); color: #fff;
  border: none; border-radius: 50px; padding: .5rem 1.1rem;
  font-size: .9rem; cursor: pointer;
  display: flex; align-items: center; gap: .4rem;
  box-shadow: 0 4px 14px rgba(102,126,234,.4);
  transition: transform var(--trans), box-shadow var(--trans);
}
.cart-fab:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102,126,234,.5); }
.cart-fab-label { display: none; }
@media (min-width: 480px) { .cart-fab-label { display: inline; } }
.cart-badge {
  background: #e63946; color: #fff;
  border-radius: 50%; min-width: 20px; height: 20px;
  font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.cart-badge[hidden] { display: none; }

/* ─── Cart drawer ────────────────────────────────────────────── */
.cart-drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(380px, 100vw);
  background: var(--surface); box-shadow: -6px 0 32px rgba(0,0,0,.14);
  z-index: 1200;
  transform: translateX(110%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}
.cart-title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.cart-close {
  background: none; border: none; font-size: 1.3rem;
  cursor: pointer; color: var(--muted); padding: 4px 8px;
  border-radius: var(--radius-sm); transition: background var(--trans);
}
.cart-close:hover { background: var(--surface-2); }
.cart-items { flex: 1; overflow-y: auto; padding: .5rem 1.25rem; }
.cart-empty-state { padding: 2rem 0; text-align: center; }
.cart-empty-icon  { font-size: 3rem; margin-bottom: .5rem; }
.cart-empty { color: var(--muted); font-size: .95rem; margin: 0; }
.cart-item { padding: .75rem 0; border-bottom: 1px solid #f3f4f6; }
.ci-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: .5rem;
}
.ci-name { font-size: .9rem; font-weight: 600; line-height: 1.3; flex: 1; }
.ci-remove {
  background: none; border: none; color: #bbb;
  cursor: pointer; font-size: .85rem; padding: 2px 4px;
  border-radius: 4px; transition: color var(--trans), background var(--trans); flex-shrink: 0;
}
.ci-remove:hover { color: var(--danger); background: #fee2e2; }
.ci-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.ci-qty-ctrl { display: flex; align-items: center; gap: 6px; }
.ci-btn {
  width: 26px; height: 26px;
  border: 1.5px solid #d1d5db; background: #fff;
  border-radius: 50%; font-size: .9rem; cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--trans), border-color var(--trans);
}
.ci-btn:hover { background: #f3f4f6; border-color: var(--brand); }
.ci-qty     { min-width: 24px; text-align: center; font-weight: 700; font-size: .9rem; }
.ci-subtotal { font-size: .88rem; color: var(--brand-dark); font-weight: 700; }
.cart-footer { padding: 1rem 1.25rem; border-top: 1px solid #f0f0f0; display: flex; flex-direction: column; gap: .75rem; }
.cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; }
.cart-total strong { font-size: 1.1rem; color: var(--brand-dark); }
.cart-checkout {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border: none; border-radius: 10px;
  padding: .85rem; width: 100%; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: opacity var(--trans), transform var(--trans);
}
.cart-checkout:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
.cart-checkout:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Toast ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; z-index: 1400; pointer-events: none;
}
.toast {
  background: #1e293b; color: #fff;
  padding: .6rem 1.2rem; border-radius: 10px;
  font-size: .9rem; max-width: 320px; text-align: center;
  opacity: 0; transform: translateY(12px);
  transition: opacity .28s ease, transform .28s ease;
  pointer-events: none;
}
.toast--in      { opacity: 1; transform: translateY(0); }
.toast--success { background: #16a34a; }
.toast--warning { background: var(--warning); }
.toast--error   { background: var(--danger); }

/* ─── Footer ─────────────────────────────────────────────────── */
footer { background: #0f172a; color: #94a3b8; padding: 40px 0 24px; }
.footer-inner {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 1.1rem;
}
.footer-brand img { border-radius: 50%; width: 40px; height: 40px; object-fit: cover; }
.footer-copy { font-size: .85rem; margin: 0; }
.footer-links {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; font-size: .85rem;
}
.footer-links a { color: #94a3b8; transition: color var(--trans); }
.footer-links a:hover { color: #fff; }

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; text-align: left; }
  .footer-brand { justify-content: flex-start; }
  .footer-links { justify-content: flex-end; }
}

/* ─── Mobile tab bar ──────────────────────────────────────────── */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,.07);
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 10px 4px 8px;
  color: var(--muted); font-size: .65rem; font-weight: 600;
  text-decoration: none; letter-spacing: .02em;
  border: none; background: none; cursor: pointer;
  transition: color var(--trans);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.tab-item svg { width: 22px; height: 22px; transition: transform var(--trans); }
.tab-item--active { color: var(--brand); }
.tab-item--active svg { transform: scale(1.15); }
.tab-item--cart { position: relative; }
.tab-cart-wrap { position: relative; display: inline-flex; }
.tab-cart-badge {
  position: absolute; top: -6px; right: -8px;
  background: #e63946; color: #fff;
  border-radius: 50%; min-width: 17px; height: 17px;
  font-size: .6rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid #fff;
}
.tab-cart-badge[hidden] { display: none; }
@media (min-width: 900px) { .tab-bar { display: none; } }

/* ─── Scroll reveal animations ───────────────────────────────── */
.anim-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity  0.55s ease calc(var(--i, 0) * 0.09s),
    transform 0.55s ease calc(var(--i, 0) * 0.09s);
}
.anim-reveal.revealed {
  opacity: 1;
  transform: none;
}

/* ─── Lightbox ────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 90vw; max-height: 88vh;
  object-fit: contain; border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  cursor: default;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.15); border: none;
  color: #fff; font-size: 1.5rem; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  transition: background var(--trans);
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ─── Product image carousel ─────────────────────────────────── */
.carousel { position: relative; overflow: hidden; }
.c-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.c-track::-webkit-scrollbar { display: none; }
.c-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-2);
}
.c-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(.25,.1,.3,1);
  display: block;
}
.card:hover .c-slide img { transform: scale(1.06); }
.c-slide.img-failed {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.c-slide.img-failed::after { content: '🍾'; }

/* Prev / Next buttons */
.c-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.85); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; z-index: 2;
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background var(--trans), opacity var(--trans);
  opacity: 0;
}
.carousel:hover .c-btn { opacity: 1; }
.c-btn--prev { left: 8px; }
.c-btn--next { right: 8px; }
.c-btn:hover { background: #fff; }

/* Dots */
.c-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 2;
}
.c-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: background var(--trans), transform var(--trans);
}
.c-dot--on { background: #fff; transform: scale(1.3); }

/* On mobile always show nav buttons */
@media (hover: none) { .c-btn { opacity: 1; } }

/* ─── Share button ────────────────────────────────────────────── */
.btn-share {
  width: 34px; height: 34px;
  border: 1.5px solid #d1d5db; background: var(--surface);
  border-radius: var(--radius-sm); cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
  transition: border-color var(--trans), color var(--trans), background var(--trans);
  margin-left: auto;
}
.btn-share:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ─── Accessibility ──────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ─── Mobile: push content above fixed tab bar ───────────────── */
@media (max-width: 899px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
}

/* ─── Mobile: hero stats tighter on narrow phones ───────────── */
@media (max-width: 420px) {
  .hero-stats  { gap: 16px; padding: .7rem .9rem; }
  .hero-stat strong { font-size: 1.15rem; }
  .hero-stat span   { font-size: .72rem; }
}

/* ─── Mobile: bigger touch targets for all interactive buttons ── */
@media (hover: none) {
  .qty-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  .ci-btn  { width: 34px; height: 34px; }
  .c-btn   { width: 38px; height: 38px; font-size: 1.25rem; }
  .btn-share { width: 40px; height: 40px; }
  .btn-add { padding: 10px 16px; font-size: .9rem; }
}

/* ─── Mobile: add-to-cart stretches to fill action row ────────── */
@media (max-width: 340px) {
  .card-actions { flex-wrap: wrap; }
  .btn-add      { flex: 1 1 100%; justify-content: center; }
}

/* ─── Mobile: filter toolbar compact on very small screens ────── */
@media (max-width: 380px) {
  .filter-group select { flex: 1; min-width: 0; font-size: .85rem; }
  .stock-toggle span   { font-size: .82rem; }
}

/* ─── Mobile: category tabs scroll horizontally ───────────────── */
@media (max-width: 600px) {
  .category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .cat-tab { flex-shrink: 0; }
}
