/* Blue Line Bags — shared design system */

:root {
  --ink: #0d1b2f;
  --ink-soft: #45566e;
  --ink-faint: #7b8aa0;
  --navy: #123a6b;
  --navy-deep: #0a2244;
  --blue: #2f6fb2;
  --blue-bright: #4f9ae0;
  --gold: #c8a86a;
  --paper: #f7f4ef;
  --paper-2: #efeae1;
  --card: #ffffff;
  --line: #e2dcd2;
  --line-strong: #cfc7b9;
  --good: #2e7d52;
  --warn: #b4761d;
  --bad: #b3402f;

  --display: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --shadow-s: 0 1px 2px rgba(13, 27, 47, .06), 0 4px 14px rgba(13, 27, 47, .05);
  --shadow-m: 0 2px 6px rgba(13, 27, 47, .07), 0 18px 44px rgba(13, 27, 47, .1);
  --shadow-l: 0 30px 80px rgba(13, 27, 47, .22);
}

/* Devanagari needs its own faces and a little more leading than the Latin stack. */
:root[data-lang="hi"] {
  --display: "Nirmala UI", "Noto Serif Devanagari", "Mangal", ui-serif, Georgia, serif;
  --sans: "Nirmala UI", "Noto Sans Devanagari", "Mangal", ui-sans-serif, system-ui, sans-serif;
}
:root[data-lang="hi"] body { line-height: 1.72; }
:root[data-lang="hi"] .eyebrow,
:root[data-lang="hi"] .field > span,
:root[data-lang="hi"] .cat { letter-spacing: .04em; }

/* language switcher */
.langswitch {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--paper-2); border-radius: 999px; flex: none;
}
.langswitch.centered { margin: 0 auto 18px; }
.langswitch button {
  border: 0; background: transparent; border-radius: 999px;
  padding: 5px 13px; font-size: .78rem; font-weight: 700;
  color: var(--ink-faint); transition: background .16s ease, color .16s ease;
  white-space: nowrap;
}
.langswitch button:hover { color: var(--navy); }
.langswitch button[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: var(--shadow-s); }
.topbar .langswitch { background: rgba(18, 58, 107, .08); }
.topbar .langswitch button[aria-pressed="true"] { background: #fff; }

.gate-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; }

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

.wrap { width: min(1220px, calc(100% - 48px)); margin-inline: auto; }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 22px; font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  background: var(--navy); color: #fff;
  transition: transform .16s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.btn:hover { background: var(--navy-deep); transform: translateY(-1px); box-shadow: var(--shadow-s); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn.ghost:hover { background: #fff; border-color: var(--navy); }
.btn.quiet { background: transparent; color: var(--ink-soft); border-color: transparent; padding-inline: 10px; }
.btn.quiet:hover { background: rgba(18, 58, 107, .07); color: var(--navy); box-shadow: none; }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #93301f; }
.btn.sm { padding: 7px 14px; font-size: .82rem; }
.btn.block { width: 100%; }

/* ------------------------------------------------------------- fields */

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-faint); font-weight: 700; margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 82px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 154, 224, .2);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.notice {
  border-radius: var(--r-sm); padding: 11px 14px; font-size: .88rem; margin-bottom: 14px;
  border: 1px solid; display: none;
}
.notice.show { display: block; }
.notice.error { background: #fdf0ee; border-color: #f0c6be; color: #8d2f21; }
.notice.ok { background: #eef7f1; border-color: #bfe0cc; color: #235f3f; }

/* ------------------------------------------------------------- gate page */

.gate {
  min-height: 100dvh; display: grid; grid-template-columns: 1.05fr .95fr;
}
.gate-art {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #0a2244 0%, #123a6b 46%, #2f6fb2 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.gate-art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 18%, rgba(255,255,255,.16), transparent 46%),
              radial-gradient(circle at 12% 88%, rgba(200,168,106,.28), transparent 52%);
}
.gate-art > * { position: relative; z-index: 1; }
.gate-art h1 { font-size: clamp(2.4rem, 4vw, 3.5rem); line-height: 1.06; max-width: 12ch; }
.gate-art p { color: rgba(255,255,255,.8); max-width: 42ch; }
.gate-bag { width: min(360px, 70%); margin: 8px auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.35)); }
.gate-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--paper); }
.gate-card { width: min(430px, 100%); }
.gate-card h2 { font-size: 1.9rem; margin-bottom: 4px; }
.gate-card .sub { color: var(--ink-soft); font-size: .93rem; margin: 0 0 24px; }

.tabs { display: flex; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 999px; margin-bottom: 22px; }
.tabs button {
  flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px 12px;
  font-weight: 600; font-size: .88rem; color: var(--ink-soft); transition: all .18s ease;
}
.tabs button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: var(--shadow-s); }

