/* ═══════════════════════════════════════════════════════════════
   Sanika Return Gifts · Global Stylesheet
   Aesthetic: Playful toy shop — warm, bright, fun but not chaotic
   Fonts: Fredoka (headings) + Nunito (body)
   Mobile-first, touch-optimised
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --clr-bg:        #fffaf4;
  --clr-surface:   #ffffff;
  --clr-primary:   #ff6b35;
  --clr-primary-h: #e8541e;
  --clr-secondary: #ffd166;
  --clr-accent:    #06d6a0;
  --clr-blue:      #118ab2;
  --clr-text:      #2d2d2d;
  --clr-muted:     #888;
  --clr-border:    #ede8df;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;

  --shadow-card:       0 4px 20px rgba(0,0,0,.08);
  --shadow-card-hover: 0 12px 40px rgba(255,107,53,.18);

  --font-head: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;

  --max-w:    1200px;
  --header-h: 60px;

  /* touch targets — minimum 44px per Apple/Google guidelines */
  --tap-min: 44px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* smooth momentum scrolling on iOS */
  -webkit-overflow-scrolling: touch;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
main { flex: 1; }

/* Remove blue tap flash on Android */
* { -webkit-tap-highlight-color: transparent; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--clr-surface);
  border-bottom: 2px solid var(--clr-border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-text);
  min-height: var(--tap-min);
}
.logo-icon { font-size: 1.5rem; }
.logo em { color: var(--clr-primary); font-style: normal; }
.nav-link {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 600;
  color: var(--clr-text);
  padding: .5rem .9rem;
  min-height: var(--tap-min);
  display: flex; align-items: center;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--clr-secondary); }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #fff3e0 0%, #ffecd2 50%, #fff0f5 100%);
  overflow: hidden;
  border-bottom: 2px solid var(--clr-border);
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 7vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--clr-text);
}
.hero-accent { color: var(--clr-primary); }
.hero-sub {
  margin-top: .75rem;
  font-size: clamp(.9rem, 3.5vw, 1.1rem);
  color: #555;
  max-width: 420px;
  line-height: 1.6;
}
.hero-bubbles { display: flex; gap: .75rem; flex-wrap: wrap; flex-shrink: 0; }
.bubble {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--clr-surface);
  box-shadow: var(--shadow-card);
  font-size: 1.6rem;
  animation: float 3s ease-in-out infinite;
}
.b1{animation-delay:0s} .b2{animation-delay:.4s}
.b3{animation-delay:.8s} .b4{animation-delay:1.2s} .b5{animation-delay:1.6s}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* ── FILTER BAR ── */
.filter-bar-wrap {
  background: var(--clr-surface);
  border-bottom: 2px solid var(--clr-border);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}
.filter-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .75rem 1rem;
  display: grid;
  /* mobile: 2 columns */
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

/* search spans full width */
.filter-group.search-group { grid-column: 1 / -1; }

/* action buttons row */
.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: .5rem;
}

