/* SkillSpark storefront shell (header, footer, region toggle, cart button, checkout header).
   Extracted from the approved mockups (index.html, course.html, cart.html, checkout.html).
   Page-specific styles stay in each view via @push('styles'). Load after theme.css. */

/* ---------- page helpers ---------- */
html { scroll-padding-top: 80px; }
body { overflow-x: hidden; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--indigo-600); outline-offset: 2px; border-radius: 8px; }
.section { padding: 96px 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--text-2); font-size: 1.075rem; margin: 0; }
.section-head .eyebrow { margin-bottom: 8px; }
.hi { font-family: "Noto Sans Devanagari", var(--font); }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 16px; border-radius: 8px; background: var(--indigo-900); color: #fff; font-weight: 700; }
.skip-link:focus { top: 8px; }

/* region-dependent content: <html data-region="inr|usd"> */
.price-usd { display: none; }
[data-region="usd"] .price-inr { display: none; }
[data-region="usd"] .price-usd { display: inline; }
:root:not([data-region="usd"]) .only-us { display: none !important; }
[data-region="usd"] .only-in { display: none !important; }

/* flash messages */
.flash { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 0.93rem; }
.flash-ok { border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.08); }
.flash-error { border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.08); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--text-2); transition: color .15s, background .15s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .btn { padding: 10px 18px; }
.header-actions form { margin: 0; }

.region-toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.region-toggle button {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font: 700 0.8rem/1 var(--font); padding: 8px 10px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center;
  transition: background .15s, color .15s;
}
.region-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.cart-btn { position: relative; width: 42px; height: 42px; flex: none; border-radius: 999px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text); background: var(--surface); }
.cart-btn:hover { background: var(--surface-2); }
.cart-count { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--grad-brand); color: var(--on-brand); font-size: 0.7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }

/* ---------- footer ---------- */
.site-footer { background: var(--indigo-950); color: rgba(224, 231, 255, 0.7); padding: 64px 0 32px; margin-top: 96px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.site-footer .logo { color: #fff; margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 16px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.93rem; }
.site-footer a:hover { color: var(--yellow-400); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(224, 231, 255, 0.1); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: 0.85rem; }

/* ---------- checkout shell (checkout.html) ---------- */
.co-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.co-header .header-inner { height: 68px; gap: 16px; }
.secure { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; color: var(--text-2); padding-left: 16px; border-left: 1px solid var(--border); }
.secure svg { color: var(--success); }
.back-link { font-size: 0.88rem; font-weight: 700; color: var(--text-2); }
.back-link:hover { color: var(--orange-600); }
.co-foot { border-top: 1px solid var(--border); padding: 20px 0; font-size: 0.82rem; color: var(--muted); }
.co-foot .container { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.co-foot a:hover { color: var(--orange-600); }
.co-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 760px) {
  .section { padding: 72px 0; }
}
@media (max-width: 640px) {
  .secure, .back-link { display: none; }
}
@media (max-width: 560px) {
  .header-inner { gap: 8px; height: 64px; }
  .btn-login { display: none; }
  .logo-text { display: none; }
  .region-toggle button { padding: 7px 8px; }
  .header-actions .btn { padding: 9px 14px; font-size: 0.85rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.cart-count[hidden] { display: none; }
