/* ============================================================
   Components
   Header · Search · Buttons · Cards · States · Cart · Nav
   ============================================================ */

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding-block: var(--sp-2);
}

.brand { order: 1; }
.header__actions { order: 2; margin-left: auto; }
.header__search { order: 3; flex-basis: 100%; }
.header .search { max-width: 620px; margin-inline: auto; }

@media (min-width: 900px) {
  .brand { order: 1; }
  .header__search { order: 2; flex: 1; flex-basis: auto; min-width: 0; }
  .header__actions { order: 3; margin-left: 0; }
  .header__inner { padding-block: 0; height: var(--header-h); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
  min-width: 0;
}
.brand__logo {
  width: 38px; height: 38px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  box-shadow: var(--shadow-xs);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.brand__text strong {
  font-size: 0.98rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 44vw;
}
.brand__text small { font-size: var(--fs-xs); color: var(--success); font-weight: var(--fw-semibold); }
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-brand);
}
.brand__mark svg { width: 20px; height: 20px; color: #fff; }
.brand__name {
  font-size: 1.15rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand__name b { color: var(--brand-700); }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  width: var(--control-h);
  height: var(--control-h);
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  color: var(--text-2);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 22px; height: 22px; }

.icon-btn__badge {
  position: absolute;
  top: 5px; right: 5px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-bold);
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--surface);
  display: none;
}
.icon-btn__badge.is-visible { display: block; animation: pop var(--dur) var(--ease); }

@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.location-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-2);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.location-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.location-btn svg { width: 18px; height: 18px; color: var(--brand-700); flex-shrink: 0; }
.location-btn__text { display: none; min-width: 0; text-align: left; }
.location-btn__label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: var(--fw-bold); }
.location-btn__value { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 768px) {
  .location-btn { padding: 6px var(--sp-3); max-width: 220px; }
  .location-btn__text { display: block; }
}

/* Account lives in the bottom nav on mobile; show the header icon only on desktop */
.account-link { display: none; }
@media (min-width: 1024px) {
  .account-link { display: grid; }
}

/* Desktop category nav (second header row) */
.header__nav { display: none; }
@media (min-width: 1024px) {
  .header__nav {
    display: block;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
  .header__nav-inner {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    height: 46px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .header__nav-inner::-webkit-scrollbar { display: none; }
}

.navlink {
  padding: 6px var(--sp-3);
  border-radius: var(--r-pill);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.navlink:hover { background: var(--surface-2); color: var(--text); }
.navlink.is-active { background: var(--brand-050); color: var(--brand-700); }

/* ------------------------------------------------------------
   Search
   ------------------------------------------------------------ */
.search { position: relative; width: 100%; }

.search__field {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: var(--control-h);
  padding: 0 var(--sp-2) 0 var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search__field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-050);
}
.search__field > svg { width: 19px; height: 19px; color: var(--text-3); flex-shrink: 0; }
.search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: var(--fs-md);
}
.search__input::placeholder { color: var(--text-3); }
.search__clear {
  width: 30px; height: 30px;
  display: none;
  place-items: center;
  border-radius: var(--r-pill);
  color: var(--text-3);
}
.search__clear:hover { background: var(--surface-2); color: var(--text); }
.search__clear svg { width: 16px; height: 16px; }
.search.is-filled .search__clear { display: grid; }
.search__submit {
  height: calc(var(--control-h) - 10px);
  padding: 0 var(--sp-4);
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  display: none;
}
@media (min-width: 768px) { .search__submit { display: block; } }

.search__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  z-index: var(--z-drawer);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: var(--sp-2);
  display: none;
}
.search__panel.is-open { display: block; animation: fadeUp var(--dur) var(--ease); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.search__group-label {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.search__row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  width: 100%;
  text-align: left;
  transition: background var(--dur-fast) var(--ease);
}
.search__row:hover,
.search__row:focus-visible { background: var(--surface-2); }
.search__row img {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}
.search__row-main { min-width: 0; flex: 1; }
.search__row-title { font-weight: var(--fw-semibold); font-size: var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search__row-sub { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search__row-price { font-weight: var(--fw-bold); font-size: var(--fs-base); color: var(--text); flex-shrink: 0; }
.search__row-tag {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--brand-050);
  color: var(--brand-700);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: var(--control-h);
  padding: 0 var(--sp-5);
  border-radius: var(--r-pill);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--brand-600); }

.btn--secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn--secondary:hover { background: var(--surface-2); }

.btn--ghost { color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--block { width: 100%; }
.btn--sm { height: var(--control-h-sm); padding: 0 var(--sp-4); font-size: var(--fs-base); }
.btn--lg { height: var(--control-h-lg); font-size: var(--fs-lg); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-050); }

/* ------------------------------------------------------------
   Category card
   ------------------------------------------------------------ */
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-1);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.cat-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cat-card__icon {
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--brand-050);
  color: var(--brand-700);
}
.cat-card__icon svg { width: 24px; height: 24px; }
.cat-card__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text);
  text-align: center;
  line-height: 1.25;
}

