/* ============================================================
   The Trail Tales — App Stylesheet
   Utility classes, components and layout helpers.
   ============================================================ */

/* ---- Layout ---- */
.max-w-6xl { max-width: 72rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-md  { max-width: 28rem; }
.mx-auto   { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hidden { display: none; }
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
}

/* Spacing */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-4 { padding-top: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-24 { margin-top: 6rem; }
.ml-auto { margin-left: auto; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

.divide-y > * + * { border-top: 1px solid var(--border); }

/* ---- Typography ---- */
.text-xs  { font-size: 0.75rem; line-height: 1rem; }
.text-sm  { font-size: 0.875rem; line-height: 1.25rem; }
.text-base{ font-size: 1rem; line-height: 1.5rem; }
.text-lg  { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl  { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }

@media (min-width: 640px) {
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
  .sm\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.leading-relaxed { line-height: 1.625; }
.leading-tight   { line-height: 1.25; }
.tracking-wide   { letter-spacing: 0.025em; }
.tracking-wider  { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase  { text-transform: uppercase; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-through { text-decoration: line-through; }
.underline { text-decoration: underline; }
.underline-offset-4 { text-underline-offset: 4px; }

/* ---- Overflow / Position ---- */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky   { position: sticky; }
.top-0    { top: 0; }
.z-50     { z-index: 50; }
.inset-0  { inset: 0; }

/* ---- Sizing ---- */
.w-full   { width: 100%; }
.h-full   { height: 100%; }
.size-4   { width: 1rem; height: 1rem; }
.size-5   { width: 1.25rem; height: 1.25rem; }
.size-7   { width: 1.75rem; height: 1.75rem; }
.size-8   { width: 2rem; height: 2rem; }
.w-8      { width: 2rem; }
.w-9      { width: 2.25rem; }
.w-48     { width: 12rem; }
.h-px     { height: 1px; }
.h-fit    { height: fit-content; }
.min-h-screen { min-height: 100vh; }
.aspect-\[3\/4\] { aspect-ratio: 3/4; }
.object-cover { object-fit: cover; }
.place-items-center { place-items: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms, opacity 150ms;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled,
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-primary:hover { background-color: oklch(0.52 0.2 18); }

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-outline:hover { background-color: var(--accent); }

.btn-ghost {
  background-color: transparent;
  color: var(--muted-foreground);
  border-color: transparent;
}
.btn-ghost:hover { background-color: var(--accent); color: var(--foreground); }

.btn-destructive {
  background-color: transparent;
  color: var(--destructive);
  border-color: transparent;
}
.btn-destructive:hover { background-color: oklch(0.2 0.04 25); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }
.btn-icon { padding: 0.5rem; }
.btn-w-full { width: 100%; }

/* ---- Forms ---- */
.form-label {
  display: block;
  font-size: 0.875rem;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}
.form-input,
.form-textarea,
.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  color: var(--foreground);
  background-color: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px oklch(0.82 0.11 85 / 0.2);
}
.form-textarea { resize: vertical; min-height: 5rem; }

/* ---- Cards ---- */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.product-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--card);
  transition: border-color 300ms;
  text-decoration: none;
  color: inherit;
}
.product-card:hover { border-color: oklch(0.82 0.11 85 / 0.6); }
.product-card__image {
  position: relative;
  aspect-ratio: 1/1.5;
  overflow: hidden;
  background-color: var(--secondary);
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms;
}
.product-card:hover .product-card__image img { transform: scale(1.05); }
.product-card__body { padding: 1rem; }
.product-card__name { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card__notes { font-size: 0.75rem; color: var(--muted-foreground); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; margin-top: 0.25rem; }
.product-card__pricing { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-top: 0.75rem; }
.product-card__sizes { font-size: 0.75rem; color: var(--muted-foreground); margin-left: auto; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge-primary { background-color: var(--primary); color: var(--primary-foreground); }
.badge-gold { border: 1px solid oklch(0.82 0.11 85 / 0.5); color: var(--gold); }
.badge-off { position: absolute; left: 0.75rem; top: 0.75rem; background-color: var(--primary); color: var(--primary-foreground); border-radius: 9999px; padding: 0.25rem 0.625rem; font-size: 0.6875rem; font-weight: 500; }
.badge-new { position: absolute; right: 0.75rem; top: 0.75rem; background-color: var(--gold); color: var(--gold-foreground); border-radius: 9999px; padding: 0.25rem 0.625rem; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.875rem 1rem;
}
@media (min-width: 640px) {
  .site-header__inner { padding: 0.875rem 1.5rem; }
}
.site-header__logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
@media (min-width: 640px) { .site-header__logo { font-size: 1.5rem; } }

.site-header__nav {
  display: none;
  justify-content: center;
  gap: 2rem;
}
@media (min-width: 768px) { .site-header__nav { display: flex; } }
.site-header__nav a {
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 150ms;
}
.site-header__nav a:hover,
.site-header__nav a.active { color: var(--foreground); }

.site-header__actions { display: flex; align-items: center; gap: 0.375rem; flex-shrink: 0; }

.cart-btn { position: relative; }
.cart-count {
  position: absolute;
  top: -0.125rem;
  right: -0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.6875rem;
  font-weight: 500;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* Mobile nav */
.mobile-nav {
  border-top: 1px solid var(--border);
  background-color: var(--background);
}
.mobile-nav__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
}
.mobile-nav a,
.mobile-nav button {
  display: block;
  padding: 0.625rem 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background-color 150ms, color 150ms;
}
.mobile-nav a:hover,
.mobile-nav button:hover { background-color: var(--secondary); color: var(--foreground); }

/* ---- Footer ---- */
.site-footer { margin-top: 6rem; border-top: 1px solid var(--border); background-color: var(--secondary); }
.site-footer__inner { display: grid; gap: 2.5rem; max-width: 72rem; margin: 0 auto; padding: 3.5rem 1rem; }
@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: repeat(3, 1fr); padding: 3.5rem 1.5rem; }
}
.site-footer__brand { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.5rem; }
.site-footer__tagline { margin-top: 0.75rem; max-width: 18rem; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }
.site-footer__links { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; font-size: 0.875rem; }
.site-footer__links a { color: var(--muted-foreground); text-decoration: none; transition: color 150ms; }
.site-footer__links a:hover { color: var(--foreground); }
.site-footer__contact { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; font-size: 0.875rem; }
.site-footer__contact a { color: var(--muted-foreground); display: flex; align-items: center; gap: 0.5rem; transition: color 150ms; }
.site-footer__contact a:hover { color: var(--foreground); }
.site-footer__bottom { border-top: 1px solid var(--border); padding: 1.25rem 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---- Flash messages ---- */
.flash-messages {
  position: fixed;
  top: 6.5rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 26rem;
  width: calc(100vw - 4rem);
}
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 16px -6px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--foreground);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toast-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.flash-success { border-left: 4px solid oklch(0.62 0.17 140) !important; }
.flash-error   { border-left: 4px solid var(--destructive) !important; }
.flash-info    { border-left: 4px solid var(--gold) !important; }
.flash-dismiss { background: none; border: none; cursor: pointer; color: var(--muted-foreground); opacity: 0.7; padding: 0; font-size: 1.25rem; line-height: 1; transition: color 0.15s, opacity 0.15s; }
.flash-dismiss:hover { opacity: 1; color: var(--foreground); }
@keyframes toast-slide-in { from { opacity: 0; transform: translateY(-1rem) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---- Quantity stepper ---- */
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty-stepper button {
  padding: 0.5rem 0.875rem;
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 1rem;
  transition: color 150ms;
}
.qty-stepper button:hover { color: var(--foreground); }
.qty-stepper__val { width: 2.25rem; text-align: center; font-size: 0.875rem; }

/* ---- Order timeline ---- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline__item { display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.75rem; }
.timeline__dot-col { display: flex; flex-direction: column; align-items: center; }
.timeline__dot {
  width: 1.75rem; height: 1.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.timeline__dot--done { border-color: var(--gold); background-color: oklch(0.82 0.11 85 / 0.15); color: var(--gold); }
.timeline__line { width: 1px; flex: 1; background-color: var(--border); }
.timeline__line--done { background-color: oklch(0.82 0.11 85 / 0.5); }
.timeline__content { padding-bottom: 1.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.timeline__content--active { color: var(--foreground); }

/* ---- Admin tabs ---- */
.admin-tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.admin-tab {
  flex-shrink: 0;
  border-bottom: 2px solid transparent;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 150ms, border-color 150ms;
}
.admin-tab:hover { color: var(--foreground); }
.admin-tab--active { border-color: var(--gold); color: var(--foreground); }

/* ---- Misc utils ---- */
.inline-flex { display: inline-flex; }
.block { display: block; }
.pointer-events-none { pointer-events: none; }
.cursor-not-allowed { cursor: not-allowed; }
.opacity-40 { opacity: 0.4; }
.select-none { user-select: none; }
.break-all { word-break: break-all; }
.h-px-line { height: 1px; flex: 1; background-color: var(--border); }
.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; }

/* ---- Toggle switch ---- */
.switch { position: relative; display: inline-block; width: 2.75rem; height: 1.5rem; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__slider {
  position: absolute; inset: 0;
  background-color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 200ms;
}
.switch__slider::before {
  content: '';
  position: absolute;
  width: 1rem; height: 1rem;
  left: 0.2rem; top: 50%;
  transform: translateY(-50%);
  background-color: var(--muted-foreground);
  border-radius: 9999px;
  transition: transform 200ms, background-color 200ms;
}
.switch input:checked + .switch__slider { background-color: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch__slider::before { transform: translate(1.25rem, -50%); background-color: white; }

/* ---- Select dropdown ---- */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* ---- Page wrapper ---- */
.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

@keyframes page-entrance {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-main {
  flex: 1;
  animation: page-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Bottom Navigation (Mobile Only) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 9999;
  padding: 0 0.5rem;
  box-shadow: 0 -10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Make sure active theme color is respected in light mode */
html.light .mobile-bottom-nav {
  background-color: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
html.light .mobile-bottom-nav__item {
  color: #555;
}
html.light .mobile-bottom-nav__item:hover,
html.light .mobile-bottom-nav__item:focus,
html.light .mobile-bottom-nav__item.active {
  color: var(--gold);
}

.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 500;
  gap: 0.25rem;
  transition: color 150ms;
}

.mobile-bottom-nav__item svg {
  transition: transform 150ms;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item:focus,
.mobile-bottom-nav__item.active {
  color: var(--gold);
}

.mobile-bottom-nav__item:active svg {
  transform: scale(0.9);
}

.mobile-cart-badge {
  position: absolute;
  top: 0.25rem;
  right: 25%;
  min-width: 0.875rem;
  height: 0.875rem;
  padding: 0 0.125rem;
  border-radius: 99px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.55rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Hide on desktop, show only on mobile */
@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}
@media (max-width: 767px) {
  /* Prevent content overlap with bottom nav bar */
  body {
    padding-bottom: 3.5rem !important;
  }
  /* Reduce top bar height */
  .site-header__inner {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 1rem !important;
    position: relative;
    height: 3rem;
  }
  /* Center logo absolutely */
  .site-header__logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.125rem;
    margin: 0;
  }
  /* Hide top header actions that are duplicated in the bottom nav */
  .site-header__actions .cart-btn,
  .site-header__actions #mobile-nav-toggle,
  .site-header__actions button[onclick="toggleTheme(event)"] {
    display: none !important;
  }
}

/* ---- Homepage Slideshow Carousel ---- */
.slideshow-container {
  max-width: 72rem;
  margin: 0 auto 3rem auto;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  aspect-ratio: 1 / 1;
  background-color: #111;
}
@media (min-width: 768px) {
  .slideshow-container {
    aspect-ratio: 16 / 10;
    max-height: 640px;
  }
}
.slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease-in-out;
  z-index: 1;
}
.slide-item.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
}
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, opacity 150ms;
  opacity: 0;
  z-index: 10;
}
.slideshow-container:hover .slide-arrow {
  opacity: 1;
}
.slide-arrow:hover {
  background: var(--gold);
  color: var(--gold-foreground);
}
.slide-arrow-prev { left: 1rem; }
.slide-arrow-next { right: 1rem; }

.slide-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.slide-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 150ms, transform 150ms;
}
.slide-dot.active {
  background: var(--gold);
  transform: scale(1.2);
}
