/* ==========================================================================
   Sukhayurveda — shared stylesheet (plain CSS, no build step)
   ========================================================================== */

:root {
  --brand-25: #F7F7F2;
  --brand-50: #F4F2EA;
  --brand-100: #E7E4D6;
  --brand-200: #C9D3C4;
  --brand-300: #9AAE93;
  --brand-500: #3F5C3A;
  --brand-600: #2D4A3E;
  --brand-700: #233A31;
  --brand-800: #1B2E26;
  --clay-500: #B4763A;
  --clay-600: #8F5C2B;
  --ink-900: #1C2420;
  --ink-700: #3B443E;
  --ink-500: #66716A;
  --ink-300: #9AA39C;
  --cream: #FAF8F2;
  --white: #FFFFFF;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28,36,32,0.06), 0 1px 8px rgba(28,36,32,0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  background: var(--cream);
  color: var(--ink-900);
  line-height: 1.5;
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; margin: 0; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.announce {
  background: var(--brand-800);
  color: var(--brand-200);
  font-size: 0.75rem;
  text-align: center;
  padding: 6px 12px;
}

.site-header {
  background: rgba(250,248,242,0.97);
  border-bottom: 1px solid var(--brand-100);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.logo {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  color: var(--brand-700);
  font-weight: 600;
  white-space: nowrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
}
.search-box input {
  width: 100%;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(28,36,32,0.12);
  font-size: 0.9rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.header-actions a, .header-actions button {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-700);
  border-radius: 6px;
}
.header-actions a:hover, .header-actions button:hover { color: var(--brand-700); background: var(--brand-50); }

.main-nav {
  border-top: 1px solid var(--brand-100);
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.65rem 0;
}
.main-nav a { white-space: nowrap; color: var(--ink-700); }
.main-nav a:hover, .main-nav a.active { color: var(--brand-700); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--brand-600); color: white; }
.btn-primary:hover { background: var(--brand-700); }
.btn-primary:disabled { background: var(--brand-200); color: var(--ink-300); cursor: not-allowed; }
.btn-secondary { background: var(--white); color: var(--brand-700); border-color: var(--brand-200); }
.btn-secondary:hover { background: var(--brand-50); }
.btn-danger { background: #dc2626; color: white; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ---------- Cards / Grid ---------- */
.section { padding: 2.5rem 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .5rem;}
.section-heading h2 { font-size: 1.5rem; color: var(--ink-900); }
.section-heading p { font-size: .875rem; color: var(--ink-500); margin: .25rem 0 0; }
.view-all { font-size: .875rem; color: var(--brand-700); font-weight: 500; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.grid-categories { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 1024px) { .grid-categories { grid-template-columns: repeat(6, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid rgba(28,36,32,0.08);
  border-radius: var(--radius);
  padding: 0.9rem;
}
.card:hover { border-color: var(--brand-200); box-shadow: var(--shadow); }

.category-card { text-align: center; }
.category-card img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 0.6rem; background: var(--brand-50);
}
.category-card .name { font-size: 0.875rem; font-weight: 500; }

.product-card img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px;
  background: var(--brand-50); margin-bottom: 0.75rem;
}
.product-card .brand-tag { font-size: 0.75rem; color: var(--ink-500); }
.product-card .name { font-size: 0.9rem; font-weight: 500; margin: 0.15rem 0 0.4rem; }
.product-card .rating {
  display: inline-flex; align-items: center; gap: 3px; background: var(--brand-600);
  color: white; font-size: 0.7rem; font-weight: 600; padding: 1px 6px; border-radius: 4px;
}
.price-row { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.5rem 0; }
.price-row .price { font-size: 1.05rem; font-weight: 600; }
.price-row .mrp { font-size: 0.8rem; color: var(--ink-300); text-decoration: line-through; }
.price-row .discount { font-size: 0.8rem; color: var(--clay-600); font-weight: 500; }
.rx-note { font-size: 0.7rem; color: #b45309; margin: 0.2rem 0; }

/* ---------- Hero ---------- */
.hero { background: var(--brand-50); border-bottom: 1px solid var(--brand-100); padding: 2.5rem 0; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
.hero h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 0.75rem; }
.hero p { color: var(--ink-700); margin-bottom: 1.25rem; max-width: 420px; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero img { border-radius: 12px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.trust-badges { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.75rem; }
@media (min-width: 500px) { .trust-badges { grid-template-columns: repeat(4,1fr);} }
.trust-badges span { font-size: 0.75rem; color: var(--ink-700); }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.6rem 0.8rem; border-radius: 6px;
  border: 1px solid rgba(28,36,32,0.15); font-size: 0.9rem; font-family: inherit;
}
.field .hint { font-size: 0.75rem; color: var(--ink-500); margin-top: 0.3rem; }
p.hint { font-size: 0.8rem; color: var(--ink-500); margin-top: 0.4rem; }
.field .error { font-size: 0.75rem; color: #dc2626; margin-top: 0.3rem; }
p.error { font-size: 0.8rem; color: #dc2626; margin-top: 0.4rem; }
p.success-text { font-size: 0.8rem; color: var(--brand-600); margin-top: 0.4rem; }

.tabs { display: inline-flex; border: 1px solid rgba(28,36,32,0.15); border-radius: 8px; padding: 3px; margin-bottom: 1.25rem; }
.tabs button { border: none; background: none; padding: 0.5rem 1rem; font-size: 0.875rem; border-radius: 6px; cursor: pointer; }
.tabs button.active { background: var(--brand-600); color: white; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; border: 1px solid transparent;
}
.badge-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-neutral { background: rgba(28,36,32,0.05); color: var(--ink-700); border-color: rgba(28,36,32,0.1); }
.badge-brand { background: #FBF3EC; color: var(--clay-600); border-color: #F3DFCC; }

/* ---------- Layout helpers ---------- */
.two-col { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 360px; } }
.panel { background: var(--white); border: 1px solid rgba(28,36,32,0.08); border-radius: var(--radius); padding: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--ink-500); font-size: 0.875rem; }
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-500); padding: 0.75rem 1rem; border-bottom: 1px solid rgba(28,36,32,0.08); }
td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(28,36,32,0.06); vertical-align: middle; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-800); color: var(--brand-200); margin-top: 3rem; padding: 2.5rem 0 1.5rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2,1fr); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(5,1fr);} }
.footer-grid h3 { color: white; font-size: 0.875rem; margin-bottom: 0.75rem; }
.footer-grid a { display: block; color: var(--brand-200); font-size: 0.875rem; margin-bottom: 0.5rem; }
.footer-bottom { text-align: center; font-size: 0.75rem; color: var(--brand-300); margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--brand-700); }