/* ------------------------------------------------------------
   Shop card
   ------------------------------------------------------------ */
.shop-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.shop-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.shop-card__cover { width: 100%; height: 100%; object-fit: cover; }
.shop-card__logo {
  position: absolute;
  left: var(--sp-3);
  bottom: calc(var(--sp-6) * -1);
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}
.shop-card__body {
  padding: calc(var(--sp-6) + 6px) var(--sp-4) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex: 1;
}
.shop-card__top { display: flex; align-items: center; gap: var(--sp-2); }
.shop-card__name {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-card__cat { font-size: var(--fs-sm); color: var(--text-3); font-weight: var(--fw-medium); }
.shop-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.shop-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.shop-card__meta svg { width: 15px; height: 15px; color: var(--text-3); }
.shop-card__rating { color: var(--text); font-weight: var(--fw-bold); }
.shop-card__rating svg { color: var(--star); }
.shop-card__actions { margin-top: auto; padding-top: var(--sp-3); }

.shop-card--list { flex-direction: row; }
.shop-card--list .shop-card__media { aspect-ratio: 1; width: 118px; flex-shrink: 0; }
.shop-card--list .shop-card__logo { display: none; }
.shop-card--list .shop-card__body { padding: var(--sp-3) var(--sp-4); }

/* Verified / status chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: 1.4;
}
.chip svg { width: 13px; height: 13px; }
.chip--verified { background: var(--brand-050); color: var(--brand-700); }
.chip--open { background: var(--success-050); color: var(--success); }
.chip--closed { background: var(--danger-050); color: var(--danger); }
.chip--muted { background: var(--surface-2); color: var(--text-3); }

/* ------------------------------------------------------------
   Product card
   ------------------------------------------------------------ */
.cat-section { margin-top: var(--sp-8); }
.cat-section + .cat-section { margin-top: var(--sp-7); }

.cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: 12px;
  padding-inline: 4px;
}
.cat-head__title {
  font-size: 22px;
  font-weight: var(--fw-extrabold);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.cat-head__all {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--brand-700);
  white-space: nowrap;
}
.cat-head__all:hover { color: var(--brand); }
.cat-head__caret { font-size: 16px; line-height: 1; }

.pcard-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
  margin-inline: 0;
  padding-inline: 4px;
  padding-bottom: var(--sp-2);
}
.pcard-row::-webkit-scrollbar { display: none; }
.pcard-row > * { scroll-snap-align: start; }

.pcard {
  width: 42vw;
  min-width: 150px;
  max-width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}
.grid--products .pcard { width: auto; min-width: 0; max-width: none; }

.pcard__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f2f2;
}
.pcard__img-link { display: block; width: 100%; height: 100%; }
.pcard__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.pcard:hover .pcard__img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .pcard:hover .pcard__img { transform: none; } }

