/* ── The Yogurt Shop — shared styles ─────────────────────── */

:root {
  /* Brand green (logo background) */
  --green:        #4CB832;
  --green-light:  #E6F5DF;
  --green-dark:   #349024;
  --green-deep:   #1E5C12;

  /* Logo dot accent colors */
  --dot-red:      #E52222;
  --dot-yellow:   #F5C800;
  --dot-blue:     #2255CC;
  --dot-purple:   #8833CC;
  --dot-ltgreen:  #66CC33;

  /* Surfaces */
  --bg:           #F6FBF4;
  --surface:      #FFFFFF;
  --surface-2:    #EEF7EA;
  --border:       #D0EACA;

  /* Text */
  --text:         #1A2B16;
  --text-muted:   #4A6844;
  --text-light:   #8AAE84;

  /* Status */
  --success:      #22C55E;
  --danger:       #EF4444;

  /* Shadows */
  --shadow-sm:    0 1px 4px rgba(26,43,22,.09);
  --shadow-md:    0 4px 18px rgba(26,43,22,.13);
  --shadow-lg:    0 8px 36px rgba(26,43,22,.18);

  /* Radii */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   22px;
  --r-xl:   32px;
  --r-pill: 9999px;

  --nav-h: 70px;
  --font-body:    'Nunito', sans-serif;
  --font-display: 'Pacifico', cursive;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/* ── POLKA DOT BAND ──────────────────────────────────────── */
/* Reusable decorative dot strip */
.dot-band {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  overflow: hidden;
  justify-content: center;
  flex-wrap: nowrap;
}
.dot-band .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-band .dot:nth-child(5n+1) { background: var(--dot-red); }
.dot-band .dot:nth-child(5n+2) { background: var(--dot-yellow); }
.dot-band .dot:nth-child(5n+3) { background: var(--dot-blue); }
.dot-band .dot:nth-child(5n+4) { background: var(--dot-purple); }
.dot-band .dot:nth-child(5n+5) { background: var(--dot-ltgreen); }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(246,251,244,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  text-decoration: none;
}
.nav-logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--green-dark);
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
}
.nav-links a {
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: background .18s, color .18s;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--green-light);
  color: var(--green-dark);
}
.nav-spacer { flex: 1; }
.nav-admin-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  transition: border-color .18s, color .18s;
  cursor: pointer;
}
.nav-admin-link:hover { border-color: var(--green); color: var(--green-dark); }

/* mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--r-sm);
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: var(--surface);
  z-index: 99;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  gap: 0.4rem;
  border-top: 2px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 0.9rem 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: var(--r-md);
  color: var(--text);
  border-bottom: 1.5px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { background: var(--green-light); color: var(--green-dark); }

@media (max-width: 640px) {
  .nav-links, .nav-admin-link { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  transition: transform .15s, box-shadow .15s, background .15s;
  cursor: pointer;
  border: none;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(76,184,50,.35);
}
.btn-primary:hover { background: var(--green-dark); box-shadow: 0 6px 20px rgba(76,184,50,.42); }
.btn-outline {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green);
}
.btn-outline:hover { background: var(--green-light); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.83rem; }
.btn-danger { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16A34A; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
}
.page-header .eyebrow {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.75rem;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400; /* Pacifico is always bold */
  line-height: 1.15;
  color: var(--green-dark);
  margin-bottom: 0.6rem;
}
.page-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── FLAVOR CARDS ────────────────────────────────────────── */
.flavor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.flavor-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.flavor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.flavor-card-img {
  height: 150px;
  width: 100%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.flavor-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flavor-featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--dot-yellow);
  color: #1A2B16;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-pill);
}
.flavor-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.flavor-card-body h3 {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
  color: var(--text);
  line-height: 1.2;
}
.flavor-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

/* ── TOPPING CHIPS ───────────────────────────────────────── */
.topping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.85rem;
  padding: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.topping-chip {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color .18s, background .18s, color .18s;
  cursor: default;
}
.topping-chip:hover {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  margin-top: auto;
  background: var(--green-deep);
  color: rgba(230,255,220,.75);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
footer .footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
footer .footer-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}
footer .footer-logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}
footer .footer-sub {
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
footer .footer-links a { color: rgba(230,255,220,.65); }
footer .footer-links a:hover { color: #fff; }
footer .footer-copy { font-size: 0.78rem; opacity: .45; }

/* ── ADMIN ───────────────────────────────────────────────── */
.admin-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  width: 100%;
}
.admin-login-card {
  max-width: 380px;
  margin: 4rem auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border);
  text-align: center;
}
.admin-login-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--green-dark);
  margin-bottom: 0.3rem;
}
.admin-login-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.form-group {
  text-align: left;
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color .18s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--green); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-error {
  color: #EF4444;
  font-size: 0.83rem;
  font-weight: 700;
  margin-top: 0.5rem;
}
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.admin-tab {
  padding: 0.65rem 1.25rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-radius: var(--r-md) var(--r-md) 0 0;
  border: 2px solid transparent;
  border-bottom: none;
  cursor: pointer;
  margin-bottom: -2px;
  transition: background .15s, color .15s;
}
.admin-tab.active {
  background: var(--surface);
  border-color: var(--border);
  border-bottom-color: var(--surface);
  color: var(--green-dark);
}
.admin-tab:not(.active):hover { background: var(--surface-2); color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-section-header h3 { font-size: 1.1rem; font-weight: 900; }
.admin-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.admin-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.admin-item-info { flex: 1; min-width: 0; }
.admin-item-info strong {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-item-info span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-pill);
}
.badge-featured   { background: #FEF08A; color: #713F12; }
.badge-available  { background: #DCFCE7; color: #166534; }
.badge-unavailable{ background: #FEE2E2; color: #991B1B; }

/* modal overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,43,22,.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 1.25rem;
  color: var(--green-dark);
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.color-preview {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  vertical-align: middle;
  margin-left: 0.4rem;
}

/* ── UTILITY ─────────────────────────────────────────────── */
.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;
}
.section { padding: 3rem 1.5rem; }
.container { max-width: 1100px; margin: 0 auto; }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  background: var(--green-deep);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: transform .25s, opacity .25s;
  max-width: 320px;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-error { background: #B91C1C; }
.toast.toast-warning { background: #92400E; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .flavor-grid  { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: .85rem; padding: 1rem; }
  .topping-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); padding: 1rem; }
  .admin-item   { flex-direction: column; align-items: flex-start; }
}
