/*
 * Brand red = --red-deep (#6E0F0F). This is THE red for RZ Prints: header, primary
 * buttons, filled panels like the downpayment banner. Keep filled red surfaces on
 * --red-deep so they all match the header. --red is for small accents only
 * (rules, active pills, price text); --red-dark is a hover/mid step.
 */
:root {
  --red: #D62828;
  --red-dark: #A61B1B;
  --red-deep: #6E0F0F;
  --red-soft: #FDECEC;
  --red-tint: #FFF6F6;
  --amber: #F7A416;
  --dark: #1F1B24;
  --dark-2: #2E2735;
  --ink: #2A2326;
  --muted: #7A6E72;
  --line: #EFE2E2;
  --bg: #FBF7F7;
  --card: #ffffff;
  --success: #2E9E5B;
  --danger: #C62828;
  --radius: 8px;
  --shadow: 0 6px 24px rgba(110, 15, 15, 0.08);
  --shadow-lg: 0 20px 60px rgba(31, 27, 36, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* The cart drawer parks off-screen to the right; without this the page can be
   scrolled sideways and the header controls fall out of view. */
html { overflow-x: hidden; }
body {
  font-family: 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  font-weight: 500;
  overflow-x: hidden;
}
a { color: var(--red-dark); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
.hidden { display: none !important; }

/* ── Header ── */
.topbar {
  background: var(--red-deep);
  color: #fff;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 4px 18px rgba(110,15,15,.25);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-logo { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.brand-name { font-weight: 900; font-size: 19px; letter-spacing: .2px; line-height: 1.1; }
.brand-sub { font-size: 12px; color: rgba(255,255,255,.8); }
.topbar-links { display: flex; align-items: center; gap: 16px; }
.topbar-links a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; opacity: .9; }
.topbar-links a:hover { opacity: 1; text-decoration: underline; }
.cart-toggle {
  position: relative; background: rgba(255,255,255,.16); border: none; color: #fff;
  height: 42px; padding: 0 16px 0 13px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800;
}
.cart-toggle:hover { background: rgba(255,255,255,.26); }
.cart-toggle svg { width: 20px; height: 20px; }
.cart-count {
  background: var(--amber); color: var(--dark);
  font-size: 12px; font-weight: 900; min-width: 22px; height: 22px; border-radius: 11px;
  display: grid; place-items: center; padding: 0 6px;
}
@media (max-width: 560px) { .cart-label { display: none; } .cart-toggle { padding: 0 12px; } }

/* ── Hero ── */
.hero {
  background: radial-gradient(1200px 300px at 20% 0%, rgba(247,164,22,.18), transparent 60%), var(--red-tint);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 26px 24px 22px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 900; color: var(--red-deep); letter-spacing: -.2px; }
.hero p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 640px; }

/* ── Page ── */
.page-wide { max-width: 1240px; margin: 26px auto 10px; padding: 0 24px; }
.page { max-width: 900px; margin: 24px auto; padding: 0 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 22px; }
.card-title { margin: 0 0 12px; font-size: 17px; font-weight: 900; color: var(--dark); }
.checkout-card { max-width: 820px; margin: 0 auto; }

/* ── Filters ── */
.filters-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 26px;
}
.filters-bar select, .search-wrap { border: 1.5px solid var(--line); border-radius: 6px; background: #fff; }
.filters-bar select { padding: 11px 12px; min-width: 190px; font-weight: 700; }
.search-wrap { display: flex; align-items: center; gap: 8px; padding: 0 12px; flex: 1; min-width: 220px; }
.search-wrap svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search-wrap input { border: none; outline: none; padding: 11px 0; width: 100%; background: transparent; }
.filters-bar select:focus, .search-wrap:focus-within, .field input:focus, .status-form input:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(214,40,40,.14);
}
.result-count { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: auto; }

/* ── Category sections + product grid ── */
.cat-section { margin-bottom: 38px; }
.cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.cat-head h2 {
  margin: 0; font-size: 19px; font-weight: 900; color: var(--red-deep);
  padding-bottom: 6px; border-bottom: 3px solid var(--red); display: inline-block;
}
.cat-head .count { font-size: 13px; color: var(--muted); font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.product {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #f2c9c9; }
.product-img {
  /* Product banners are square (1080x1080), so a square frame fills edge to edge
     with no wasted space. Anything with a different ratio is fitted whole and
     padded on the short side rather than cropped. */
  aspect-ratio: 1 / 1; background: #FBF9F9; border-bottom: 1px solid var(--line);
  display: grid; place-items: center; color: var(--red); overflow: hidden; cursor: pointer; position: relative;
}
/* Show the whole image — cover would slice off the sizes and page counts. */
.product-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; font-size: 0; color: transparent; transition: transform .25s; }
.product:hover .product-img img { transform: scale(1.03); }
.product-img svg { width: 48px; height: 48px; opacity: .45; }
.product-img .view-hint {
  position: absolute; bottom: 10px; right: 10px; background: rgba(31,27,36,.75); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; opacity: 0; transition: opacity .15s;
}
.product:hover .view-hint { opacity: 1; }
.product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.product-cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--red-dark); font-weight: 800; }
.product-name {
  font-weight: 800; font-size: 15.5px; margin: 0; line-height: 1.35; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-name:hover { color: var(--red); }
.product-desc {
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-price { font-weight: 900; color: var(--red); font-size: 18px; }
.product-price small { font-weight: 600; color: var(--muted); font-size: 11.5px; }
/* Price and minimum share one row so the card stays compact. */
.product-price-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 8px;
}
.product-min { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.product-min b { color: var(--dark); }
.product-tiers { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.product-tiers span { display: inline-block; margin-right: 10px; white-space: nowrap; }
.product-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.product-add input {
  width: 68px; padding: 9px 6px; border: 1.5px solid var(--line); border-radius: 6px; text-align: center; font-weight: 700;
}
.product-add .btn { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 6px; border: none; font-weight: 800;
  transition: background .15s, transform .1s, box-shadow .15s; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red-deep); color: #fff; box-shadow: 0 3px 10px rgba(110,15,15,.25); }
.btn-primary:hover { background: #571010; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-2); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); border-radius: 6px; }
.btn-ghost:hover { background: var(--red-tint); border-color: #f2c9c9; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.empty { text-align: center; color: var(--muted); padding: 50px 10px; width: 100%; }

/* ── Cart drawer ── */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(31,27,36,.45); z-index: 38; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 94vw); z-index: 39;
  background: #fff; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .22s ease;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.cart-close { background: none; border: none; font-size: 30px; line-height: 1; color: var(--muted); }
.cart-close:hover { color: var(--red); }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; background: var(--red-tint); }

.cart-items { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.cart-item-name { font-weight: 800; font-size: 14px; }
.cart-item-meta { font-size: 12px; color: var(--muted); }
.cart-item-total { font-weight: 800; text-align: right; color: var(--red-dark); }
.cart-item-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cart-item-actions input {
  width: 66px; padding: 6px; border: 1.5px solid var(--line); border-radius: 6px; text-align: center; font-weight: 700;
}
.cart-item-actions .btn-sm { padding: 5px 11px; }
.link-danger { background: none; border: none; color: var(--danger); font-size: 12.5px; padding: 0; margin-left: auto; font-weight: 700; }
.link-danger:hover { text-decoration: underline; }
.cart-warn { grid-column: 1 / -1; font-size: 11.5px; color: var(--danger); font-weight: 700; }

.totals-row { display: flex; justify-content: space-between; font-size: 14px; margin: 5px 0; }
.totals-row.grand { font-size: 20px; font-weight: 900; }
.totals-row.dp { color: var(--red-dark); font-weight: 800; }
.totals-note { font-size: 12px; color: var(--muted); }

/* ── Checkout view ── */
.checkout-card .card-body { padding: 30px 32px 28px; }
@media (max-width: 600px) { .checkout-card .card-body { padding: 20px 18px; } }
.co-main { min-width: 0; }

.co-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding-bottom: 16px; margin-bottom: 22px; border-bottom: 3px solid var(--red); flex-wrap: wrap;
}
.co-eyebrow { font-size: 12px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: var(--red); }
.co-shop { font-size: 23px; font-weight: 900; color: var(--dark); line-height: 1.2; margin-top: 4px; }
.co-shopmeta { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.co-head-right { text-align: right; }
.co-date-label { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.co-date { font-size: 15px; font-weight: 800; color: var(--dark); margin-top: 3px; }
.req { color: var(--red); }

.summary-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.summary-table th, .summary-table td { padding: 13px 10px; text-align: left; }
.summary-table thead th {
  font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .9px;
  background: #FAF6F6; border-bottom: 1px solid var(--line);
}
.summary-table td.num, .summary-table th.num { text-align: right; white-space: nowrap; }
.summary-table tbody td { font-weight: 700; border-bottom: 1px solid var(--line); }
.summary-table tbody td.num { font-weight: 800; }
.summary-table tfoot td { border: none; padding: 7px 10px; color: var(--muted); font-weight: 700; }
.summary-table tfoot td.num { color: var(--ink); font-weight: 800; }
.summary-table tfoot tr:first-child td { padding-top: 14px; }
.summary-table tfoot .co-fee td { color: #A8763A; font-weight: 700; }
.summary-table tfoot .co-grand td {
  border-top: 2px solid var(--dark); font-size: 18px; font-weight: 900; color: var(--dark); padding-top: 13px;
}

.dp-banner {
  margin-top: 24px; background: var(--red-deep); color: #fff; border-radius: 8px;
  padding: 24px 26px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  box-shadow: 0 6px 18px rgba(110,15,15,.22);
}
.dp-label { font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: .9; }
.dp-amount { font-size: 46px; font-weight: 900; line-height: 1; margin: 8px 0; color: #fff; }
.dp-note { font-size: 13px; opacity: .9; max-width: 46ch; line-height: 1.45; }
/* Always stacked: the banner lives in the narrow checkout column, where a
   side-by-side split wrapped awkwardly and left a stray vertical divider. */
.dp-balance {
  width: 100%; text-align: left; padding-top: 14px; margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,.28);
}
.dp-balance-amount { font-size: 22px; font-weight: 900; margin-top: 4px; }
@media (max-width: 760px) {
  .dp-banner { padding: 20px; }
  .dp-amount { font-size: 36px; }
}

.delivery-note {
  margin-top: 16px; padding: 14px 16px; border-radius: 8px; font-size: 13.5px; line-height: 1.55;
  background: #FFF8E8; border: 1px solid #F0D9A4; color: #6B4C05;
  border-left: 4px solid var(--amber);
}

.pay-box {
  display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: center;
  background: #FCFAFA; border: 1px solid var(--line); border-radius: 8px; padding: 22px;
}
@media (max-width: 620px) { .pay-box { grid-template-columns: 1fr; gap: 18px; } }
.qr-img { border-radius: 6px; background: #fff; padding: 10px; border: 1px solid var(--line); width: 100%; }
.qr-missing {
  width: 100%; aspect-ratio: 1; border-radius: 6px; background: #fff; border: 1.5px dashed var(--line);
  display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); padding: 10px;
}
.pay-title { margin: 0 0 10px; font-size: 19px; font-weight: 900; color: var(--dark); }
.pay-method {
  display: inline-block; font-size: 11.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase;
  background: var(--red-soft); color: var(--red-dark); padding: 4px 10px; border-radius: 999px;
}
.pay-account { font-size: 17px; font-weight: 800; color: var(--dark); margin-top: 10px; }
.pay-number { font-size: 25px; font-weight: 900; color: var(--dark); letter-spacing: .5px; line-height: 1.2; }

/* ── Details form ── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.details-form {
  background: #FCFAFA; border: 1px solid var(--line); border-radius: 8px; padding: 20px;
}
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 13.5px; font-weight: 800; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.req-tag {
  font-size: 10px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase;
  background: var(--red-deep); color: #fff; padding: 2px 7px; border-radius: 999px;
}
.opt-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  background: #EFEAEA; color: var(--muted); padding: 2px 7px; border-radius: 999px;
}
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="password"] {
  padding: 13px 14px; border: 2px solid #E2D8D8; border-radius: 6px; background: #fff;
  font-weight: 600; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #B9AEAE; font-weight: 500; }
.field input:hover { border-color: #CDBEBE; }
.field input:focus {
  outline: none; border-color: var(--red-deep); box-shadow: 0 0 0 3px rgba(110,15,15,.12);
}
/* A filled required field reads as done, so the eye goes to what's left. */
.field input:required:valid { border-color: #BFD9C6; }
.field .hint { font-size: 12px; color: var(--muted); }

/* ── Upload dropzone ── */
.upload-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 26px 20px; border: 2px dashed #D8C7C7; border-radius: 8px; background: #fff;
  cursor: pointer; text-align: center; transition: border-color .15s, background .15s;
  position: relative; min-height: 150px;
}
.upload-drop:hover, .upload-drop.dragover { border-color: var(--red-deep); background: var(--red-tint); }
.upload-icon { width: 34px; height: 34px; color: var(--red-deep); opacity: .8; }
.upload-main { font-size: 14.5px; font-weight: 800; color: var(--dark); }
.upload-sub { font-size: 12px; color: var(--muted); max-width: 380px; line-height: 1.5; }
.upload-drop.has-file { border-style: solid; border-color: var(--success); background: #F6FBF7; }
.upload-drop.has-file .upload-icon { display: none; }
.upload-preview {
  max-height: 150px; width: auto; border-radius: 6px; border: 1px solid var(--line); background: #fff;
}

.btn-submit { padding: 13px 26px; font-size: 15px; }

.checkout-card { max-width: 1120px; margin: 0 auto; }
/* Desktop puts the order summary and payment on the left, the form on the
   right, so the page reads across instead of running very long. */
.co-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 30px; align-items: start; }
.co-side { position: sticky; top: 92px; }
@media (max-width: 900px) {
  .co-grid { grid-template-columns: 1fr; gap: 24px; }
  .co-side { position: static; }
  .co-side .card-title { margin-top: 4px; }
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .form-row { grid-template-columns: 1fr; gap: 0; } }

.alert { padding: 12px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 14px; font-weight: 600; }
.alert-error { background: #fdecea; color: #922; border: 1px solid #f5c2c0; }
.alert-success { background: #e6f6ec; color: #1e6b3d; border: 1px solid #b9e2c8; }

.checkout-actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }

/* ── Success ── */
.success-box { text-align: center; padding: 30px 16px; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: #fff;
  font-size: 32px; font-weight: 900; display: grid; place-items: center; margin: 0 auto 12px;
}
.success-box .ref {
  display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 24px; font-weight: 800; background: var(--dark); color: var(--amber);
  padding: 10px 18px; border-radius: 6px; margin: 12px 0; letter-spacing: 1px;
}

/* ── Variants ── */
/* Option count sits on the image, so it costs no vertical space in the card. */
.variant-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(110,15,15,.9); color: #fff;
  font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  letter-spacing: .2px;
}
.variant-badge.out { background: rgba(90,90,90,.9); }
.product-price .from { font-size: 11px; font-weight: 700; color: var(--muted); }
.product-out { opacity: .72; }
.product-out .product-img img { filter: grayscale(.85); }

.modal-variants { margin: 4px 0 2px; }
.variant-label { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 8px; }
.variant-list { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-pill {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 6px;
  background: #fff; text-align: left; transition: border-color .15s, background .15s;
}
/* Hover must not apply to the selected pill — the light hover background made
   its white text unreadable. */
.variant-pill:hover:not(:disabled):not(.selected) { border-color: var(--red); background: var(--red-tint); }
.variant-pill.selected,
.variant-pill.selected:hover { border-color: var(--red-deep); background: var(--red-deep); color: #fff; }
.variant-pill.selected .variant-name { color: #fff; }
.variant-pill.selected .variant-price { color: rgba(255,255,255,.92); }
.variant-name { font-weight: 800; font-size: 14px; }
.variant-price { font-size: 12.5px; font-weight: 700; color: var(--red-dark); }
/* Inactive options stay visible but unpickable, so customers can see what
   normally exists rather than wondering whether it was removed. */
.variant-pill.disabled, .variant-pill:disabled {
  opacity: .55; cursor: not-allowed; background: #F6F3F3; border-style: dashed;
}
.variant-pill.disabled .variant-name { text-decoration: line-through; }
.variant-out { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--danger); }

.cart-item-variant {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--red-soft); color: var(--red-dark); font-size: 11px; font-weight: 800;
}
.cart-item-out { border-color: #f0b8b8; background: #FFF7F7; }

/* ── Messenger handoff on success screen ── */
.fb-box {
  margin: 22px auto 18px; max-width: 480px; text-align: center;
  background: var(--red-tint); border: 1px solid var(--line); border-radius: 8px; padding: 20px;
}
.fb-title { margin: 0 0 6px; font-size: 16px; font-weight: 900; color: var(--dark); }
.fb-sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.btn-messenger {
  background: #0084FF; color: #fff; width: 100%; padding: 13px 18px; font-size: 15px;
  box-shadow: 0 4px 12px rgba(0,132,255,.28);
}
.btn-messenger:hover { background: #0071DB; }
.btn-messenger svg { width: 20px; height: 20px; }
.fb-details { margin-top: 12px; text-align: left; }
.fb-details summary { font-size: 12.5px; color: var(--muted); cursor: pointer; font-weight: 700; text-align: center; }
.fb-text {
  width: 100%; margin-top: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 6px;
  font-size: 12.5px; font-family: inherit; line-height: 1.5; resize: vertical; background: #fff;
}

/* ── Product modal ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(31,27,36,.6); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 45;
}
.modal {
  background: #fff; border-radius: 10px; max-width: 780px; width: 100%; max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg); position: relative; animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* ── Single product page ── */
.crumb { font-size: 12.5px; color: var(--muted); margin: 18px 0 14px; }
.crumb a { color: var(--red-dark); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb span { margin: 0 4px; }
.product-page-card { max-width: 900px; margin: 0 auto; }
.back-link { text-align: center; margin: 18px 0 6px; }
.back-link a { color: var(--red-dark); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

.modal-close {
  position: fixed; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(31,27,36,.7); color: #fff; font-size: 24px; line-height: 1;
}
.modal-close:hover { background: var(--red); }
.modal-grid { display: grid; grid-template-columns: 330px 1fr; }
/* Grid items default to min-width:auto, so they refuse to shrink below their
   content's natural width — on a narrow phone this let the image column stay
   wider than the viewport, cropping the image instead of shrinking it. */
.modal-grid > * { min-width: 0; }
@media (max-width: 680px) { .modal-grid { grid-template-columns: 1fr; } }
.modal-img {
  background: #FBF9F9; padding: 8px;
  display: grid; place-items: center; color: var(--red); overflow: hidden;
}
.modal-img img { width: 100%; height: auto; max-height: 56vh; object-fit: contain; }
.modal-media { display: flex; flex-direction: column; border-right: 1px solid var(--line); }

/* Product photos: small strip right under the main image, click swaps it in */
.modal-photos { display: flex; gap: 6px; padding: 8px; overflow-x: auto; justify-content: center; background: #FBF9F9; }
.modal-photos .modal-thumb {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 6px; overflow: hidden;
  border: 2px solid transparent; background: #fff; padding: 0; cursor: pointer; transition: border-color .15s;
}
.modal-photos .modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-photos .modal-thumb:hover { border-color: #f0b8b8; }
.modal-photos .modal-thumb.active { border-color: var(--red-deep); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(20,16,18,.92);
  display: flex; align-items: center; justify-content: center; padding: 40px;
  animation: lb-fade .18s ease-out;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img {
  max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px;
  box-shadow: 0 10px 50px rgba(0,0,0,.5); animation: lb-pop .2s ease-out;
}
@keyframes lb-pop { from { transform: scale(.96); } to { transform: scale(1); } }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 30px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-count {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; font-weight: 700; background: rgba(0,0,0,.4); padding: 5px 12px; border-radius: 999px;
}
@media (max-width: 600px) {
  .lightbox { padding: 12px; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 24px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}
.modal-img svg { width: 80px; height: 80px; opacity: .4; }
.modal-body { padding: 28px 26px 24px; display: flex; flex-direction: column; gap: 8px; }
.modal-title { margin: 0; font-size: 22px; font-weight: 900; color: var(--dark); line-height: 1.2; }
.modal-full-link { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--red-dark); text-decoration: none; }
.modal-full-link:hover { text-decoration: underline; }
.modal-price { font-size: 24px; font-weight: 900; color: var(--red); }
.modal-price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.modal-min { font-size: 12.5px; color: var(--muted); }
.modal-min b { color: var(--dark); }
.modal-desc { margin: 4px 0; font-size: 14px; color: var(--ink); white-space: pre-line; }
/* Tiers are information, not controls — keep them visually flat so they don't
   read as buttons next to the variant pills. */
.modal-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; margin: 2px 0; }
.modal-tiers .tier {
  font: inherit; text-align: left; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  background: #FCFAFA; border: 1.5px solid var(--line); border-radius: 6px; padding: 5px 9px;
  transition: border-color .15s, background .15s, transform .1s;
}
.modal-tiers .tier:hover { border-color: #f0b8b8; background: var(--red-tint); transform: translateY(-1px); }
.modal-tiers .tier:active { transform: translateY(0); }
.tier-range { font-size: 11px; color: var(--muted); font-weight: 700; }
.tier-price { font-size: 13px; font-weight: 900; color: var(--ink); }
.modal-tiers .tier.active { background: var(--red-deep); border-color: var(--red-deep); }
.modal-tiers .tier.active .tier-range { color: rgba(255,255,255,.85); }
.modal-tiers .tier.active .tier-price { color: #fff; }
.modal-tiers-label { font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-top: 6px; }

/* Struck-through original price beside the discounted one */
.price-was { font-size: 15px; color: var(--muted); text-decoration: line-through; font-weight: 700; margin-right: 6px; }
.price-now { color: var(--red); font-weight: 900; }

.modal-savings {
  display: flex; align-items: center; gap: 8px; background: #EFF9F2; border: 1px solid #BFE6CC;
  border-radius: 8px; padding: 8px 12px; font-size: 12.5px; color: #1E6B3D; line-height: 1.45;
}
.save-badge {
  flex-shrink: 0; background: #1E9E52; color: #fff; font-weight: 900; font-size: 12px;
  padding: 3px 8px; border-radius: 999px;
}
.save-text b { font-weight: 900; }
.modal-tier-hint {
  font-size: 12px; color: var(--muted); background: #FCFAFA; border: 1px dashed var(--line);
  border-radius: 8px; padding: 7px 11px;
}
.modal-tier-hint b { color: var(--red-dark); }

.modal-add {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: end; margin-top: auto; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.modal-add .btn {
  height: 48px; padding: 0 18px; font-size: 14.5px; display: flex; align-items: center; justify-content: center;
  gap: 6px; white-space: normal; text-align: center; line-height: 1.3;
}
.qty-field { display: flex; flex-direction: column; gap: 5px; }
.qty-field-label { font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.qty-stepper { display: flex; border: 2px solid var(--red-deep); border-radius: 6px; overflow: hidden; background: #fff; height: 48px; }
.qty-stepper input { width: 64px; border: none; text-align: center; font-weight: 900; font-size: 16px; outline: none; -moz-appearance: textfield; padding: 0; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-btn { width: 38px; border: none; background: var(--red-deep); color: #fff; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.qty-btn:hover { background: var(--red); }
@media (max-width: 420px) {
  .modal-add { grid-template-columns: 1fr; }
  .qty-stepper { width: 100%; }
  .qty-stepper input { flex: 1; width: auto; }
}

.modal-samples { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-samples-label { font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 10px; }
/* Reference carousel of real finished-order photos — horizontal scroll, click opens the lightbox */
.sample-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.sample-thumb {
  flex: 0 0 auto; width: 92px; height: 92px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #FBF9F9; padding: 0; cursor: zoom-in; scroll-snap-align: start;
  transition: transform .15s, border-color .15s;
}
.sample-thumb:hover { border-color: #f0b8b8; transform: translateY(-2px); }
.sample-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Order tracking page ── */
.track-head-card { margin-top: 18px; }
.track-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.track-ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 24px; font-weight: 900; letter-spacing: .5px; }
.track-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Progress steps */
.track-steps { display: flex; list-style: none; margin: 22px 0 0; padding: 0; gap: 6px; }
.track-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.track-steps li::before {
  content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0;
}
.track-steps li:first-child::before { display: none; }
.track-steps li.done::before { background: var(--red-deep); }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: #fff; border: 3px solid var(--line); color: var(--muted); font-weight: 900; font-size: 13px;
}
.track-steps li.done .step-dot { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.step-label { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.track-steps li.done .step-label { color: var(--dark); }

.track-notice { margin-top: 20px; padding: 14px 16px; border-radius: 6px; font-size: 14px; line-height: 1.5; border-left: 4px solid; }
.track-notice.warn { background: #FFF8E8; border-color: var(--amber); color: #6B4C05; }
.track-notice.info { background: #FFF4E4; border-color: #D98C0A; color: #8A5A05; }
.track-notice.ok { background: #EFF9F2; border-color: var(--success); color: #1E6B3D; }
.track-notice.bad { background: #FDECEA; border-color: var(--danger); color: #9B2C2A; }

.track-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 20px; margin-top: 18px; align-items: start; }
@media (max-width: 940px) { .track-grid { grid-template-columns: 1fr; } }
.track-main { min-width: 0; }

.section-sub { margin: -4px 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.empty-slim { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; background: #FCFAFA; border-radius: 6px; margin-top: 12px; grid-column: 1 / -1; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-count { font-size: 11.5px; font-weight: 800; color: var(--muted); background: #F3EDED; padding: 3px 9px; border-radius: 999px; }
.link-btn { background: none; border: none; color: var(--red-dark); font-weight: 800; font-size: 12.5px; cursor: pointer; padding: 0; }
.link-btn:disabled { color: var(--muted); cursor: default; }

/* Compact upload strip — a full dropzone per file list would dominate the page */
.upload-strip {
  display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden;
  border: 2px dashed #D8C7C7; border-radius: 6px; padding: 12px 14px; background: #fff;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.upload-strip:hover, .upload-strip.dragover { border-color: var(--red-deep); background: var(--red-tint); }
.upload-strip.uploading { opacity: .7; pointer-events: none; }
.upload-strip-icon { color: var(--red-deep); display: grid; place-items: center; flex-shrink: 0; }
.upload-strip-icon svg { width: 22px; height: 22px; }
.upload-strip-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.upload-strip-text b { font-size: 14px; }
.upload-strip-text small { font-size: 11.5px; color: var(--muted); }
.upload-strip-progress {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--red-deep);
  transition: width .2s; opacity: 0;
}
.upload-strip-progress.active { opacity: 1; }

/* Thumbnail tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; margin-top: 14px; align-items: start; }
.tile { margin: 0; position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.tile-thumb { display: grid; place-items: center; aspect-ratio: 1; background: #FBF9F9; text-decoration: none; overflow: hidden; }
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile-ext { font-size: 13px; font-weight: 900; color: var(--red-deep); letter-spacing: .5px; }
/* Fixed caption height keeps the grid even when filenames differ in length. */
.tile-cap { padding: 6px 8px; display: flex; flex-direction: column; justify-content: center; gap: 1px; border-top: 1px solid var(--line); min-height: 42px; }
.tile-name { font-size: 11.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-size { font-size: 10.5px; color: var(--muted); }
.tile-x, .tile-dl {
  position: absolute; top: 5px; width: 24px; height: 24px; border-radius: 50%; border: none;
  display: grid; place-items: center; font-size: 15px; font-weight: 800; cursor: pointer;
  background: rgba(31,27,36,.72); color: #fff; text-decoration: none; opacity: 0; transition: opacity .15s;
}
.tile-x { right: 5px; }
.tile-dl { left: 5px; font-size: 13px; }
.tile:hover .tile-x, .tile:hover .tile-dl { opacity: 1; }
.tile-x:hover { background: var(--danger); }
.tile-dl:hover { background: var(--red-deep); }
@media (hover: none) { .tile-x, .tile-dl { opacity: 1; } }

/* Payment section: QR beside the proof slot */
.pay-split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 4px; }
@media (max-width: 620px) { .pay-split { grid-template-columns: 1fr; } }
/* Once an order is closed there's nothing left to pay, so the QR is dropped and
   the proof gets the full width instead of sitting as a lone small tile. */
.pay-split-closed { grid-template-columns: 1fr; }
.pay-split-closed .tile-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: 340px; }
.pay-qr-col { text-align: center; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #FCFAFA; transition: opacity .2s; }
/* Once proof is in, the QR is no longer the thing to look at. */
.pay-qr-col.dimmed { opacity: .45; }
.pay-qr { width: 100%; border-radius: 4px; background: #fff; padding: 6px; border: 1px solid var(--line); }
.pay-qr.zoomable { cursor: zoom-in; transition: transform .15s; }
.pay-qr.zoomable:hover { transform: scale(1.02); }

/* Full-screen QR, so it can be scanned from a phone held to the monitor */
.qr-overlay {
  position: fixed; inset: 0; background: rgba(31,27,36,.78); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
.qr-overlay.open { display: flex; }
.qr-overlay-inner { background: #fff; border-radius: 10px; padding: 22px; text-align: center; max-width: 92vw; }
.qr-overlay-inner img { width: min(74vh, 420px); height: auto; display: block; }
.qr-overlay-cap { font-size: 13.5px; color: var(--muted); margin-top: 12px; font-weight: 700; }
.qr-overlay-close {
  margin-top: 14px; background: var(--red-deep); color: #fff; border: none; border-radius: 6px;
  padding: 10px 24px; font-weight: 800; cursor: pointer;
}
.pay-qr-meta { margin-top: 10px; }
.pay-qr-meta .pay-method { display: inline-block; }
.pay-qr-meta .pay-account { font-size: 14px; margin-top: 8px; }
.pay-qr-meta .pay-number { font-size: 18px; }

.proof-drop {
  display: grid; place-items: center; min-height: 190px; border: 2px dashed #D8C7C7; border-radius: 6px;
  background: #fff; cursor: pointer; padding: 14px; text-align: center; transition: border-color .15s, background .15s;
}
.proof-drop:hover, .proof-drop.dragover { border-color: var(--red-deep); background: var(--red-tint); }
.proof-drop.uploading { opacity: .7; pointer-events: none; }
.proof-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.proof-empty b { font-size: 14.5px; }
.proof-empty small { font-size: 12px; color: var(--muted); }
.proof-filled { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.proof-preview { max-height: 190px; width: auto; border-radius: 4px; border: 1px solid var(--line); }
.proof-meta { display: flex; flex-direction: column; gap: 1px; }
.proof-meta b { font-size: 12.5px; }
.proof-meta small { font-size: 11px; color: var(--muted); }
.proof-actions { display: flex; gap: 14px; justify-content: center; margin-top: 10px; }
.proof-actions a, .tile-remove-text { font-size: 12.5px; font-weight: 700; background: none; border: none; padding: 0; cursor: pointer; }
.proof-actions a { color: var(--red-dark); }
.tile-remove-text { color: var(--danger); }

.track-textarea {
  width: 100%; padding: 12px 14px; border: 2px solid #E2D8D8; border-radius: 6px; font: inherit;
  font-size: 13.5px; resize: vertical; background: #fff; margin-bottom: 8px;
}
.track-textarea:focus { outline: none; border-color: var(--red-deep); box-shadow: 0 0 0 3px rgba(110,15,15,.12); }
.note-hint { font-size: 11.5px; color: var(--muted); }
.note-readonly { font-size: 13.5px; color: var(--ink); white-space: pre-line; background: #FCFAFA; border-radius: 6px; padding: 12px 14px; }

/* Messages */
.msg-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.msg { padding: 10px 12px; border-radius: 8px; font-size: 13.5px; max-width: 92%; }
.msg-customer { background: var(--red-tint); border: 1px solid var(--line); align-self: flex-end; border-bottom-right-radius: 2px; }
.msg-shop { background: var(--red-deep); color: #fff; align-self: flex-start; border-bottom-left-radius: 2px; }
.msg-body { white-space: pre-line; line-height: 1.5; }
.msg-time { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.msg-shop .msg-time { color: rgba(255,255,255,.75); }
.msg-compose { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.msg-compose textarea {
  flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 6px; font: inherit;
  font-size: 13px; resize: vertical; background: #fff;
}
.msg-compose textarea:focus { outline: none; border-color: var(--red-deep); box-shadow: 0 0 0 3px rgba(110,15,15,.12); }

/* ── Status / admin shared ── */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge-draft { background: #eee; color: #555; }
.badge-payment_uploaded { background: #fff1d6; color: #9a5d00; }
.badge-confirmed { background: #dff5e6; color: #1e6b3d; }
.badge-rejected { background: #fde2e1; color: #9b2c2a; }

.status-form { display: flex; gap: 10px; }
.status-form input { flex: 1; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 6px; }

.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 34px 10px; }
.footer-logo { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 6px; object-fit: cover; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 6px; font-weight: 700;
  font-size: 14px; box-shadow: 0 8px 28px rgba(31,27,36,.3); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 60; max-width: min(90vw, 460px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Errors get the brand red and a longer dwell time, since they need reading. */
.toast.toast-error { background: var(--red-deep); box-shadow: 0 8px 28px rgba(110,15,15,.4); }

/* View-hint label sits bottom-left on hover; the share icon lives top-right,
   opposite the option-count badge, so it never collides with either. Matches
   the dark circular icon style used elsewhere (file tile download/remove). */
.product-share {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(31,27,36,.7); color: #fff; cursor: pointer;
  transition: background .15s, transform .1s;
}
.product-share svg { width: 14px; height: 14px; pointer-events: none; }
.product-share:hover { background: var(--red-deep); transform: scale(1.08); }
.product-share.copied { background: var(--success); }

@media (max-width: 640px) {
  .page-wide { padding: 0 16px; }
  .hero h1 { font-size: 21px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .product-info { padding: 12px; }
  .result-count { display: none; }
}