.pcard__badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fb923c;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  z-index: 1;
}
.pcard__stock {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 21, 27, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  backdrop-filter: blur(6px);
  z-index: 1;
}
.pcard__add,
.pcard__qty {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 21, 27, 0.16);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  z-index: 1;
}
.pcard__add svg { width: 20px; height: 20px; color: var(--text); }
.pcard__add:active { transform: scale(0.9); }
.pcard__qty { font-size: 15px; font-weight: 700; color: var(--brand-700); }
.pcard__qty:active { transform: scale(0.9); }

.pcard__price { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.pcard__name {
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------------------------------------------------------------
   States: skeleton, empty, error
   ------------------------------------------------------------ */
.skel {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.skel-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.skel-card__media { aspect-ratio: 1; }
.skel-card__body { padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }

.skel-line { height: 12px; border-radius: var(--r-pill); }
.skel-line--60 { width: 60%; }
.skel-line--40 { width: 40%; }
.skel-line--80 { width: 80%; }

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-12) var(--sp-6);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-xl);
}
.state__icon {
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-3);
}
.state__icon svg { width: 30px; height: 30px; }
.state__icon--brand { background: var(--brand-050); color: var(--brand-700); }
.state__icon--error { background: var(--danger-050); color: var(--danger); }
.state__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.state__text { font-size: var(--fs-base); color: var(--text-3); max-width: 420px; }
.state--compact { padding: var(--sp-8) var(--sp-4); border-style: solid; }

/* ------------------------------------------------------------
   Breadcrumb / back
   ------------------------------------------------------------ */
.pagebar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--control-h-sm);
  padding: 0 var(--sp-3) 0 var(--sp-2);
  border-radius: var(--r-pill);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease);
}
.back-btn:hover { background: var(--surface-2); }
.back-btn svg { width: 18px; height: 18px; }
.crumbs { display: none; font-size: var(--fs-sm); color: var(--text-3); }
.crumbs a:hover { color: var(--brand-700); }
@media (min-width: 768px) { .crumbs { display: flex; gap: 6px; align-items: center; } }

/* ------------------------------------------------------------
   Shop identity header (storefront page)
   ------------------------------------------------------------ */
.shop-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.shop-hero__cover {
  position: relative;
  height: 132px;
  background: linear-gradient(135deg, var(--brand-050), var(--surface-2));
}
@media (min-width: 768px) {
  .shop-hero__cover { height: auto; aspect-ratio: 24 / 6; min-height: 150px; }
}
.shop-hero__cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-hero__body {
  position: relative;
  padding: 0 var(--sp-5) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.shop-hero__logo {
  width: 76px; height: 76px;
  border-radius: var(--r-lg);
  border: 4px solid var(--surface);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  margin-top: -38px;
}
.shop-hero__cta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
  width: 100%;
}
.shop-hero__cta .btn {
  width: 100%;
  min-width: 0;
  padding: 0 var(--sp-3);
  font-size: var(--fs-base);
  justify-content: center;
}
.shop-hero__cta .btn--primary {
  grid-column: 1 / -1;
  font-size: var(--fs-md);
  padding: 0 var(--sp-4);
}
.shop-hero__cta .btn:only-child {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .shop-hero__body { flex-direction: row; align-items: flex-end; gap: var(--sp-6); }
  .shop-hero__logo { width: 104px; height: 104px; margin-top: -52px; }
  .shop-hero__info { padding-bottom: 4px; }
  .shop-hero__cta {
    display: flex;
    grid-template-columns: none;
    margin-left: auto;
    width: auto;
    gap: var(--sp-3);
    align-items: center;
  }
  .shop-hero__cta .btn {
    flex: 0 0 auto;
    width: auto;
    padding: 0 var(--sp-5);
    font-size: var(--fs-md);
  }
  .shop-hero__cta .btn--primary {
    grid-column: auto;
  }
}
.shop-hero__info { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; min-width: 0; }
.shop-hero__name { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.shop-hero__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-base); color: var(--text-2); }
.shop-hero__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.shop-hero__meta svg { width: 16px; height: 16px; color: var(--text-3); }
.shop-hero__meta .rating svg { color: var(--star); }
.shop-hero__meta .rating strong { color: var(--text); }
.shop-hero__desc { font-size: var(--fs-base); color: var(--text-2); max-width: 70ch; }

