/* ===== Amma's Pickles — designed to be easy to read for everyone ===== */
:root {
  --bg: #fffaf0;
  --surface: #ffffff;
  --text: #2a1a0e;
  --muted: #5a4535;
  --brand: #8a2f17;        /* deep chilli red */
  --brand-dark: #6a220f;
  --accent: #e8a33d;       /* mango yellow */
  --accent-soft: #fdecc8;
  --green: #1d7a3a;
  --green-dark: #155c2b;
  --border: #e6d6bf;
  --focus: #1a56db;
  --radius: 14px;
  --base: 20px;            /* generous default text size */
}
html[data-text-size="large"]  { --base: 23px; }
html[data-text-size="xlarge"] { --base: 26px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: rgba(232,163,61,.35); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
body.no-scroll { overflow: hidden; }
html { font-size: var(--base); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Malayalam", "Noto Sans Devanagari", Arial, sans-serif;
  line-height: 1.6;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", "Noto Sans Malayalam", "Noto Sans Devanagari", serif; line-height: 1.2; color: var(--brand-dark); }
h1 { font-size: 2.3rem; margin: .3em 0 .4em; }
h2 { font-size: 1.9rem; margin: 0 0 .3em; }
h3 { font-size: 1.25rem; margin: 0 0 .3em; }
p { margin: 0 0 .8em; }
a { color: var(--brand); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Strong, clearly visible keyboard focus */
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: .6em 1em; z-index: 100;
}
.skip-link:focus { left: 16px; top: 8px; }

/* ===== Top bar: language + text size ===== */
.top-bar { background: var(--brand-dark); color: #fff; }
.top-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.2rem; padding-top: .4rem; padding-bottom: .4rem; }
.lang-switch, .size-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
#lang-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.bar-label { font-size: .85rem; font-weight: 600; }
.size-btn, .lang-btn {
  min-width: 48px; min-height: 44px; padding: 0 .7em;
  font: inherit; font-weight: 700; font-size: 18px;
  background: transparent; color: #fff;
  border: 2px solid #fff; border-radius: 8px; cursor: pointer;
}
.lang-btn { font-size: 17px; }
.size-btn--lg { font-size: 22px; }
.size-btn--xl { font-size: 26px; }
.size-btn[aria-pressed="true"], .lang-btn[aria-pressed="true"] { background: #fff; color: var(--brand-dark); }

/* ===== Header ===== */
.site-header { position: relative; background: var(--surface); border-bottom: 3px solid var(--accent); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: .6rem; padding-bottom: .6rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-name { font-family: Georgia, serif; font-size: 1.6rem; font-weight: 700; color: var(--brand-dark); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.nav-list a {
  display: inline-block; padding: .45em .8em; min-height: 44px;
  font-weight: 600; text-decoration: none; color: var(--text); border-radius: 8px;
}
.nav-list a:hover { background: var(--accent-soft); color: var(--brand-dark); }

/* ===== Buttons (big tap targets) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 56px; padding: .6em 1.3em;
  font: inherit; font-weight: 700; text-decoration: none;
  border-radius: 12px; border: 3px solid transparent; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--brand-dark); border-color: var(--brand); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-whatsapp { background: var(--green); color: #fff; }
.btn-whatsapp:hover { background: var(--green-dark); }
.btn-block { width: 100%; }
.btn-big { font-size: 1.15rem; min-height: 64px; }

/* ===== Hero ===== */
.hero { background: linear-gradient(180deg, var(--accent-soft), var(--bg)); padding: 2.5rem 0 3rem; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.hero-kicker { font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.2rem; }

.jar-stack { display: flex; align-items: flex-end; justify-content: center; gap: 14px; height: 260px; }
.hero-jar {
  position: relative; width: 110px; height: 150px; border-radius: 24px;
  background: var(--jar); box-shadow: inset 12px 0 0 rgba(255,255,255,.18), 0 10px 20px rgba(90,40,10,.18);
}
.hero-jar::before { content: ""; position: absolute; left: 14%; right: 14%; top: -22px; height: 26px; background: #7a3b12; border-radius: 6px; }
.hero-jar::after { content: "AMMA'S"; position: absolute; left: 14%; right: 14%; top: 40%; padding: 8px 0; background: #fff7e6; color: #7a3b12; font: 700 14px Georgia, serif; text-align: center; border-radius: 6px; }
.hero-jar--big { width: 140px; height: 200px; }

/* ===== Pickles ===== */
.pickles { padding: 3rem 0; }
.section-lead { font-size: 1.1rem; color: var(--muted); }

.category-tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 1rem; }
.tab {
  min-height: 56px; padding: .5em 1.1em;
  font: inherit; font-weight: 700; color: var(--brand-dark);
  background: #fff; border: 3px solid var(--brand); border-radius: 999px; cursor: pointer;
}
.tab:hover { background: var(--accent-soft); }
.tab[aria-pressed="true"] { background: var(--brand); color: #fff; }
.tab-count { font-weight: 400; }

.result-count { font-weight: 600; color: var(--muted); }

.product-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 4px 12px rgba(90,40,10,.06);
}
.card-img { background: var(--tint, var(--accent-soft)); display: grid; place-items: center; padding: 1rem; }
.card-img svg { width: 140px; height: 140px; }
.card-body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-desc { color: var(--muted); flex: 1; }
.spice { margin-bottom: .3em; }
.spice strong { margin-left: .3em; }
html { scroll-padding-top: calc(var(--header-h, 90px) + 12px); }
.chilli { filter: grayscale(1); opacity: .3; }
.chilli.on { filter: none; opacity: 1; }
.price { margin-bottom: .9em; }
.amount { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.per { color: var(--muted); }

/* ===== About ===== */
.about { background: var(--accent-soft); padding: 3rem 0; }
.about-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.about p { font-size: 1.1rem; }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.promise-list li { background: #fff; padding: .8rem 1rem; border-radius: 12px; font-weight: 600; border: 2px solid var(--border); }

/* ===== Order ===== */
.order { padding: 3rem 0; }
.steps { font-size: 1.15rem; padding-left: 1.4em; margin: 1rem 0 1.5rem; }
.steps li { margin-bottom: .6rem; padding-left: .3em; }
.order-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.alt-name { font-size: 1.05rem; font-weight: 600; color: var(--green-dark); margin: -.1em 0 .5em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-weight: 400; }
.center { text-align: center; }

/* ===== Cart on product cards ===== */
.card.in-cart { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.card-img { position: relative; }
.in-cart-badge { position: absolute; top: .6rem; right: .6rem; background: var(--green); color: #fff; font-weight: 700; padding: .2em .7em; border-radius: 999px; font-size: .9rem; }
.qty { display: inline-flex; align-items: center; border: 3px solid var(--brand); border-radius: 12px; overflow: hidden; background: #fff; }
.qty-card { display: flex; width: 100%; }
.qty-btn { min-width: 56px; min-height: 52px; font: inherit; font-size: 1.6rem; font-weight: 700; line-height: 1; background: var(--accent-soft); color: var(--brand-dark); border: 0; cursor: pointer; }
.qty-btn:hover { background: var(--accent); }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.qty-num { flex: 1; min-width: 3ch; text-align: center; font-size: 1.3rem; font-weight: 800; }

/* ===== Sticky cart bar ===== */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); z-index: 20; background: #fff; border-top: 4px solid var(--green); box-shadow: 0 -6px 20px rgba(90,40,10,.15); }
.cart-bar[hidden] { display: none; }
.cart-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .6rem; padding-bottom: .6rem; flex-wrap: wrap; }
.cart-bar-summary { font-size: 1.15rem; font-weight: 800; }
body.has-cart { padding-bottom: 96px; }

/* ===== Bulk orders ===== */
.bulk-strip { background: var(--green-dark); color: #fff; }
.bulk-strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem 1rem; padding-top: .7rem; padding-bottom: .7rem; text-align: center; }
.bulk-strip-link { color: #fff; font-weight: 700; padding: .3em .9em; border: 2px solid #fff; border-radius: 999px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.bulk-strip-link:hover { background: #fff; color: var(--green-dark); }
.bulk { padding: 3rem 0; border-top: 4px dashed var(--accent); }
.bulk-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.bulk-note { display: inline-block; background: var(--accent-soft); border: 2px solid var(--accent); padding: .5em 1em; border-radius: 10px; font-weight: 700; font-size: 1.1rem; }

/* ===== Payment section ===== */
.payment { background: var(--accent-soft); padding: 3rem 0; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; margin-top: 1.2rem; }
.pay-card { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.pay-icon { font-size: 2.4rem; line-height: 1; margin-bottom: .4rem; }
.pay-card > p { color: var(--muted); }
.safety-note { margin-top: 1.5rem; background: #fff; border-left: 6px solid var(--green); padding: 1rem 1.2rem; border-radius: 8px; font-size: 1.05rem; }

/* ===== Checkout window ===== */
.checkout { width: min(640px, 100vw); max-width: 100vw; max-height: 100vh; max-height: 100dvh; padding: 0; border: 0; border-radius: 18px; background: var(--bg); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.checkout::backdrop { background: rgba(30,15,5,.6); }
.checkout-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; background: #fff; border-bottom: 3px solid var(--accent); }
.checkout-brand { font-family: Georgia, serif; font-weight: 700; color: var(--brand-dark); font-size: 1.1rem; }
.checkout-brand, .checkout-close { white-space: nowrap; }
.checkout-close { flex-shrink: 0; min-height: 48px; padding: 0 1em; font: inherit; font-weight: 700; background: #fff; border: 2px solid var(--text); border-radius: 10px; cursor: pointer; }
.checkout-body { padding: 1.2rem 1.3rem 1.6rem; }
.step-label { margin: 0; font-weight: 700; color: var(--green-dark); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.checkout-title { margin: .1em 0 .7em; font-size: 1.7rem; outline: none; }
.empty-cart { font-size: 1.2rem; }

.cart-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .8rem; }
.cart-item { background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: .9rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; }
.cart-item-info { display: flex; flex-direction: column; }
.cart-item-actions { display: flex; align-items: center; gap: 1rem; }
.link-btn { font: inherit; font-weight: 700; color: var(--brand); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: .4em .2em; min-height: 44px; }

.summary { background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 .8rem; }
.summary > div { display: flex; justify-content: space-between; gap: 1rem; padding: .25em 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; }
.summary-total { border-top: 2px dashed var(--border); margin-top: .3em; padding-top: .5em !important; font-size: 1.3rem; }
.summary-total dt { color: var(--text); font-weight: 800; }
.summary-total dd { color: var(--brand-dark); font-weight: 800; }
.hint { background: var(--accent-soft); border-radius: 10px; padding: .6em .9em; font-size: .95rem; }
.hint.good { background: #e3f3e7; color: var(--green-dark); font-weight: 700; }
.bulk-hint { background: #e3f3e7; border: 2px solid var(--green); }
.bulk-hint a { font-weight: 800; color: var(--green-dark); }
.checkout-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; margin-top: 1.2rem; }
.checkout-actions .btn { flex: 1 1 200px; }
.btn-place { font-size: 1.2rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3em; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1.1rem; padding: .6em .8em; min-height: 56px; border: 2px solid #8c7660; border-radius: 10px; background: #fff; color: var(--text); }
.field input:focus, .field textarea:focus { border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: #b3261e; background: #fff5f4; }
.field-error { color: #b3261e; font-weight: 700; margin: .3em 0 0; min-height: 0; }
.field-error:empty { display: none; }

.pay-options { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .7rem; }
.pay-option { display: flex; align-items: center; gap: .9rem; background: #fff; border: 3px solid var(--border); border-radius: 14px; padding: .9rem 1rem; cursor: pointer; }
.pay-option.checked, .pay-option:has(input:checked) { border-color: var(--green); background: #f0f9f2; }
.pay-option.disabled { opacity: .55; cursor: not-allowed; }
.pay-option input { width: 28px; height: 28px; accent-color: var(--green); flex-shrink: 0; }
.pay-option-icon { font-size: 2rem; }
.pay-option-text { display: flex; flex-direction: column; }
.pay-option-text strong { font-size: 1.2rem; }
.pay-option-text span { color: var(--muted); font-size: .95rem; }
.deliver-to { background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .95rem; }

.pay-instruction { font-size: 1.1rem; }
.upi-apps { display: grid; gap: .7rem; margin-bottom: 1.2rem; }
.btn-upi { background: #1f3a93; color: #fff; font-size: 1.15rem; }
.btn-upi:hover { background: #172c70; }
.qr-wrap { text-align: center; margin-bottom: 1rem; }
.qr-box { display: inline-block; padding: 12px; background: #fff; border: 3px solid var(--text); border-radius: 12px; min-width: 120px; min-height: 120px; }
.qr-box img, .qr-box canvas { display: block; }
.more-apps { background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; }
.more-apps summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.more-apps[open] summary { margin-bottom: .6rem; }
.upi-id-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; overflow-wrap: anywhere; }
.copy-msg { text-align: center; font-weight: 700; color: var(--green-dark); }
.copy-msg:empty { display: none; }
.bank-details { display: grid; grid-template-columns: auto 1fr; gap: .4em 1em; margin: .8rem 0 0; background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: 1rem; }
.bank-details dt { font-weight: 600; color: var(--muted); }
.bank-details dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.bank-details .link-btn { min-height: 0; padding: 0 .3em; }
.after-pay { margin-top: 1.2rem; background: #fff; border: 3px solid var(--green); border-radius: 14px; padding: 1rem 1.1rem; }
.after-pay h3 { margin-top: 0; }
.back-link { display: block; margin: 1rem auto 0; }
.done { text-align: center; }
.done-icon { font-size: 3.5rem; }
.done .btn { margin-top: .6rem; }


/* ===== Photos ===== */
.hero-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; border: 6px solid #fff; box-shadow: 0 14px 30px rgba(90,40,10,.25); transform: rotate(1.5deg); background: var(--accent-soft); }
.about-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; margin-top: 1rem; border: 4px solid #fff; box-shadow: 0 8px 20px rgba(90,40,10,.15); }
.card-img.has-photo { padding: 0; }
.card-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-img svg { width: 140px; height: 140px; }
.card-img:not(.has-photo) { aspect-ratio: 4 / 3; }
.credits { margin-top: 1rem; font-size: .85rem; text-align: left; max-width: 760px; margin-left: auto; margin-right: auto; }
.credits summary { cursor: pointer; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; text-decoration: underline; }
.credits ul { padding-left: 1.2em; }
.credits a, .site-footer a { color: #fff; }

/* ===== Menu button (phones) ===== */
.menu-btn { display: none; min-height: 48px; padding: 0 1em; font: inherit; font-weight: 700; color: var(--brand-dark); background: var(--accent-soft); border: 2px solid var(--brand); border-radius: 10px; cursor: pointer; }
.menu-btn[aria-expanded="true"] { background: var(--brand); color: #fff; }

/* ===== Checkout fallback for older browsers without <dialog> ===== */
.checkout.dialog-fallback { display: none; }
.checkout.dialog-fallback[open] { display: block; position: fixed; inset: 0; z-index: 50; width: 100%; height: 100%; max-height: none; overflow-y: auto; border-radius: 0; }

/* ===== Footer ===== */
.site-footer { background: var(--brand-dark); color: #fff; padding: 1.5rem 0; text-align: center; }
.site-footer p { margin: .2em 0; }

/* ===== Mobile ===== */
@media (max-width: 760px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 1.2rem 0 2rem; }
  .hero-inner, .about-inner, .bulk-inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .hero-art { order: -1; }
  .hero-photo { transform: none; aspect-ratio: 16 / 10; border-width: 4px; }
  .btn-big, .hero-actions .btn { width: 100%; }

  /* compact top bar: no labels, one tidy row each */
  .top-bar-inner { justify-content: space-between; gap: .4rem; padding-top: .35rem; padding-bottom: .35rem; }
  .bar-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .top-bar .container { padding-left: 10px; padding-right: 10px; }
  .lang-switch, .size-switch, #lang-buttons { gap: .25rem; }
  .lang-btn { font-size: 14px; padding: 0 .4em; min-width: 0; min-height: 42px; }
  .size-btn { min-width: 36px; min-height: 42px; padding: 0 .2em; }
  .size-btn { font-size: 15px; } .size-btn--lg { font-size: 17px; } .size-btn--xl { font-size: 19px; }

  /* header: brand + menu button, links drop down */
  .header-inner { flex-wrap: nowrap; justify-content: space-between; }
  .brand-name { font-size: 1.1rem; white-space: nowrap; }
  .brand-mark svg { width: 32px; height: 32px; }
  .header-inner { gap: .5rem; }
  .menu-btn { padding: 0 .7em; }
  .brand { gap: .4rem; min-width: 0; }
  .brand-mark svg { width: 38px; height: 38px; }
  .menu-btn { display: inline-flex; align-items: center; gap: .4em; flex-shrink: 0; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 3px solid var(--accent); box-shadow: 0 10px 20px rgba(90,40,10,.15); }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; padding: .3rem 16px .6rem; }
  .nav-list a { display: block; padding: .7em .4em; font-size: 1.1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .site-header { position: sticky; }

  .category-tabs { gap: .5rem; }
  .tab { min-height: 50px; padding: .4em .9em; }
  .product-grid { grid-template-columns: 1fr; }
  .card-img img, .card-img:not(.has-photo) { aspect-ratio: 16 / 9; }
  .checkout { border-radius: 0; width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; }
  .checkout-body { padding-bottom: calc(1.6rem + env(safe-area-inset-bottom)); }
  .cart-bar-inner { gap: .4rem; }
  .cart-bar-inner .btn { flex: 1 1 100%; min-height: 52px; }
  body.has-cart { padding-bottom: 140px; }
  .bulk-strip-inner { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
