/* ============================================================
   Tholath Stores – styles
   Three themes via [data-theme]: festive | fresh | pop
   ============================================================ */

/* ---------- Theme 1: Festive Bazaar (warm red, gold, cream) ---------- */
:root,
[data-theme="festive"] {
  --bg: #FFF8EE;
  --surface: #FFFFFF;
  --soft: #FCEEDC;
  --ink: #2A1A14;
  --muted: #6A564B;
  --line: #EEDCC6;
  --primary: #B8262B;
  --on-primary: #FFFFFF;
  --accent: #F4B63F;
  --on-accent: #2A1A14;
  --dark: #6E1A1D;
  --on-dark: #FFF4E6;
  --on-dark-muted: #F3D9C4;
  --dark-card: #842428;
  --tile-1: #B8262B; --tile-1-ink: #FFF4E6;
  --tile-2: #F4B63F; --tile-2-ink: #2A1A14;
  --tile-3: #2F6B4F; --tile-3-ink: #FFFFFF;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(110, 26, 29, .10);
  --font-head: 'Baloo Chettan 2', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-ml: 'Baloo Chettan 2', 'Noto Sans Malayalam', sans-serif;
  --font-ml-body: 'Noto Sans Malayalam', 'Baloo Chettan 2', sans-serif;
  --head-weight: 800;
  --head-track: -0.01em;
}

/* ---------- Theme 2: Kerala Fresh (leaf green, mango, white) ---------- */
[data-theme="fresh"] {
  --bg: #F7FBF8;
  --surface: #FFFFFF;
  --soft: #E6F4EC;
  --ink: #10261C;
  --muted: #4A5E54;
  --line: #D5E8DD;
  --primary: #0E7550;
  --on-primary: #FFFFFF;
  --accent: #FFC93C;
  --on-accent: #10261C;
  --dark: #0B3D2C;
  --on-dark: #F2FBF6;
  --on-dark-muted: #C4E3D3;
  --dark-card: #11503A;
  --tile-1: #0E7550; --tile-1-ink: #FFFFFF;
  --tile-2: #FFC93C; --tile-2-ink: #10261C;
  --tile-3: #2B7FBF; --tile-3-ink: #FFFFFF;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(11, 61, 44, .08);
  --font-head: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-ml: 'Noto Sans Malayalam', sans-serif;
  --font-ml-body: 'Noto Sans Malayalam', sans-serif;
  --head-weight: 800;
  --head-track: -0.025em;
}

/* ---------- Theme 3: Bright Market (navy, coral, sunshine) ---------- */
[data-theme="pop"] {
  --bg: #FFFDF7;
  --surface: #FFFFFF;
  --soft: #FFF1D2;
  --ink: #1B1E3C;
  --muted: #50547A;
  --line: #1B1E3C;
  --primary: #D2334C;
  --on-primary: #FFFFFF;
  --accent: #FFD23F;
  --on-accent: #1B1E3C;
  --dark: #1B1E3C;
  --on-dark: #FFFFFF;
  --on-dark-muted: #D0D3F0;
  --dark-card: #2A2E57;
  --tile-1: #D2334C; --tile-1-ink: #FFFFFF;
  --tile-2: #FFD23F; --tile-2-ink: #1B1E3C;
  --tile-3: #3654D6; --tile-3-ink: #FFFFFF;
  --radius: 28px;
  --radius-sm: 16px;
  --shadow: 5px 5px 0 #1B1E3C;
  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-ml: 'Anek Malayalam', sans-serif;
  --font-ml-body: 'Anek Malayalam', sans-serif;
  --head-weight: 800;
  --head-track: -0.025em;
}
[data-theme="pop"] .dept,
[data-theme="pop"] .aud,
[data-theme="pop"] .tile,
[data-theme="pop"] .why { border: 2px solid var(--ink); }
[data-theme="pop"] .btn { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
[data-theme="pop"] .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
[data-theme="pop"] .section--dark .btn { border-color: var(--on-dark); box-shadow: 3px 3px 0 var(--accent); }

/* Malayalam: switch font families */
html[lang="ml"] {
  --font-head: var(--font-ml);
  --font-body: var(--font-ml-body);
  --head-track: 0;
}
html[lang="ml"] h1 { line-height: 1.25; }
html[lang="ml"] h2, html[lang="ml"] h3 { line-height: 1.3; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-track);
  margin: 0;
}
h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.1; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: #960E1A;
  display: grid; place-items: center;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font: var(--head-weight) 1.3rem/1.1 var(--font-head); text-transform: uppercase; letter-spacing: .01em; }
.brand__alt { font-size: .85rem; color: var(--muted); font-family: var(--font-ml-body); }
html[lang="ml"] .brand__alt { font-family: 'Inter', system-ui, sans-serif; }
.nav { display: flex; gap: 24px; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.nav a:hover { color: var(--primary); }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 .95rem/1 var(--font-body); cursor: pointer;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }
#langToggleLabel { font-family: 'Noto Sans Malayalam', 'Inter', sans-serif; }
@media (max-width: 820px) { .nav { display: none; } }