/* ------------------------------------------------------------
   Product detail — Glovo-style sheet
   ------------------------------------------------------------ */
.pdp-sheet {
  max-width: 760px;
  margin-inline: auto;
  background: var(--surface);
}
.pdp-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  overflow: hidden;
}
.pdp-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-close {
  position: absolute;
  top: calc(var(--sp-3) + env(safe-area-inset-top, 0px));
  right: var(--sp-4);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  color: var(--text);
  border: 0;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}
.pdp-close:active { transform: scale(0.94); }
.pdp-close svg { width: 20px; height: 20px; }

.pdp-body {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-4);
  padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
}
.pdp-head { display: grid; gap: var(--sp-2); }
.pdp-pill {
  justify-self: start;
  background: #e8274b;
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  padding: 3px 10px;
  border-radius: var(--r-xs);
}
.pdp-title {
  font-size: 28px;
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pdp-price { display: flex; align-items: baseline; gap: var(--sp-2); }
.pdp-price__val { font-size: 22px; font-weight: var(--fw-extrabold); letter-spacing: -0.01em; }
.pdp-compare { font-size: var(--fs-md); color: var(--text-3); text-decoration: line-through; font-weight: var(--fw-medium); }
.pdp__desc { color: var(--text-2); font-size: var(--fs-md); line-height: var(--lh-normal); }

.pdp-sec { display: grid; gap: var(--sp-3); }
.pdp-sec--row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.pdp-sec__title { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text); }

.pdp-spec {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.pdp-spec__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--brand-050);
  color: var(--brand-700);
}
.pdp-spec__icon svg { width: 20px; height: 20px; }
.pdp-spec__main { min-width: 0; }
.pdp-spec__label { display: block; font-size: var(--fs-xs); color: var(--text-3); font-weight: var(--fw-medium); }
.pdp-spec__value { display: block; font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--text); }

.pdp-list { display: grid; gap: var(--sp-2); }
.pdp-list li { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-base); color: var(--text-2); line-height: var(--lh-snug); }
.pdp-list svg { width: 18px; height: 18px; color: var(--success); margin-top: 2px; flex-shrink: 0; }

.pdp-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.addon {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.addon:last-child { border-bottom: 0; }
.addon__box {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-xs);
  display: grid;
  place-items: center;
  color: transparent;
}
.addon__box svg { width: 14px; height: 14px; }
.addon.is-on .addon__box { background: var(--success); border-color: var(--success); color: #fff; }
.addon__name { flex: 1; min-width: 0; font-weight: var(--fw-medium); font-size: var(--fs-base); color: var(--text); }
.addon__price { font-weight: var(--fw-bold); font-size: var(--fs-base); }

.date-row {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding: 2px 2px var(--sp-1);
  scrollbar-width: none;
}
.date-row::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto;
  width: 68px;
  display: grid;
  gap: 2px;
  place-items: center;
  padding: var(--sp-2) var(--sp-1);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}
.date-chip__dow { font-size: var(--fs-xs); color: var(--text-3); font-weight: var(--fw-semibold); }
.date-chip__day { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text); }
.date-chip__mon { font-size: var(--fs-xs); color: var(--text-3); font-weight: var(--fw-medium); }
.date-chip.is-on { border-color: var(--brand); background: var(--brand-050); }
.date-chip.is-on .date-chip__day { color: var(--brand-700); }
.date-chip.is-on .date-chip__dow,
.date-chip.is-on .date-chip__mon { color: var(--brand-600); }

.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.slot {
  height: var(--control-h);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.slot:disabled { opacity: 0.42; cursor: not-allowed; text-decoration: line-through; }
.slot.is-on { border-color: var(--success); background: var(--success-050); color: var(--success); }

.pdp-cancel {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}
.pdp-cancel svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--text-3); }