.filter-input,
.filter-select {
  font-family: var(--font-body);
  font-size: 1rem;          /* prevent iOS auto-zoom (must be ≥16px) */
  padding: .6rem .85rem;
  min-height: var(--tap-min);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  color: var(--clr-text);
  outline: none;
  transition: border-color .2s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.filter-input:focus,
.filter-select:focus { border-color: var(--clr-primary); }

/* price / age pair inside one grid cell */
.price-group {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.price-group .filter-input { flex: 1; min-width: 0; }
.price-sep { color: var(--clr-muted); font-size: .85rem; flex-shrink: 0; }

.btn-filter {
  flex: 1;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  padding: .6rem 1rem;
  min-height: var(--tap-min);
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .2s, transform .1s;
  touch-action: manipulation;
}
.btn-filter:active { background: var(--clr-primary-h); transform: scale(.97); }

.btn-clear {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  padding: .6rem 1rem;
  min-height: var(--tap-min);
  background: transparent;
  color: var(--clr-muted);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s, color .2s;
  touch-action: manipulation;
}
.btn-clear:active { border-color: var(--clr-primary); color: var(--clr-primary); }

/* ── CATALOG SECTION ── */
.catalog-section { padding: 1.5rem 1rem 4rem; }
.catalog-inner { max-width: var(--max-w); margin: 0 auto; }

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
  gap: .85rem;
}

/* ── PRODUCT CARD ── */
.product-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  transition: transform .25s, box-shadow .25s;
  /* ensures whole card is a tap target */
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.product-card:active {
  transform: scale(.97);
  box-shadow: var(--shadow-card);
}
.card-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f9f4ee;
}
.card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.product-card:hover .card-img { transform: scale(1.06); }
.card-img-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #ffecd2, #fff0f5);
}
.card-body {
  padding: .65rem .75rem .8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.card-name {
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-age  { font-size: .72rem; color: var(--clr-blue); font-weight: 600; }
.card-price {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin-top: auto;
}

/* ── LOAD MORE ── */
.load-more-wrap { text-align: center; margin-top: 2rem; }
.btn-load-more {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  padding: .8rem 2rem;
  min-height: var(--tap-min);
  width: 100%;
  max-width: 360px;
  background: var(--clr-secondary);
  color: var(--clr-text);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,209,102,.4);
  transition: background .2s, transform .1s;
  touch-action: manipulation;
}
.btn-load-more:active { background: #f5c200; transform: scale(.97); }

/* ── SPINNER ── */
.spinner-wrap { display: flex; justify-content: center; padding: 3rem 0; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--clr-border);
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY / ERROR STATE ── */
.empty-state, .error-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--clr-muted);
}
.empty-icon { font-size: 3rem; display: block; margin-bottom: .75rem; }

.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   ABOUT US SECTION
   ══════════════════════════════════════════════════════════════ */
.about-section {
  background: linear-gradient(135deg, #fff8f0 0%, #fff0fa 100%);
  border-top: 2px solid var(--clr-border);
  padding: 3rem 1rem;
}
.about-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.about-heading {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: .5rem;
}
.about-heading span { color: var(--clr-primary); }
.about-tagline {
  font-size: clamp(.9rem, 3vw, 1.05rem);
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 560px;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.about-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.about-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.about-card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: .25rem;
}
.about-card-body {
  font-size: .9rem;
  color: #555;
  line-height: 1.5;
}
.about-card-body a {
  color: var(--clr-primary);
  font-weight: 700;
}

/* Map embed */
.about-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--clr-border);
  line-height: 0;
}
.about-map iframe {
  width: 100%;
  height: 220px;
  border: none;
}

/* ══════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ══════════════════════════════════════════════════════════════ */
.product-detail-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 1.25rem;
  font-size: .95rem;
  min-height: var(--tap-min);
  transition: opacity .2s;
}
.back-link:active { opacity: .6; }