/* ---------- Toast ---------- */
#toast-container {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 0.5rem; width: calc(100% - 2rem); max-width: 360px;
}
.toast {
  background: var(--brand-600); color: white; padding: 0.75rem 1rem; border-radius: 8px;
  font-size: 0.875rem; text-align: center; box-shadow: var(--shadow);
}
.toast.error { background: #dc2626; }
.toast.info { background: var(--ink-900); }

/* ---------- Cart page ---------- */
.cart-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(28,36,32,0.08); }
.cart-item img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: var(--brand-50); }
.qty-control { display: inline-flex; align-items: center; border: 1px solid rgba(28,36,32,0.15); border-radius: 6px; }
.qty-control button { width: 28px; height: 28px; border: none; background: none; cursor: pointer; font-size: 1rem; }
.qty-control span { width: 28px; text-align: center; font-size: 0.875rem; }

/* ---------- Admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; background: var(--brand-800); color: var(--brand-200); flex-shrink: 0; min-height: 100vh;
  display: flex; flex-direction: column; padding: 1.25rem 0;
}
.admin-sidebar .brand { padding: 0 1.25rem 1rem; border-bottom: 1px solid var(--brand-700); margin-bottom: .5rem; }
.admin-sidebar .brand a { color: white; font-family: Georgia, serif; font-size: 1.1rem; }
.admin-sidebar a.nav-link { display: block; padding: 0.6rem 1.25rem; font-size: 0.875rem; color: var(--brand-200); }
.admin-sidebar a.nav-link:hover, .admin-sidebar a.nav-link.active { background: var(--brand-700); color: white; }
.admin-main { flex: 1; padding: 2rem; min-width: 0; }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2,1fr); margin-bottom: 2rem; }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(6,1fr);} }
.stat-card { background: white; border: 1px solid rgba(28,36,32,0.08); border-radius: 10px; padding: 1rem; }
.stat-card .value { font-family: Georgia, serif; font-size: 1.5rem; }
.stat-card .label { font-size: 0.75rem; color: var(--ink-500); margin-top: 0.25rem; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(28,36,32,0.4); display: flex;
  align-items: center; justify-content: center; z-index: 150; padding: 1rem;
}
.modal-box { background: white; border-radius: 10px; padding: 1.5rem; width: 100%; max-width: 420px; max-height: 85vh; overflow-y: auto; }
.hidden { display: none !important; }

/* ---------- Misc ---------- */
.skeleton { background: rgba(28,36,32,0.08); border-radius: 6px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