/* Details accordion */
.acc {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  cursor: pointer;
  list-style: none;
}
.acc__head::-webkit-details-marker { display: none; }
.acc__icon { transition: transform var(--dur) var(--ease); color: var(--text-3); }
.acc__icon svg { width: 18px; height: 18px; }
.acc[open] .acc__icon { transform: rotate(180deg); }
.acc__body { padding: 0 var(--sp-4) var(--sp-4); display: grid; gap: var(--sp-3); }
.acc__text { color: var(--text-2); font-size: var(--fs-base); line-height: var(--lh-normal); }
.acc-specs { display: grid; }
.acc-specs > div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
}
.acc-specs > div:last-child { border-bottom: 0; }
.acc-specs dt { color: var(--text-3); }
.acc-specs dd { font-weight: var(--fw-semibold); text-align: right; }

/* Related */
.pdp-related { display: grid; gap: var(--sp-3); }
.pcard-row--related .pcard { width: 148px; }
.pcard-row--related .pcard__add,
.pcard-row--related .pcard__qty { border: 1.5px solid var(--border-strong); box-shadow: none; background: #fff; }

/* Sticky action bar */
.pdp-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: calc(var(--z-header) - 1);
  margin-inline: auto;
  max-width: 760px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 20px rgba(16, 21, 27, 0.06);
}
.pdp-bar__btn {
  width: 100%;
  height: 56px;
  border-radius: var(--r-pill);
  background: #0a7b61;
  color: #fff;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  box-shadow: 0 10px 22px rgba(10, 123, 97, 0.32);
  transition: transform var(--dur-fast) var(--ease);
}
.pdp-bar__btn:active:not(:disabled) { transform: scale(0.985); }
.pdp-bar__btn:disabled { opacity: 0.6; box-shadow: none; cursor: not-allowed; }
.pdp-bar__btn svg { width: 20px; height: 20px; }

/* PDP hides app chrome, clears page padding, lifts toasts */
.has-pdp .bottomnav { display: none; }
.has-pdp .floatcart { display: none; }
.has-pdp .main { padding-bottom: 0; }
.has-pdp .main .container { padding-inline: 0; }
.has-pdp .toasts { bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }

/* Shared option / spec styles (used by PDP and elsewhere) */
.option-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.option-group__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.option-group__label span { color: var(--text-3); font-weight: var(--fw-medium); }
.option-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.option-chip {
  min-width: 44px;
  height: 40px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.option-chip:hover:not(:disabled) { border-color: var(--brand); }
.option-chip.is-selected { border-color: var(--brand); background: var(--brand-050); color: var(--brand-700); }
.option-chip:disabled { opacity: 0.42; cursor: not-allowed; text-decoration: line-through; }
.option-swatch {
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  border: 2px solid var(--border-strong);
  padding: 2px;
  background: var(--surface);
}
.option-swatch i { display: block; width: 100%; height: 100%; border-radius: var(--r-pill); }
.option-swatch.is-selected { border-color: var(--brand); }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
  height: var(--control-h);
}
.qty button {
  width: var(--control-h);
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease);
}
.qty button:hover:not(:disabled) { background: var(--surface-2); }
.qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty button svg { width: 18px; height: 18px; }
.qty__value { min-width: 44px; text-align: center; font-weight: var(--fw-bold); font-size: var(--fs-md); }

.spec-list { display: grid; gap: var(--sp-2); }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { color: var(--text-3); font-weight: var(--fw-medium); }
.spec-row dd { font-weight: var(--fw-semibold); text-align: right; }