.brandmark { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 1.15rem; letter-spacing: .02em; }
.brandmark .rule { width: 34px; height: 3px; background: var(--gold); border-radius: 2px; }

.fineprint { font-size: .78rem; color: var(--ink-faint); margin-top: 18px; line-height: 1.6; }
.fineprint code { background: var(--paper-2); padding: 1px 6px; border-radius: 4px; font-size: .95em; }

/* ------------------------------------------------------------- storefront */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 239, .86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 70px; }
.topbar .logo { font-family: var(--display); font-size: 1.22rem; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.topbar .logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(47,111,178,.16); }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar nav a, .topbar nav button.linkish {
  border: 0; background: none; padding: 8px 12px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; color: var(--ink-soft); text-decoration: none;
}
.topbar nav a:hover, .topbar nav button.linkish:hover { background: rgba(18,58,107,.07); color: var(--navy); }

.cart-btn { position: relative; }
.cart-btn .count {
  position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--blue); color: #fff; border-radius: 999px;
  font-size: .68rem; font-weight: 800; display: grid; place-items: center;
}
.cart-btn .count:empty, .cart-btn .count[data-zero="1"] { display: none; }

.hero { padding: 68px 0 44px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; font-weight: 800; color: var(--blue); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.1rem); line-height: 1.02; margin-bottom: 18px; }
.hero p { font-size: 1.06rem; color: var(--ink-soft); max-width: 46ch; margin: 0 0 26px; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; }
.hero-stats div strong { display: block; font-family: var(--display); font-size: 1.5rem; }
.hero-stats div span { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); font-weight: 700; }
.hero-art {
  background: linear-gradient(160deg, #123a6b, #2f6fb2); border-radius: var(--r-lg);
  padding: 34px; box-shadow: var(--shadow-m); display: grid; place-items: center;
}
.hero-art svg { width: 100%; max-width: 330px; filter: drop-shadow(0 24px 36px rgba(0,0,0,.3)); }
.hero-art .bag-photo { border-radius: 12px; max-height: 400px; box-shadow: 0 24px 44px rgba(0,0,0,.3); }

.section-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.85rem; }
.section-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: .93rem; }

.filters { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 999px;
  padding: 7px 15px; font-size: .82rem; font-weight: 600; color: var(--ink-soft);
  transition: all .16s ease;
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Department chooser — the two doors into the catalogue. */
.dept-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding-bottom: 70px; }
.dept-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column; text-align: left;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dept-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); border-color: var(--navy); }
.dept-card .art {
  aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 22px;
  position: relative; overflow: hidden;
}
.dept-card .art.photo { padding: 0; }
/* Pin the photo to the frame so it crops to the 16:9 band instead of
   stretching the card to the image's own height. */