/* ---------- Ribbon ---------- */
.ribbon { background: var(--accent); color: var(--on-accent); }
.ribbon__link { color: inherit; font-weight: 800; }
.ribbon__inner { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; text-align: center; padding-top: 10px; padding-bottom: 10px; font-size: .98rem; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 80px; }
.hero__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
html[lang="ml"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero__art {
  position: relative;
  display: grid; gap: 16px;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 420px;
}
.tile {
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow);
  font: var(--head-weight) 1.5rem/1.1 var(--font-head);
}
.tile--1 { grid-row: span 2; background: var(--tile-1); color: var(--tile-1-ink); }
.tile--1 svg { width: 120px; height: 120px; }
.tile--2 { background: var(--tile-2); color: var(--tile-2-ink); }
.tile--3 { background: var(--tile-3); color: var(--tile-3-ink); }
.sticker {
  position: absolute; right: -8px; top: -20px; transform: rotate(5deg);
  background: var(--surface); color: var(--ink);
  padding: 12px 22px; border-radius: 999px;
  font: 800 1rem/1.2 var(--font-head);
  box-shadow: var(--shadow);
  border: 2px solid var(--line);
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section__head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; max-width: 760px; }
.section__head p { color: var(--muted); font-size: 1.1rem; }
.cards { display: grid; gap: 24px; }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cards--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* Departments */
.dept { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dept__photo {
  height: 200px; display: grid; place-items: center;
  font-weight: 600; font-size: .95rem;
}
.dept__photo img { width: 100%; height: 100%; object-fit: cover; }
.dept--1 .dept__photo { background: var(--tile-1); color: var(--tile-1-ink); }
.dept--2 .dept__photo { background: var(--tile-2); color: var(--tile-2-ink); }
.dept--3 .dept__photo { background: var(--tile-3); color: var(--tile-3-ink); }
.dept__body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dept__title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.dept__title h3 { font-size: 1.6rem; }
.pill { font-size: .85rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .92rem; }
[data-theme="pop"] .chips li { border-width: 1.5px; }

/* Audiences */
.aud { border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; box-shadow: var(--shadow); }
.aud--family { background: var(--surface); }
.aud--shop { background: var(--dark); color: var(--on-dark); }
.aud--shop .eyebrow { color: var(--accent); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 18px; height: 10px;
  border-left: 3px solid var(--primary); border-bottom: 3px solid var(--primary);
  transform: rotate(-45deg) translateY(-4px);
}
.aud--shop .ticks li::before { border-color: var(--accent); }

/* Why */
.why { background: var(--surface); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.why__icon { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 6px; }
.why p { color: var(--muted); }

/* Steps */
.steps { list-style: none; margin: 0 0 36px; padding: 0; }
.step { background: var(--dark-card); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.step__n { font: 800 3rem/1 var(--font-head); color: var(--accent); }
.step p { color: var(--on-dark-muted); }

/* Visit */
.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: stretch; }
.visit__info { display: flex; flex-direction: column; gap: 28px; }
.visit__info .section__head { margin-bottom: 0; }
.facts { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: 14px 20px; font-size: 1.05rem; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.facts a { font-weight: 700; }
.map {
  min-height: 360px; border-radius: var(--radius);
  background: var(--soft); border: 2px dashed var(--line);
  display: grid; place-items: center; color: var(--muted); font-weight: 600;
  overflow: hidden;
}
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 4px; } .facts dd { margin-bottom: 12px; } }

/* Footer */
.footer { background: var(--ink); color: var(--bg); padding: 40px 0; font-size: .95rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.footer__brand { font: 800 1.3rem/1.2 var(--font-head); }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { color: var(--accent); text-decoration: none; font-weight: 700; }
.footer__copy { opacity: .75; }

/* Theme picker (localhost only) */
.theme-picker {
  position: fixed; left: 16px; bottom: 16px; z-index: 50;
  display: flex; align-items: center; gap: 6px;
  background: #111; color: #fff; padding: 8px; border-radius: 999px;
  font: 600 13px/1 'Inter', sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.theme-picker[hidden] { display: none; }
.theme-picker span { padding: 0 8px; opacity: .7; }
.theme-picker button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: #2a2a2a; color: #fff; font: inherit; cursor: pointer; }
.theme-picker button[aria-pressed="true"] { background: #fff; color: #111; }

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .aud { padding: 28px; }
  .hero__art { min-height: 320px; }
  .tile--1 svg { width: 80px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ---------- Mobile fixes ---------- */
.lang-short { display: none; }
@media (max-width: 600px) {
  .topbar__inner { flex-wrap: nowrap; gap: 8px; }
  .brand { min-width: 0; gap: 10px; }
  .brand__mark { width: 40px; height: 40px; flex: none; }
  .brand__text { min-width: 0; }
  .brand__name { font-size: 1.02rem; white-space: nowrap; }
  .brand__alt { font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar__actions { flex: none; gap: 6px; flex-wrap: nowrap; }
  .lang-toggle { padding: 0 12px; gap: 6px; }
  .lang-full { display: none; }
  .lang-short { display: inline; font-family: 'Nunito', 'Inter', sans-serif; }
  .btn--call { width: 44px; padding: 0; }
  .btn--call span { display: none; }
  h1, h2, h3 { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  .hero__art { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 300px; gap: 12px; }
  .tile { padding: 16px; font-size: 1.15rem; min-width: 0; overflow-wrap: anywhere; }
  html[lang="ml"] .tile { font-size: .86rem; overflow-wrap: normal; }
  .hero__copy .btn { width: 100%; }
  .tile--2 svg, .tile--3 svg { width: 44px; height: 44px; }
  .sticker { position: static; transform: rotate(-2deg); grid-column: 1 / -1; justify-self: center; white-space: normal; text-align: center; }
  .theme-picker { left: 8px; right: 8px; bottom: 8px; justify-content: center; font-size: 12px; }
  .theme-picker span { display: none; }
}