/* ------------------------------------------------------------
   Cart drawer + line items
   ------------------------------------------------------------ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: rgba(16, 21, 27, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
  backdrop-filter: blur(2px);
}
.overlay.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: var(--z-modal);
  height: 100%;
  width: min(420px, 100%);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease);
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); display: flex; align-items: center; gap: var(--sp-2); }
.drawer__title span.count { font-size: var(--fs-sm); color: var(--text-3); font-weight: var(--fw-medium); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--sp-4) var(--sp-5); }
.drawer__foot {
  flex-shrink: 0;
  padding: var(--sp-4) var(--sp-5) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.line-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.line-item:last-child { border-bottom: 0; }
.line-item__img { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); }
.line-item__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.line-item__name { font-weight: var(--fw-semibold); font-size: var(--fs-base); line-height: 1.3; }
.line-item__variant { font-size: var(--fs-xs); color: var(--text-3); }
.line-item__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: 4px; }
.line-item__price { font-weight: var(--fw-bold); font-size: var(--fs-base); }
.line-item__remove { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-3); font-weight: var(--fw-semibold); }
.line-item__remove svg { width: 14px; height: 14px; }
.line-item__remove:hover { color: var(--danger); }

.qty--sm { height: 34px; }
.qty--sm button { width: 34px; }
.qty--sm .qty__value { min-width: 30px; font-size: var(--fs-sm); }

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-base);
  color: var(--text-2);
}
.summary-row--total {
  padding-top: var(--sp-3);
  margin-top: var(--sp-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
}

/* ------------------------------------------------------------
   Mobile bottom nav
   ------------------------------------------------------------ */
.bottomnav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-header);
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
@media (min-width: 1024px) { .bottomnav { display: none; } }

.bottomnav__item {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 3px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  transition: color var(--dur-fast) var(--ease);
}
.bottomnav__item svg { width: 23px; height: 23px; flex-shrink: 0; }
.bottomnav__item > span {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}
.bottomnav__item.is-active { color: var(--brand-700); }
.bottomnav__item.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand);
}
.bottomnav__badge {
  position: absolute;
  top: 8px;
  left: 50%;
  margin-left: 6px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: var(--fw-bold);
  line-height: 16px;
  text-align: center;
  display: none;
}
.bottomnav__badge.is-visible { display: block; }

/* ------------------------------------------------------------
   Toast
   ------------------------------------------------------------ */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + var(--sp-4));
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: min(440px, calc(100% - var(--sp-8)));
  pointer-events: none;
}
@media (min-width: 1024px) { .toasts { bottom: var(--sp-8); } }
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--text);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  pointer-events: auto;
  animation: toastIn var(--dur) var(--ease);
}
.toast svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--brand); }
.toast--error svg { color: #ff8a80; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   Modal (location / confirm)
   ------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: end center;
  padding: 0;
}
@media (min-width: 600px) { .modal { place-items: center; padding: var(--sp-4); } }
.modal__card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: modalIn var(--dur) var(--ease);
}
@media (min-width: 600px) { .modal__card { border-radius: var(--r-xl); } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
}
.modal__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.modal__body { padding: var(--sp-4) var(--sp-5); overflow-y: auto; }
.modal__foot { padding: var(--sp-4) var(--sp-5) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); }

.loc-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.loc-option + .loc-option { margin-top: var(--sp-2); }
.loc-option:hover { border-color: var(--border-strong); background: var(--surface-2); }
.loc-option.is-selected { border-color: var(--brand); background: var(--brand-050); }
.loc-option__icon { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-2); color: var(--brand-700); flex-shrink: 0; }
.loc-option__icon svg { width: 20px; height: 20px; }
.loc-option__main { flex: 1; min-width: 0; }
.loc-option__name { font-weight: var(--fw-semibold); }
.loc-option__sub { font-size: var(--fs-sm); color: var(--text-3); }
.loc-option__check { color: var(--brand); display: none; }
.loc-option.is-selected .loc-option__check { display: block; }
.loc-option__check svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------
   Cart page / checkout
   ------------------------------------------------------------ */
.checkout {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 900px) {
  .checkout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .checkout__aside { position: sticky; top: calc(var(--header-h) + 64px); }
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.panel + .panel { margin-top: var(--sp-4); }
.panel__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--sp-4); }

.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.field__hint { font-size: var(--fs-xs); color: var(--text-3); }
.field__error { font-size: var(--fs-xs); color: var(--danger); font-weight: var(--fw-semibold); display: none; }
.field.has-error .field__error { display: block; }
.field.has-error .input { border-color: var(--danger); }
.input,
.textarea,
.select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  font-size: var(--fs-md);
}
.input:focus,
.textarea:focus,
.select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-050); }
.textarea { resize: vertical; min-height: 88px; }

