/* Vidumina Custom — base styles. Mobile first, no framework. */
:root {
  --ink: #171a2e;
  --ink-2: #4a4f66;
  --muted: #6b7086;
  --line: #e3e5ee;
  --bg: #f7f7fb;
  --card: #ffffff;
  --brand: #2b2d9e;
  --brand-ink: #ffffff;
  --brand-soft: #eceefe;
  --accent: #ff6b4a;
  --ok: #117a4b;   --ok-bg: #e6f6ee;
  --err: #b42318;  --err-bg: #fdecea;
  --info: #1d4f91; --info-bg: #e8f0fb;
  --warn: #9a5b00;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(23, 26, 46, .06), 0 4px 16px rgba(23, 26, 46, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Sinhala", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2 { font-size: 1.35rem; margin-top: 1.6em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { font-size: .88em; background: var(--brand-soft); padding: .1em .35em; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 56px; min-height: 60vh; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.narrow { max-width: 640px; }
.inline { display: inline; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 800; }
.main-nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.main-nav a, .linklike { color: var(--ink-2); text-decoration: none; font: inherit; font-size: .95rem; padding: 8px 2px; }
.main-nav a:hover, .linklike:hover { color: var(--brand); }
.linklike { background: none; border: 0; cursor: pointer; color: var(--brand); padding: 0; }
.main-nav .linklike { color: var(--ink-2); padding: 8px 2px; }
.admin-header { background: var(--ink); border-color: var(--ink); }
.admin-header .brand, .admin-header .main-nav a, .admin-header .linklike { color: #e6e7f2; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px; border-radius: 10px;
  border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: 600 1rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.main-nav .btn-sm { color: var(--brand-ink); padding: 6px 14px; }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--brand); }
.btn-disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: default; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; border: 1px solid transparent; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe5d1; }
.alert-err { background: var(--err-bg); color: var(--err); border-color: #f5c2bd; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #c9dbf3; }

/* Forms */
.auth-card { max-width: 440px; margin: 16px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field input:not([type]) {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.field input:disabled { background: var(--bg); color: var(--muted); }
.field.has-error input { border-color: var(--err); }
.field-error { color: var(--err); font-size: .88rem; margin: 6px 0 0; }
.field-help { color: var(--muted); font-size: .86rem; margin: 6px 0 0; }
.field.check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.field.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

/* Home */
.hero { display: grid; gap: 24px; align-items: center; padding: 24px 0 8px; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero-art { display: none; }
.garment { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 14px rgba(23,26,46,.12)); }
.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.steps p { color: var(--muted); font-size: .92rem; margin: 0; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.steps-vertical { grid-template-columns: 1fr; }
.product-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.product-art { background: linear-gradient(160deg, #eef0fb, #f9f9fd); padding: 24px 22%; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); margin: 0 0 4px; }
.swatches { list-style: none; padding: 0; margin: 4px 0 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.swatches li { width: 22px; height: 22px; border-radius: 50%; background: var(--swatch); border: 1px solid rgba(0,0,0,.18); }
.product-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Account */
.account-layout { display: grid; gap: 20px; }
.account-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.account-nav a { white-space: nowrap; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); font-size: .92rem; }
.account-nav a[aria-current=page] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tiles { display: grid; gap: 12px; grid-template-columns: 1fr; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.tile span { color: var(--muted); font-size: .92rem; }
.tile:hover { border-color: var(--brand); }
.session-list { padding-left: 18px; }
.session-list li { margin-bottom: 10px; }

/* Admin */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .82rem; font-weight: 600; text-transform: capitalize; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 20px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { color: var(--muted); font-size: .86rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-warn .stat-value { color: var(--warn); }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { background: var(--bg); font-weight: 600; }

/* Errors */
.error-page { margin: 40px auto; }
.error-code { font-size: 3.5rem; font-weight: 800; color: var(--brand); margin: 0; }
.trace { text-align: left; white-space: pre-wrap; font-size: .78rem; background: #111; color: #eee; padding: 12px; border-radius: 8px; overflow-x: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: 18px; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 14px; }
.footer-row a { color: var(--muted); }

/* account designs grid + admin uploads */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.design-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.design-card:hover { border-color: var(--brand); }
.design-thumb { aspect-ratio: 1; background: #f4f4f8; display: flex; align-items: center; justify-content: center; }
.design-thumb img { width: 100%; height: 100%; object-fit: contain; }
.design-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }

/* admin uploads */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.filter-bar input, .filter-bar select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.filter-bar input { flex: 1; min-width: 200px; }
.bulk-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.upload-thumb { width: 64px; height: 64px; object-fit: contain; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 10px 10px; border-radius: 6px; }
.uploads-table td { vertical-align: middle; }
.uploads-table .actions { display: flex; gap: 6px; }
.uploads-table tr.is-deleted { opacity: .6; }
.pager { display: flex; gap: 6px; margin-top: 12px; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager a[aria-current=page] { background: var(--brand); color: #fff; }
.small { font-size: .85rem; }

@media (min-width: 720px) {
  .hero { grid-template-columns: 1.3fr 1fr; padding-top: 40px; }
  .hero-art { display: block; padding: 0 12%; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps-vertical { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .account-layout { grid-template-columns: 220px 1fr; }
  .account-nav { flex-direction: column; overflow: visible; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