/* Skeleton */
.product-skeleton { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.skel {
  background: linear-gradient(90deg, #f0ebe3 25%, #faf6f0 50%, #f0ebe3 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-gallery { width: 100%; max-width: 460px; aspect-ratio: 1/1; }
.skel-info    { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 1rem; padding-top: .5rem; }
.skel-title   { height: 44px; border-radius: 8px; }
.skel-price   { height: 32px; width: 130px; border-radius: 8px; }
.skel-line    { height: 16px; border-radius: 6px; }
.skel-line.short { width: 60%; }

/* Detail layout */
.product-detail {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Gallery */
.gallery { flex: 0 0 auto; width: 100%; max-width: 460px; }
.gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f9f4ee;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--clr-border);
}
.main-img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }

.thumb-strip {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--clr-border);
  cursor: pointer;
  transition: border-color .2s;
  flex-shrink: 0;
  touch-action: manipulation;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { border-color: var(--clr-primary); }

/* Info panel */
.product-info { flex: 1 1 260px; }
.product-name {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-text);
  margin-bottom: .65rem;
}
.product-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.badge {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 700;
}
.badge-age        { background: #dff4ff; color: var(--clr-blue); }
.badge-brand      { background: #fff0e0; color: var(--clr-primary); }
.badge-collection { background: #e8faf5; color: #059669; }

.product-price-block {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: 1.25rem;
}
.price-label {
  font-size: .82rem;
  color: var(--clr-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.product-price {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  color: var(--clr-primary);
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  font-size: .9rem;
  color: #555;
  margin-bottom: 1.75rem;
}
.meta-row    { display: flex; gap: .5rem; }
.meta-label  { font-weight: 700; color: var(--clr-text); min-width: 90px; }

.product-cta {
  background: linear-gradient(135deg, #fff3e0, #ffecd2);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  border: 2px dashed var(--clr-secondary);
}
.cta-note {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-text);
}
.cta-phone {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .6rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-primary);
  min-height: var(--tap-min);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--clr-text);
  color: #ccc;
  padding: 1.25rem 1rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
}
.footer-logo { font-family: var(--font-head); color: var(--clr-secondary); font-size: .95rem; }

/* ══════════════════════════════════════════════════════════════
   TABLET  ≥ 600px
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  :root { --header-h: 68px; }

  .filter-bar { grid-template-columns: 1fr 1fr 1fr; }
  .filter-group.search-group { grid-column: 1 / -1; }

  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }

  .card-name  { font-size: .95rem; }
  .card-price { font-size: 1.1rem; }

  .about-cards { grid-template-columns: 1fr 1fr; }
  .about-map iframe { height: 280px; }
}

/* ══════════════════════════════════════════════════════════════
   DESKTOP  ≥ 900px
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .hero-inner    { padding: 4rem 1.5rem 3.5rem; }
  .hero-bubbles  { display: flex; }

  .filter-bar {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto auto;
    align-items: center;
  }
  .filter-group.search-group { grid-column: auto; }
  .filter-actions { grid-column: auto; flex-direction: row; }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.4rem; }

  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--clr-secondary);
  }

  .card-name  { font-size: 1rem; }
  .card-price { font-size: 1.15rem; }

  .about-cards { grid-template-columns: repeat(4, 1fr); }
  .about-map iframe { height: 320px; }

  .gallery { width: 460px; }
  .product-detail { flex-wrap: nowrap; }

  .catalog-section { padding: 2.5rem 1.5rem 4rem; }
}


/* ══════════════════════════════════════════════════════════════
   PATCHES (applied after base styles)
   ══════════════════════════════════════════════════════════════ */

/* Issue #2 — filter bar should NOT be sticky, just normal flow */
.filter-bar-wrap {
  position: static !important;
}

/* Issue #3 — SVG logo in header */
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.logo-sub {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 600;
  color: var(--clr-muted);
  line-height: 1;
}

/* Issue #1 — nav spacing so Toys / About don't crowd logo */
.header-nav {
  display: flex;
  gap: .1rem;
  align-items: center;
}

/* Issue #4 — map container */
.about-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--clr-border);
  margin-top: 1.5rem;
}
.map-open-link {
  display: block;
  text-align: center;
  padding: .75rem 1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--clr-primary);
  background: var(--clr-bg);
  border-bottom: 2px solid var(--clr-border);
  min-height: var(--tap-min);
}
.about-map iframe {
  width: 100%;
  height: 240px;
  border: none;
  display: block;
}
@media (min-width: 600px) { .about-map iframe { height: 320px; } }


/* ── BUBBLE LOGO (replaces SVG) ── */
.logo-sanika {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: .04em;
  color: #e8170a;
  /* white outline — the bubbly shop-sign effect */
  -webkit-text-stroke: 4px #ffffff;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
    /* soft red glow behind for depth */
     0 0 12px rgba(232,23,10,.15);
  line-height: 1;
}
.logo-sub {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  color: var(--clr-muted);
  line-height: 1;
  margin-top: 2px;
}
/* stack logo text vertically */
.logo {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}