.pay-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
}
.pay-option + .pay-option { margin-top: var(--sp-2); }
.pay-option.is-selected { border-color: var(--brand); background: var(--brand-050); }
.pay-option__radio { width: 20px; height: 20px; border-radius: var(--r-pill); border: 2px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; }
.pay-option.is-selected .pay-option__radio { border-color: var(--brand); }
.pay-option.is-selected .pay-option__radio::after { content: ''; width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--brand); }
.pay-option__main { flex: 1; }
.pay-option__name { font-weight: var(--fw-semibold); }
.pay-option__sub { font-size: var(--fs-sm); color: var(--text-3); }

.order-success {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}
.order-success__icon {
  width: 88px; height: 88px;
  margin: 0 auto var(--sp-5);
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: var(--success-050);
  color: var(--success);
}
.order-success__icon svg { width: 44px; height: 44px; }
.receipt {
  margin-top: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  text-align: left;
}

/* ------------------------------------------------------------
   Footer (desktop)
   ------------------------------------------------------------ */
.footer {
  margin-top: var(--sp-16);
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: none;
}
@media (min-width: 1024px) { .footer { display: block; } }
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--sp-8);
  padding-block: var(--sp-10);
}
.footer__brand p { color: var(--text-3); font-size: var(--fs-base); margin-top: var(--sp-3); max-width: 34ch; }
.footer__col h4 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: var(--sp-3); }
.footer__col a { display: block; padding: 5px 0; color: var(--text-2); font-size: var(--fs-base); }
.footer__col a:hover { color: var(--brand-700); }
.footer__bar {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* ------------------------------------------------------------
   Rating inline
   ------------------------------------------------------------ */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}
.rating svg { width: 15px; height: 15px; color: var(--star); }

/* ------------------------------------------------------------
   Category nav (storefront)
   ------------------------------------------------------------ */
.catnav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-block: var(--sp-1) var(--sp-4);
  margin-inline: calc(var(--sp-4) * -1);
  padding-inline: var(--sp-4);
  padding-block: 2px var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-padding-inline: var(--sp-4);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%);
}
.catnav::-webkit-scrollbar { display: none; }
.catnav > * { flex: 0 0 auto; scroll-snap-align: start; }
.catnav .navlink {
  padding: 8px var(--sp-4);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  background: none;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.catnav .navlink:hover { color: var(--text); background: var(--surface-2); }
.catnav .navlink.is-active {
  position: relative;
  color: var(--brand-700);
  background: none;
}
.catnav .navlink.is-active::after {
  content: '';
  position: absolute;
  left: var(--sp-4); right: var(--sp-4);
  bottom: 3px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
}
.catnav__active {
  color: var(--brand-700);
  background: var(--brand-050);
  border-color: transparent;
}

@media (min-width: 768px) {
  .catnav { margin-inline: 0; padding-inline: 0; padding-block: 2px var(--sp-3); }
}

/* ------------------------------------------------------------
   Floating cart bar
   ------------------------------------------------------------ */
.floatcart {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottomnav-h, 64px) + env(safe-area-inset-bottom, 0px) + var(--sp-4));
  transform: translateX(-50%);
  z-index: 65;
  width: min(560px, calc(100% - var(--sp-6)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 56px;
  padding-inline: var(--sp-5);
  border-radius: var(--r-pill);
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-weight: var(--fw-semibold);
  animation: rise var(--dur-base) var(--ease);
}
.floatcart[hidden] { display: none; }
.floatcart:hover { color: #fff; }
.floatcart__count { color: rgba(255, 255, 255, 0.72); font-size: var(--fs-sm); }
.floatcart__total { font-weight: var(--fw-bold); }
@media (min-width: 1024px) {
  .floatcart { bottom: var(--sp-8); }
}
@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .floatcart { animation: none; }
}