.dept-card .art.photo .bag-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dept-card .art svg { max-height: 100%; }
.dept-card .body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 8px; }
.dept-card h3 { font-size: 1.9rem; line-height: 1.1; }
.dept-card .dept-lede { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.dept-card .dept-stats {
  display: flex; gap: 20px; margin-top: 10px;
  font-size: .76rem; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700; color: var(--ink-faint);
}
.dept-card .dept-stats strong { color: var(--navy); font-family: var(--display); font-size: 1.05rem; letter-spacing: 0; }
.dept-card .dept-go { margin-top: 16px; color: var(--navy); font-weight: 700; font-size: .9rem; }

/* Keep the back/swap bar clear of the sticky topbar when we scroll to it. */
#catalogue { scroll-margin-top: 84px; }
.dept-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.dept-swap { margin-left: auto; display: flex; gap: 7px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 26px; padding-bottom: 70px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); border-color: var(--line-strong); }
.card .art { aspect-ratio: 4 / 3.4; display: grid; place-items: center; padding: 22px; position: relative; }
.card .art svg { width: 78%; filter: drop-shadow(0 14px 20px rgba(13,27,47,.16)); }
/* An uploaded photo fills its frame edge to edge; generated art keeps its padding. */
.card .art.photo { padding: 0; overflow: hidden; }
.bag-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .art.photo .tag { z-index: 2; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card .cat { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: var(--blue); }
.card h3 { font-size: 1.16rem; }
.card .blurb { font-size: .86rem; color: var(--ink-soft); flex: 1; margin: 0; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.price { font-family: var(--display); font-size: 1.28rem; font-weight: 600; }

.tag {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.94);
  border-radius: 999px; padding: 4px 11px; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: var(--navy);
}
.tag.low { color: var(--warn); }
.tag.out { color: var(--bad); }

/* ------------------------------------------------------------- drawer / modal */

.scrim {
  position: fixed; inset: 0; background: rgba(10, 22, 40, .5);
  backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 90;
}
.scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(430px, 100%);
  background: var(--paper); z-index: 100; box-shadow: var(--shadow-l);
  transform: translateX(102%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.drawer header h2 { font-size: 1.28rem; }
.drawer .scroll { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer footer { padding: 18px 22px 22px; border-top: 1px solid var(--line); background: #fff; }

.close-x { border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--ink-faint); padding: 4px 8px; border-radius: 8px; }
.close-x:hover { background: var(--paper-2); color: var(--ink); }

.line-item { display: grid; grid-template-columns: 62px 1fr auto; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-item .thumb { background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; }
.line-item .thumb svg { width: 74%; }
.line-item .thumb .bag-photo { border-radius: 9px; }
.line-item h4 { font-size: .95rem; font-family: var(--sans); font-weight: 700; }
.line-item .meta { font-size: .8rem; color: var(--ink-faint); }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; margin-top: 5px; }
.qty button { border: 0; background: none; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; color: var(--ink-soft); }
.qty button:hover { background: var(--paper-2); color: var(--navy); }
.qty span { min-width: 20px; text-align: center; font-size: .84rem; font-weight: 700; }

.totals { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.totals span { color: var(--ink-soft); font-size: .9rem; }
.totals strong { font-family: var(--display); font-size: 1.55rem; }

.empty { text-align: center; padding: 54px 20px; color: var(--ink-faint); }
.empty svg { width: 96px; opacity: .4; margin-bottom: 14px; }

.modal {
  position: fixed; inset: 0; z-index: 110; display: none; place-items: center; padding: 24px;
  overflow-y: auto;
}
.modal.open { display: grid; }
.modal-card {
  background: var(--paper); border-radius: var(--r-lg); width: min(560px, 100%);
  box-shadow: var(--shadow-l); padding: 30px; position: relative; margin: auto;
}
.modal-card h2 { font-size: 1.6rem; margin-bottom: 4px; }
.modal-card .sub { color: var(--ink-soft); font-size: .9rem; margin: 0 0 22px; }

.detail-art { border-radius: var(--r); padding: 26px; display: grid; place-items: center; margin-bottom: 20px; }
.detail-art svg { width: 62%; max-width: 230px; filter: drop-shadow(0 18px 26px rgba(13,27,47,.2)); }
/* Product photos are often full catalogue cards with specs printed on them, so the
   detail view shows the whole image rather than cropping it like the grid tile. */
.detail-art.photo { padding: 10px; overflow: hidden; }
.detail-art.photo .bag-photo {
  object-fit: contain; width: auto; height: auto;
  max-width: 100%; max-height: 62vh; border-radius: 10px; margin-inline: auto;
}
.spec { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .87rem; margin: 16px 0 22px; }
.spec dt { color: var(--ink-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; align-self: center; }
.spec dd { margin: 0; }

.success-mark {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: #eef7f1; color: var(--good); font-size: 1.8rem; margin: 0 auto 16px;
}

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-row { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; background: #fff; }
.order-row .top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.order-row .ref { font-weight: 700; font-size: .9rem; }
.order-row .items { font-size: .84rem; color: var(--ink-soft); margin-top: 6px; }

.pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.pill.new { background: #e8f0fb; color: #1c4f8f; }
.pill.confirmed { background: #e9f1ff; color: #24468c; }
.pill.packed { background: #fdf3e2; color: #91641a; }
.pill.shipped { background: #eaf3fb; color: #1f6193; }
.pill.delivered { background: #eaf6ef; color: #23623f; }
.pill.cancelled { background: #fbecea; color: #93301f; }
.pill.active { background: #eaf6ef; color: #23623f; }
.pill.suspended { background: #fbecea; color: #93301f; }

footer.site { border-top: 1px solid var(--line); padding: 34px 0; color: var(--ink-faint); font-size: .84rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-m);
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------- standalone message pages */

.msg-page { min-height: 100dvh; display: grid; place-items: center; padding: 30px; text-align: center; }
.msg-card { max-width: 460px; }
.msg-card .icon { font-size: 2.6rem; margin-bottom: 12px; }
.msg-card h1 { font-size: 2rem; margin-bottom: 10px; }
.msg-card p { color: var(--ink-soft); margin: 0 0 22px; }

@media (max-width: 900px) {
  .gate { grid-template-columns: 1fr; }
  .gate-art { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .wrap { width: calc(100% - 32px); }
  .row2 { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: 1fr; }
  .dept-swap { margin-left: 0; width: 100%; }
}
