/* ── shared.css — PawMart Veterinary Store ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2d7a4f;
  --primary-dark: #1e5c3a;
  --accent: #f59e0b;
  --bg: #f0faf4;
  --white: #ffffff;
  --text: #1a2e1e;
  --muted: #5a7a62;
  --border: #cde8d6;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 12px;
}

body {
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── PROMO STRIP ── */
.promo-strip {
  background: var(--accent);
  color: var(--text);
  text-align: center;
  padding: 11px 24px;
  font-weight: 700;
  font-size: 0.92rem;
}

/* ── NAVBAR ── */
nav {
  background: var(--primary);
  color: var(--white);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(45,122,79,.4);
  gap: 16px;
}
.nav-brand {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.nav-brand span { color: var(--accent); }
.nav-search {
  flex: 1;
  max-width: 400px;
  display: flex;
}
.nav-search input {
  flex: 1;
  padding: 9px 14px;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.92rem;
  outline: none;
}
.nav-search button {
  padding: 9px 16px;
  background: var(--accent);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav-actions a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 0.9rem;
}
.cart-btn {
  background: var(--accent);
  color: var(--text) !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
#cart-count {
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  padding: 1px 6px;
  font-size: 0.73rem;
  font-weight: 800;
  margin-left: 4px;
}

/* ── SECTION TITLE ── */
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
}

/* ── CART SIDEBAR ── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
}
.cart-overlay.open { display: block; }
.cart-panel {
  position: fixed;
  top: 0; right: -440px;
  width: 420px;
  height: 100%;
  background: var(--white);
  z-index: 201;
  padding: 24px;
  overflow-y: auto;
  transition: right .3s ease;
  display: flex;
  flex-direction: column;
}
.cart-panel.open { right: 0; }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.cart-header h2 { font-size: 1.2rem; font-weight: 800; }
.close-cart {
  background: var(--bg);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 1.05rem;
  cursor: pointer;
  font-weight: 800;
}
.cart-items { flex: 1; }
.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item-icon { font-size: 2.2rem; width: 52px; text-align: center; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; }
.cart-item-price { color: var(--primary); font-weight: 700; margin-top: 4px; font-size: 0.95rem; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  width: 26px; height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.remove-item { color: var(--danger); cursor: pointer; font-size: 0.8rem; margin-top: 4px; font-weight: 600; }
.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.cart-empty div { font-size: 3.5rem; margin-bottom: 12px; }
.cart-summary {
  border-top: 2px solid var(--border);
  padding-top: 20px;
  margin-top: 16px;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.93rem; }
.summary-row.total { font-weight: 800; font-size: 1.08rem; }
.checkout-btn {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.97rem;
  cursor: pointer;
  margin-top: 16px;
  transition: background .2s;
}
.checkout-btn:hover { background: var(--primary-dark); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 32px; right: 32px;
  background: #1a2e1e;
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 500;
  opacity: 0;
  transform: translateY(16px);
  transition: all .3s;
  pointer-events: none;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── FOOTER ── */
footer {
  background: #0d1f12;
  color: #94a3b8;
  padding: 48px 24px 24px;
  margin-top: 48px;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  border-top: 1px solid #1e2f22;
  padding-top: 20px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  nav { padding: 0 14px; }
  .nav-search { display: none; }
  .cart-panel { width: 100%; right: -100%; }
}
