/* Ahona Corporation — storefront + dashboard styles
   Plain CSS, no build step. BEM-ish naming. */

:root {
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-light: #ccfbf1;
  --accent: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --info: #2563eb;

  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-mute: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Roboto, "Noto Sans Bengali", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-top { background: var(--brand-dark); color: #fff; font-size: 13px; padding: 6px 0; }
.header-top .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.header-main { padding: 14px 0; }
.header-main .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 42px; height: 42px; flex: none; display: block; border-radius: 12px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-size: 21px; font-weight: 800; color: var(--brand-dark); letter-spacing: -.4px; }
.logo-sub { font-size: 10px; font-weight: 700; letter-spacing: 3.5px; color: var(--accent); margin-top: 3px; }

.search-form { flex: 1 1 280px; display: flex; max-width: 560px; }
.search-form input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--line);
  border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: 14px;
}
.search-form button {
  padding: 10px 18px; border: none; background: var(--brand);
  color: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; font-weight: 600;
}
.search-form button:hover { background: var(--brand-dark); }

.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: 14px; }
.cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -8px; right: -12px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; min-width: 18px; text-align: center;
}

.nav-bar { border-top: 1px solid var(--line); background: #fff; }
.nav-bar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.nav-bar a { display: block; padding: 10px 14px; color: var(--ink-soft); font-weight: 500; font-size: 14px; }
.nav-bar a:hover { color: var(--brand); background: var(--brand-light); text-decoration: none; border-radius: var(--radius-sm); }

/* ----------------------------------------------------------------- layout */
.main { padding: 28px 0 56px; }
.page-title { font-size: 26px; margin: 0 0 4px; font-weight: 700; }
.page-sub { color: var(--ink-soft); margin: 0 0 22px; font-size: 14px; }
.crumbs { font-size: 13px; color: var(--ink-mute); margin-bottom: 16px; }
.crumbs a { color: var(--ink-soft); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-tight { padding: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 17px; }

.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- products */
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-thumb { aspect-ratio: 1; background: #f1f5f9; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .ph { color: var(--ink-mute); font-size: 32px; }
.product-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-name { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.4; }
.product-name a { color: inherit; }
.product-cat { font-size: 12px; color: var(--ink-mute); }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-weight: 700; font-size: 17px; color: var(--brand-dark); }
.price-old { text-decoration: line-through; color: var(--ink-mute); font-size: 13px; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.badge-sale { background: #fee2e2; color: var(--danger); }
.badge-new { background: var(--brand-light); color: var(--brand-dark); }
.badge-out { background: #f1f5f9; color: var(--ink-mute); }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: var(--danger); }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-muted { background: #f1f5f9; color: var(--ink-soft); }

/* -------------------------------------------------------------------- ui */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
  background: var(--brand); color: #fff; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); color: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); }
.btn-warning:hover { background: #b45309; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

form .field { margin-bottom: 15px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], input[type=search], input[type=url], input[type=date], input[type=file],
select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
textarea { resize: vertical; min-height: 90px; }
.help { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }
.errors { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; }

/* form help text (also used by the password rules on sign-up) */
.help { font-size: 12px; color: var(--ink-mute); margin-top: 5px; line-height: 1.45; }
.help ul { margin: 4px 0 0; padding-left: 18px; }
.help li { margin: 1px 0; }

/* ------------------------------------------------------------------ auth */
.auth-wrap {
  max-width: 430px;
  margin: 44px auto;
  padding: 34px 32px;
  box-shadow: var(--shadow-md);
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-logo { display: inline-flex; margin-bottom: 14px; }
.auth-logo img { width: 44px; height: 44px; }
.auth-wrap .page-title { font-size: 23px; margin-bottom: 6px; }
.auth-wrap .auth-head .page-sub { margin-bottom: 0; }
.auth-wrap .btn-block { margin-top: 8px; }
.auth-alt {
  text-align: center; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft);
}
@media (max-width: 520px) { .auth-wrap { margin: 22px auto; padding: 24px 18px; } }

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
table.data tbody tr:hover { background: #f8fafc; }
table.data tbody tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-mute); font-weight: 700; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; color: var(--ink); }
.stat-hint { font-size: 12px; color: var(--ink-mute); margin-top: 3px; }
.stat.is-brand .stat-value { color: var(--brand-dark); }
.stat.is-accent .stat-value { color: var(--warning); }
.stat.is-danger .stat-value { color: var(--danger); }
.stat.is-success .stat-value { color: var(--success); }

/* ----------------------------------------------------------------- alerts */
.messages { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-debug { background: #f8fafc; border-color: var(--line); color: var(--ink-soft); }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-mute); }
.empty-icon { font-size: 44px; margin-bottom: 10px; }
.empty h3 { color: var(--ink-soft); margin: 0 0 6px; font-size: 17px; }

/* ------------------------------------------------------------------ steps */
.steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-mute); }
.step-num { width: 24px; height: 24px; border-radius: 999px; background: #f1f5f9; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.step.is-active { color: var(--brand-dark); font-weight: 600; }
.step.is-active .step-num { background: var(--brand); color: #fff; }
.step.is-done .step-num { background: var(--success); color: #fff; }

/* -------------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 999px; background: var(--brand); border: 2px solid #fff; }
.timeline-when { font-size: 12px; color: var(--ink-mute); }
.timeline-what { font-weight: 600; font-size: 14px; }
.timeline-note { font-size: 13px; color: var(--ink-soft); }

/* --------------------------------------------------------------- summary */
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 17px; }
.summary-row .label { color: var(--ink-soft); }
.summary-row .value { font-variant-numeric: tabular-nums; }
.summary-row.is-refund { color: var(--danger); }
.summary-row.is-net { font-weight: 700; }

.overall { display: inline-block; font-size: 12px; color: var(--ink-soft); padding: 2px 8px; border-radius: 999px; background: #f1f5f9; }

/* --------------------------------------------------------------- dashboard */
.dash { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } }
.dash-side { background: #0f172a; color: #cbd5e1; padding: 20px 0; }
.dash-brand { padding: 0 20px 18px; font-size: 17px; font-weight: 700; color: #fff; border-bottom: 1px solid #1e293b; }
.dash-brand span { color: var(--accent); }
.dash-side nav { padding: 12px 0; }
.dash-side .nav-group { padding: 14px 20px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #64748b; font-weight: 700; }
.dash-side a { display: flex; align-items: center; gap: 9px; padding: 9px 20px; color: #cbd5e1; font-size: 14px; }
.dash-side a:hover { background: #1e293b; color: #fff; text-decoration: none; }
.dash-side a.is-active { background: var(--brand-dark); color: #fff; font-weight: 600; border-left: 3px solid var(--accent); padding-left: 17px; }
.dash-side .count { margin-left: auto; background: #1e293b; border-radius: 999px; padding: 1px 7px; font-size: 11px; }

.dash-main { background: var(--bg); padding: 24px 28px 56px; min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.dash-head h1 { font-size: 22px; margin: 0; }
.dash-head .who { font-size: 13px; color: var(--ink-soft); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; }
.filters select, .filters input { min-width: 150px; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 22px; align-items: center; }
.pager a, .pager span { padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; background: #fff; }
.pager .current { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: #0f172a; color: #94a3b8; padding: 40px 0 24px; margin-top: 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; }
.site-footer h4 { color: #fff; font-size: 14px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .5px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #94a3b8; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 28px; padding-top: 18px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ misc */
.muted { color: var(--ink-mute); }
.small { font-size: 13px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.right { text-align: right; }
.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 14px; }
.dl dt { color: var(--ink-soft); font-weight: 600; }
.dl dd { margin: 0; }
.qty-form { display: flex; align-items: center; gap: 8px; }
.qty-form input { width: 72px; text-align: center; }
.thumb-sm { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; background: #f1f5f9; }

@media print {
  .site-header, .site-footer, .dash-side, .btn-row, .no-print { display: none !important; }
  .dash { grid-template-columns: 1fr; }
  body { background: #fff; }
}

/* ================================================================ */
/* Responsive + template-class fixes (appended)                     */
/* ================================================================ */

/* --- Utility classes referenced by templates --- */
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-center { text-align: center; }

/* --- Table styling (templates use .table / .table-plain) --- */
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th, table.table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle;
}
table.table th {
  background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--ink-soft); font-weight: 700;
}
table.table tbody tr:hover { background: #f8fafc; }
table.table tbody tr:last-child td { border-bottom: none; }
table.table-plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table-plain td, table.table-plain th { padding: 6px 0; border: none; text-align: left; }

/* --- Hero (home) --- */
.hero { background: linear-gradient(120deg, #0f766e, #115e59); color: #fff; border: none; padding: 38px 28px; }
.hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.2; }
.hero p  { margin: 0 0 18px; opacity: .92; max-width: 640px; }

/* --- Mobile nav toggle (hidden on desktop) --- */
.nav-toggle { display: none; }
.nav-toggle-icon { width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block; flex: none; }
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after  { top: 6px; }

/* --- Dashboard mobile top bar (hidden on desktop) --- */
.dash-topbar { display: none; }

/* ---------------- <= 1024px ---------------- */
@media (max-width: 1024px) {
  :root { --wrap: 100%; }
}

/* ---------------- <= 768px : tablets & phones ---------------- */
@media (max-width: 768px) {
  .header-main .wrap { gap: 12px 16px; }
  .logo { gap: 9px; }
  .logo-mark { width: 36px; height: 36px; }
  .logo-name { font-size: 18px; }
  .logo-sub { font-size: 9px; letter-spacing: 3px; }
  .search-form { order: 3; flex: 1 1 100%; max-width: none; }
  .header-actions { order: 2; gap: 14px; }

  /* Collapse the category nav behind a Menu toggle */
  .nav-bar .wrap { padding: 0; }
  .nav-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 12px 16px; background: #fff; border: none; cursor: pointer;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  }
  .nav-bar .nav-menu { display: none; flex-direction: column; gap: 0; padding: 0 0 6px; }
  .nav-bar .nav-menu.is-open { display: flex; }
  .nav-bar .nav-menu li { width: 100%; }
  .nav-bar .nav-menu a { display: block; padding: 11px 16px; border-radius: 0; }
  .nav-bar .nav-menu a:hover { border-radius: 0; }

  .main { padding: 20px 0 40px; }
  .page-title { font-size: 21px; }

  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 24px; }
  .hero .btn-lg { padding: 11px 18px; font-size: 15px; }

  .split { grid-template-columns: 1fr; gap: 18px; }

  .dl { grid-template-columns: 1fr; gap: 0; }
  .dl dt { margin-top: 10px; }
  .dl dd { margin: 0; }

  .filters { gap: 8px; }
  .filters .field, .filters select, .filters input { min-width: 0; flex: 1 1 140px; }

  /* Dashboard: sidebar collapses behind a top bar */
  .dash { grid-template-columns: 1fr; }
  .dash-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #0f172a; color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 40;
  }
  .dash-topbar-title { font-weight: 700; font-size: 16px; }
  .dash-toggle {
    display: inline-flex; align-items: center; gap: 8px; background: transparent;
    border: 1px solid #334155; color: #fff; padding: 7px 12px; border-radius: 6px;
    font: inherit; font-size: 14px; cursor: pointer;
  }
  .dash-side { display: none; }
  .dash.nav-open .dash-side { display: block; }
  .dash-main { padding: 18px 16px 44px; }
  .dash-head h1 { font-size: 19px; }

  /* Wide tables scroll instead of overflowing the page */
  table.table:not(.table-plain) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---------------- <= 480px : small phones ---------------- */
@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .page-title { font-size: 19px; }
  .hero h1 { font-size: 21px; }
  .product-name { font-size: 13px; }
  .header-top { font-size: 12px; }
  .header-top .wrap { justify-content: center; text-align: center; }
  .btn-row .btn { flex: 1 1 auto; }
}

/* ================================================================ */
/* Hero image slider (supports any number of slides)                */
/* ================================================================ */
.hero-slider {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 400px;
  background: linear-gradient(120deg, #0f766e, #115e59); /* fallback when no images */
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Dark-to-clear wash so the caption stays readable over any image */
.hero-slider::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8,40,37,.80) 0%, rgba(8,40,37,.48) 42%, rgba(8,40,37,.10) 72%, rgba(8,40,37,0) 100%);
}

.hero-overlay {
  position: relative; z-index: 2; max-width: 640px; min-height: 400px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 32px clamp(20px, 5vw, 52px); color: #fff;
}
.hero-overlay h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.15; }
.hero-overlay p  { margin: 0 0 20px; opacity: .95; max-width: 560px; }

/* Prev / next arrows */
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); color: #115e59; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: background .15s;
}
.hero-nav:hover { background: #fff; }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }

/* Dot indicators */
.hero-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; display: flex; gap: 8px; justify-content: center; }
.hero-dots button {
  width: 10px; height: 10px; padding: 0; border: none; cursor: pointer; border-radius: 999px;
  background: rgba(255,255,255,.5); transition: background .15s, width .15s;
}
.hero-dots button.is-active { background: #fff; width: 26px; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

@media (max-width: 768px) {
  .hero-slider { min-height: 320px; }
  .hero-overlay { min-height: 320px; padding: 24px 18px; }
  .hero-overlay h1 { font-size: 24px; }
  .hero-nav { width: 36px; height: 36px; font-size: 22px; }
}
@media (max-width: 480px) {
  .hero-slider { min-height: 340px; }
  .hero-overlay { min-height: 340px; }
  .hero-overlay h1 { font-size: 21px; }
  .hero-overlay .btn-lg { padding: 11px 16px; font-size: 14px; }
  .hero-nav { display: none; } /* rely on swipe + dots on small phones */
}

/* ================================================================ */
/* Category showcase cards                                          */
/* ================================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.cat-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; color: var(--ink); text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* subtle accent strip that grows on hover */
.cat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand); transform: scaleY(0); transform-origin: top;
  transition: transform .18s ease;
}
.cat-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: var(--brand); text-decoration: none;
}
.cat-card:hover::before { transform: scaleY(1); }

.cat-media {
  flex: none; width: 54px; height: 54px; border-radius: 13px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-light), #e8fffb);
  color: var(--brand-dark);
  transition: background .18s ease, color .18s ease;
}
.cat-card:hover .cat-media {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
}
.cat-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-icon { display: grid; place-items: center; }
.cat-icon svg { width: 27px; height: 27px; display: block; }

.cat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-name { font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--ink); }
.cat-count {
  font-size: 11px; font-weight: 600; letter-spacing: .2px; text-transform: uppercase;
  color: var(--ink-mute);
}

.cat-go {
  margin-left: auto; flex: none; color: var(--brand);
  opacity: 0; transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.cat-go svg { width: 20px; height: 20px; display: block; }
.cat-card:hover .cat-go { opacity: 1; transform: translateX(0); }

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; gap: 12px; }
  .cat-go { display: none; }
}

/* ================================================================ */
/* Shop category / brand filter sidebar                             */
/* ================================================================ */
.filter-card { padding: 16px; }
.filter-title {
  margin: 0 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--ink-soft);
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cat-filter { list-style: none; margin: 0; padding: 0; }
.cat-filter > li { margin: 0; }
.cat-filter a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 8px; border-left: 3px solid transparent;
  color: var(--ink-soft); font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cat-filter a:hover { background: #f1f5f9; color: var(--brand-dark); text-decoration: none; }
.cat-filter a.is-active {
  background: var(--brand-light); color: var(--brand-dark);
  font-weight: 700; border-left-color: var(--brand);
}
.cat-filter-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-filter-count {
  flex: none; font-size: 11px; font-weight: 700; color: var(--ink-mute);
  background: #eef2f6; border-radius: 999px; padding: 1px 8px; min-width: 24px; text-align: center;
}
.cat-filter a:hover .cat-filter-count { background: #e2e8f0; }
.cat-filter a.is-active .cat-filter-count { background: #fff; color: var(--brand-dark); }
.cat-filter-sub {
  list-style: none; margin: 2px 0 6px 13px; padding-left: 10px;
  border-left: 1px solid var(--line);
}
.cat-filter-sub a { font-size: 13px; padding: 6px 10px; }

/* ================================================================ */
/* Collapsible dashboard sidebar groups                             */
/* ================================================================ */
.dash-group {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 14px 20px 6px; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #64748b; text-align: left;
  transition: color .15s ease;
}
.dash-group:hover { color: #cbd5e1; }
.dash-caret {
  width: 0; height: 0; flex: none;
  border-left: 4px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transform: rotate(90deg); transition: transform .18s ease; margin-right: 2px;
}
.dash-group-block.is-collapsed .dash-caret { transform: rotate(0deg); }
.dash-group-block.is-collapsed .dash-group-items { display: none; }

/* Fix: template uses the `active` class on sidebar links */
.dash-side a.active {
  background: var(--brand-dark); color: #fff; font-weight: 600;
  border-left: 3px solid var(--accent); padding-left: 17px;
}

/* ================================================================ */
/* Dashboard sidebar brand (logo mark)                              */
/* ================================================================ */
.dash-brand a { display: flex; align-items: center; gap: 10px; padding: 0; }
.dash-brand a:hover { background: none; }
.dash-brand-mark { flex: none; display: block; border-radius: 9px; }
.dash-brand .dash-brand-text { color: #fff; font-size: 16px; font-weight: 700; }
.dash-brand .dash-brand-text small { color: var(--accent); font-weight: 700; margin-left: 2px; }
