/* The Tuck Box - app stylesheet, v2
   Shop, portal and admin. Loaded after tuckbox.css.

   Density decisions carried through from the core sheet: product
   cards carry four things instead of nine, the portal sidebar carries
   four destinations instead of seven, and panels are separated by
   space and a single rule rather than by borders on every side. */

/* ==========================================================
   SHOP
   ========================================================== */

.shop-layout {
  display: grid; gap: 30px; grid-template-columns: 1fr;
  align-items: start; padding: 30px 0 76px;
}
@media (min-width: 980px) {
  .shop-layout { grid-template-columns: 200px 1fr; gap: 48px; }
}

.shop-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  padding-bottom: 18px; margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.shop-count { font-size: 13.5px; color: var(--grey); }

.select {
  font-family: 'Figtree', sans-serif; font-size: 13.5px; font-weight: 600;
  padding: 9px 30px 9px 12px; border: 1px solid #edecE7;
  background: var(--off-white); color: var(--grey-dark); cursor: pointer;
  border-radius: 2px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%2378776f' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
}
.select:hover { border-color: #e0dfd9; color: var(--ink); }
.select:focus { outline: none; border-color: var(--grey); background-color: var(--paper); }

/* Filters are a plain list, not a bordered panel. */
.filter-panel { background: transparent; border: none; padding: 0; }
.filter-panel h3 { font-size: 14px; margin-bottom: 2px; }
.filter-group { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.filter-group:last-of-type { border-bottom: none; }
.filter-group h4 {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--grey); margin-bottom: 12px;
}
.filter-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 14px; cursor: pointer;
}
.filter-opt input { accent-color: var(--black); width: 15px; height: 15px; }
.filter-opt .count { margin-left: auto; font-size: 12.5px; color: var(--grey); }

.filter-toggle { display: inline-flex; }
@media (min-width: 980px) {
  .filter-toggle { display: none; }
  .filter-panel { display: block !important; }
}
@media (max-width: 979px) {
  .filter-panel { display: none; }
  .filter-panel.open { display: block; margin-bottom: 26px; }
}

.product-grid {
  display: grid; gap: 34px 24px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  align-items: start;
}

/* A product card carries: image, name, price, one control.
   Everything else moved to the product page. */
.product-card {
  background: transparent; border: none;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
}

.product-thumb {
  aspect-ratio: 1; background: linear-gradient(160deg, #fdfbe6 0%, var(--light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
}

.product-flag {
  position: absolute; top: 10px; left: 10px;
  background: var(--black); color: var(--yellow);
  font-size: 10px; font-weight: 700; letter-spacing: 0.7px;
  text-transform: uppercase; padding: 3px 8px;
}

.product-body { padding: 0; display: flex; flex-direction: column; gap: 7px; }
.product-name {
  font-size: 15px; font-weight: 700; line-height: 1.35;
  color: var(--ink); text-decoration: none;
}
.product-name:hover { text-decoration: underline; }
.product-sub { font-size: 13px; color: var(--grey); line-height: 1.45; }

.product-price {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.product-price .per {
  font-family: 'Figtree', sans-serif; font-size: 11.5px;
  font-weight: 600; color: var(--grey); margin-left: 4px;
}
.product-from { font-size: 12.5px; color: var(--grey); }

.qty {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--border); background: var(--paper);
}
.qty button {
  width: 34px; border: none; background: none;
  font-size: 16px; font-weight: 700; color: var(--ink);
  cursor: pointer; line-height: 1;
}
.qty button:disabled { color: #cfcec9; cursor: not-allowed; }
.qty input {
  width: 60px; border: none;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  text-align: center;
  font-family: 'Figtree', sans-serif; font-size: 13.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 9px 2px;
  color: var(--ink); -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0; border-top: none; background: transparent;
}
.card-total {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.card-total .lbl {
  display: block; font-family: 'Figtree', sans-serif;
  font-size: 10.5px; font-weight: 600; color: var(--grey);
  text-transform: uppercase; letter-spacing: 0.7px;
}

/* The saving prompt appears only when there is a saving.
   In v1 it always rendered, usually saying nothing useful. */
.impact {
  font-size: 12px; font-weight: 700; color: var(--green);
  line-height: 1.4;
}
.impact.muted { display: none; }

.made-to-order {
  display: inline-block; background: var(--orange-bg); color: var(--orange);
  font-size: 11px; font-weight: 700; padding: 3px 8px;
}

/* ==========================================================
   PRODUCT DETAIL
   ========================================================== */

.pdp {
  display: grid; gap: 36px; grid-template-columns: 1fr;
  padding: 30px 0 76px; align-items: start;
}
@media (min-width: 880px) { .pdp { grid-template-columns: 1fr 1fr; gap: 56px; } }
.pdp-media {
  aspect-ratio: 1; background: var(--light);
  display: flex; align-items: center; justify-content: center; font-size: 96px;
}
.pdp h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 12px; }
.pdp-price {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.spec-list { border-top: 1px solid var(--border); margin-top: 30px; }
.spec-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14px;
}
.spec-row dt { color: var(--grey); }
.spec-row dd { font-weight: 600; text-align: right; }

.breaks { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.break {
  border: 1px solid var(--border); background: var(--paper);
  padding: 11px 8px; text-align: center; cursor: pointer; font-family: inherit;
}
.break[aria-pressed='true'] { border-color: var(--black); }
.break .bq { font-size: 12px; font-weight: 700; display: block; color: var(--grey); }
.break .bp {
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums; display: block; margin-top: 3px;
}

/* ==========================================================
   BASKET AND CHECKOUT
   ========================================================== */

.basket-layout {
  display: grid; gap: 34px; grid-template-columns: 1fr;
  padding: 30px 0 76px; align-items: start;
}
@media (min-width: 880px) { .basket-layout { grid-template-columns: 1fr 320px; gap: 48px; } }

.line-item {
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--rule); align-items: start;
}
.line-thumb {
  width: 56px; height: 56px; background: var(--light);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.line-name { font-size: 15px; font-weight: 700; }
.line-meta { font-size: 13px; color: var(--grey); margin-top: 3px; }
.line-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.line-total {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.link-danger {
  background: none; border: none; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--grey);
  text-decoration: underline; cursor: pointer; padding: 0;
}
.link-danger:hover { color: var(--red); }

.summary {
  background: var(--off-white); border: none;
  padding: 24px; position: sticky; top: 76px;
}
.summary-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; font-size: 14px; color: var(--grey-dark);
}
.summary-row.total {
  border-top: 1px solid var(--border); margin-top: 10px; padding-top: 16px;
  font-size: 15px; color: var(--ink); font-weight: 700; align-items: baseline;
}
.summary-row.total .val {
  font-family: 'Syne', sans-serif; font-size: 22px; font-variant-numeric: tabular-nums;
}

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--grey-dark); margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%; font-family: 'Figtree', sans-serif; font-size: 15px;
  padding: 12px 14px; border: 1px solid var(--border);
  background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus { border-color: var(--black); outline: none; }
.field-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 540px) { .field-row { grid-template-columns: 1fr 1fr; } }

.prefilled { font-size: 12px; font-weight: 700; color: var(--green); margin-top: 5px; }

/* ==========================================================
   PORTAL
   Four destinations. Approvals, notifications and settings were
   removed from the sidebar: approvals and notifications surface
   on the dashboard where the decision is actually made, and
   settings sits at the foot of the nav where it belongs.
   ========================================================== */

.portal { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 60px); }
@media (min-width: 980px) { .portal { grid-template-columns: 214px 1fr; } }

.portal-side { background: var(--black); border-right: none; padding: 26px 0; }
@media (max-width: 979px) {
  .portal-side {
    border-right: none; border-bottom: none;
    padding: 6px 0; overflow-x: auto;
  }
  .portal-nav { display: flex; gap: 2px; padding: 0 var(--gutter); align-items: center; }
  .portal-nav a { white-space: nowrap; border-left: none !important; padding: 12px 12px !important; }
  .portal-account { display: none; }
  /* The foot group used to be hidden on mobile, which lost Notifications
     and Settings entirely. It now sits inline at the end of the row. */
  .portal-nav-foot {
    display: flex; margin-top: 0; padding-top: 0; padding-left: 8px;
    border-top: none; border-left: 1px solid #232320; gap: 2px;
  }
}

.portal-account {
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px 22px; border-bottom: 1px solid #1e1e1b; margin-bottom: 18px;
}
.avatar {
  width: 36px; height: 36px; background: var(--yellow); color: var(--black);
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.portal-account .who { font-size: 14px; font-weight: 700; line-height: 1.3; color: #fff; }
.portal-account .role { font-size: 12px; color: #8b8a83; }

.portal-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 22px; font-size: 14.5px; font-weight: 600;
  color: #a9a8a1; text-decoration: none;
  border-left: 3px solid transparent;
}
.portal-nav a:hover { color: #fff; background: #151513; }
.portal-nav a[aria-current='page'] {
  color: var(--yellow); border-left-color: var(--yellow); background: #151513;
}
.nav-badge {
  margin-left: auto; background: var(--black); color: var(--yellow);
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 9px;
}

.portal-nav-foot {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid #1e1e1b;
}
.portal-nav-foot a { font-size: 13.5px; color: #8b8a83; }

.portal-main { padding: 34px var(--gutter) 76px; max-width: 940px; }
.portal-head {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: flex-end; justify-content: space-between; margin-bottom: 30px;
}
.portal-head h1 { font-size: clamp(26px, 4vw, 32px); }
.portal-head p { font-size: 14.5px; color: var(--grey); margin-top: 6px; }

/* The role switcher is a demo control, so it reads as one:
   small, grey, clearly secondary to the page content. */
.role-switch { display: inline-flex; border: 1px solid var(--border); }
.role-switch button {
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 7px 11px; border: none; background: none;
  color: var(--grey); cursor: pointer; border-right: 1px solid var(--border);
}
.role-switch button:last-child { border-right: none; }
.role-switch button[aria-pressed='true'] { background: var(--light); color: var(--black); font-weight: 700; }

/* Three tiles, not four. */
.stats { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: 1px solid var(--border); }
.stat { background: transparent; border: none; border-bottom: 1px solid var(--rule); padding: 20px 0; }
@media (min-width: 660px) {
  .stat { border-bottom: none; padding: 22px 24px 22px 0; }
}
.stat .k {
  font-size: 11px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--grey); margin-bottom: 9px;
}
.stat .v {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 26px;
  font-variant-numeric: tabular-nums; line-height: 1.1;
  border-bottom: 3px solid var(--yellow); display: inline-block; padding-bottom: 2px;
}
.stat .d { font-size: 12.5px; color: var(--grey); margin-top: 7px; }
.stat .d.up { color: var(--green); font-weight: 600; }
.stat .d.down { color: var(--red); font-weight: 600; }

/* Panels lose their box. A heading and a rule is enough. */
.panel { background: transparent; border: none; margin-top: 44px; }
.panel-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: baseline; justify-content: space-between;
  padding: 0 0 14px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-family: 'Figtree', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.panel-head .sub { font-size: 13.5px; color: var(--grey); margin-top: 4px; }
.panel-body { padding: 0; }
.panel-body.flush { padding: 0; }

.row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.row:last-child { border-bottom: none; }
.row-icon {
  width: 34px; height: 34px; flex-shrink: 0; background: var(--light);
  border: none; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 700; display: block; }
.row-body .tag { margin-top: 6px; }
.row-meta { font-size: 13.5px; color: var(--grey); margin-top: 5px; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex-shrink: 0; }
.row-amount {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* The one thing still allowed to look like a box, because it is
   the thing that needs a decision. */
.alert {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--off-white); border: none;
  border-left: 2px solid var(--yellow); padding: 20px 22px;
}
.alert.urgent { border-left-color: var(--red); }
.alert.calm { border-left-color: var(--border); background: transparent; padding-left: 20px; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 15px; font-weight: 700; }
.alert-text { font-size: 14px; color: var(--grey-dark); margin-top: 6px; line-height: 1.55; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.empty { padding: 54px 20px; text-align: center; }
.empty .em { font-size: 26px; margin-bottom: 14px; }
.empty h3 { font-size: 16px; margin-bottom: 8px; }
.empty p { font-size: 14.5px; color: var(--grey); max-width: 40ch; margin: 0 auto 20px; }

.saved-order { border-bottom: 1px solid var(--rule); }
.saved-order:last-child { border-bottom: none; }
.saved-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: flex-start; justify-content: space-between; padding: 20px 0;
}
.saved-items { padding: 0 0 18px; display: none; }
.saved-order.open .saved-items { display: block; }
.saved-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--rule); font-size: 14px;
}
.saved-item .si-name { flex: 1; min-width: 0; font-weight: 600; }
.saved-item .si-total {
  font-variant-numeric: tabular-nums; font-weight: 700;
  min-width: 66px; text-align: right;
}
.add-item-btn {
  width: 100%; border: 1px dashed var(--border); background: transparent;
  color: var(--grey-dark); font-family: inherit; font-size: 13.5px;
  font-weight: 700; padding: 12px; margin-top: 14px; cursor: pointer;
}
.add-item-btn:hover { border-color: var(--black); color: var(--black); }
.add-panel { border: none; background: var(--off-white); padding: 6px 16px; margin-top: 12px; }
.add-panel .pick {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0; font-size: 13.5px; border-bottom: 1px solid var(--rule);
}
.add-panel .pick:last-child { border-bottom: none; }
.add-panel .pick span:first-child { flex: 1; }

/* Heart, badge-circle style: chosen for brand alignment, fills
   yellow rather than red so it reads as "priority" not "sentiment". */
.heart {
  background: none; border: none; cursor: pointer;
  padding: 0; line-height: 1; display: inline-flex;
}
.heart-badge {
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
}
.heart-badge svg { width: 19px; height: 19px; fill: none; stroke: #c7c6c0; stroke-width: 1.7; }
.heart:hover .heart-badge svg { stroke: var(--grey-dark); }
.heart[aria-pressed='true'] .heart-badge svg { fill: var(--black); stroke: var(--black); }

.tabs {
  display: flex; gap: 22px; overflow-x: auto;
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.tabs button {
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 12px 0; border: none; background: none;
  color: var(--grey); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected='true'] { color: var(--black); font-weight: 700; border-bottom-color: var(--black); }
.tabs .tcount { color: var(--grey); font-weight: 600; margin-left: 5px; }

/* ==========================================================
   CUSTOM PRINT WIZARD
   ========================================================== */

.wizard { display: grid; grid-template-columns: 1fr; border: 1px solid var(--border); background: var(--paper); }
@media (min-width: 840px) { .wizard { grid-template-columns: 200px 1fr; } }

.wizard-steps { background: var(--off-white); border-bottom: 1px solid var(--rule); padding: 24px; }
@media (min-width: 840px) { .wizard-steps { border-bottom: none; border-right: 1px solid var(--rule); } }
.wstep { display: flex; align-items: center; gap: 11px; padding: 9px 0; font-size: 13.5px; font-weight: 600; color: #b5b4ae; }
.wstep.done, .wstep.active { color: var(--ink); }
.wstep.active { font-weight: 700; }
.wdot {
  width: 20px; height: 20px; border-radius: 50%;
  background: #ddddd7; color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wstep.done .wdot { background: var(--black); color: var(--yellow); }
.wstep.active .wdot { background: var(--yellow); color: var(--black); }

.wizard-body { padding: 30px; }
.wizard-q { font-family: 'Figtree', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.01em; }

.opt-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 540px) { .opt-grid { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--border); background: var(--paper);
  padding: 14px 15px; text-align: left; font-family: inherit; cursor: pointer;
}
.opt[aria-pressed='true'] { border-color: var(--black); }
.opt b { display: block; font-size: 14px; font-weight: 700; }
.opt span { font-size: 12.5px; color: var(--grey); }
.opt-swatch { width: 26px; height: 26px; flex-shrink: 0; }
.opt-emoji { font-size: 24px; flex-shrink: 0; }

.guide-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  background: none; border: none; color: var(--grey-dark);
  padding: 10px 0; cursor: pointer; margin-top: 12px;
  text-decoration: underline;
}
.guide-trigger .ic {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--black); color: var(--yellow);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.slider-row { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule); }
.slider-row label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--grey); margin-bottom: 14px;
}
input[type='range'] { width: 100%; accent-color: var(--black); }
.slider-out {
  font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700;
  font-variant-numeric: tabular-nums; margin-top: 10px;
}
.slider-out span { font-family: 'Figtree', sans-serif; font-size: 12.5px; font-weight: 600; color: var(--grey); }

.wizard-nav {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule);
}

.estimate { background: var(--black); color: #e9e8e3; border-top: 2px solid var(--yellow); padding: 24px 30px; }
.estimate .e-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: baseline; }
.estimate .e-lbl { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: #fff; }
.estimate .e-unit { font-size: 13px; color: #a8a7a0; }
.estimate .e-unit b { color: #fff; font-variant-numeric: tabular-nums; }
.estimate .e-break { font-size: 12px; color: #6d6c66; margin-top: 10px; }
.estimate .e-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid #242320;
}
.estimate .e-total .t-lbl { font-size: 13px; color: #c2c1ba; font-weight: 600; }
.estimate .e-total .t-val {
  font-family: 'Syne', sans-serif; font-size: 25px; font-weight: 700;
  color: var(--yellow); font-variant-numeric: tabular-nums;
}

/* ==========================================================
   MODAL
   ========================================================== */

.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.55); z-index: 1000;
  align-items: center; justify-content: center; padding: 18px;
}
.modal-overlay.open { display: flex; }
.modal { background: var(--paper); max-width: 540px; width: 100%; max-height: 82vh; overflow-y: auto; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 20px 24px; border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; background: var(--paper);
}
.modal-head h3 { font-size: 16px; }
.modal-head button {
  background: none; color: var(--grey); border: none;
  width: 30px; height: 30px; font-size: 16px; cursor: pointer;
}
.modal-body { padding: 22px 24px; }
.guide-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.guide-item:last-child { border-bottom: none; }
.guide-item .gsw { width: 40px; height: 40px; flex-shrink: 0; }
.guide-item h4 { font-size: 14px; margin-bottom: 4px; }
.guide-item p { font-size: 13px; color: var(--grey-dark); line-height: 1.55; }

/* ==========================================================
   STATUS PILL  -  chosen lifecycle style
   One pill for the current stage, matching the existing .tag
   visual language rather than introducing a new shape.
   ========================================================== */

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px;
  background: var(--light); color: var(--ink);
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--black); flex-shrink: 0; }
.status-pill.tone-done { background: var(--green-bg); color: var(--green); }
.status-pill.tone-done .dot { background: var(--green); }
.status-pill.tone-active { background: var(--blue-bg); color: var(--blue); }
.status-pill.tone-active .dot { background: var(--blue); }
.status-pill.tone-wait { background: var(--orange-bg); color: var(--orange); }
.status-pill.tone-wait .dot { background: var(--orange); }
.status-pill.tone-dead { background: #fdf3f2; color: var(--red); }
.status-pill.tone-dead .dot { background: var(--red); }

.status-next { font-size: 12.5px; color: var(--grey); margin-top: 8px; line-height: 1.5; }

/* ==========================================================
   ADMIN
   ========================================================== */

.chart-wrap { padding: 24px 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--rule); stroke-width: 1; }
.chart .axis-label { font-size: 10px; fill: var(--grey); font-family: 'Figtree', sans-serif; font-weight: 600; }
.chart .bar { fill: var(--black); }
.chart .bar.alt { fill: #d9cb1f; }
.chart .bar:hover { fill: #3a3a36; }
.chart .line-path { fill: none; stroke: var(--black); stroke-width: 2; }
.chart .line-path.alt { stroke: #c4b400; }
.chart .dot { fill: var(--black); }
.chart .val-label { font-size: 9.5px; fill: var(--grey); font-family: 'Figtree', sans-serif; font-weight: 700; text-anchor: middle; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--grey-dark); font-weight: 600; }
.legend i { width: 10px; height: 10px; display: block; }

.audit-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.audit-table th, .audit-table td {
  text-align: left; padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--rule); vertical-align: top;
}
.audit-table thead th {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--grey);
  border-bottom-color: var(--border);
}
.audit-table td { color: var(--grey-dark); }
.audit-table .who { color: var(--ink); font-weight: 700; white-space: nowrap; }
.audit-table .when { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12.5px; }

.outcome {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; padding: 2px 7px; white-space: nowrap;
}
.outcome.ok { background: var(--green-bg); color: var(--green); }
.outcome.deny { background: #fdf3f2; color: var(--red); }
.outcome.info { background: var(--light); color: var(--grey-dark); }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.filter-bar input[type='search'] {
  flex: 1; min-width: 180px; font-family: inherit; font-size: 14px;
  padding: 10px 12px; border: 1px solid var(--border); background: var(--paper);
}

/* ==========================================================
   FEEDBACK
   ========================================================== */

.toast {
  position: fixed; left: 50%; bottom: 22px;
  transform: translateX(-50%) translateY(150%);
  background: var(--black); color: #fff;
  font-size: 14px; font-weight: 600; padding: 14px 22px; z-index: 1100;
  box-shadow: 0 6px 22px rgba(10, 10, 10, 0.26);
  transition: transform 0.22s ease; max-width: calc(100vw - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.banner { padding: 12px var(--gutter); font-size: 13.5px; font-weight: 600; text-align: center; }
.banner-warn { background: var(--orange-bg); color: var(--orange); }
.banner-info { background: var(--light); color: var(--grey-dark); }

.install-prompt {
  display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 960;
  background: var(--paper); border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(10, 10, 10, 0.16);
  padding: 16px; gap: 14px; align-items: center;
}
.install-prompt.show { display: flex; }
@media (min-width: 640px) { .install-prompt { left: auto; right: 16px; bottom: 78px; max-width: 360px; } }
.install-prompt .ip-body { flex: 1; min-width: 0; }
.install-prompt .ip-title { font-size: 14px; font-weight: 700; }
.install-prompt .ip-text { font-size: 12.5px; color: var(--grey); margin-top: 3px; line-height: 1.45; }
.install-prompt .ip-close {
  background: none; border: none; font-size: 17px; color: var(--grey);
  cursor: pointer; padding: 2px 6px; align-self: flex-start;
}

.spinner {
  width: 20px; height: 20px; border: 2px solid var(--rule);
  border-top-color: var(--black); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 54px 20px; text-align: center; }
.loading p { font-size: 13.5px; color: var(--grey); margin-top: 14px; }

/* ==========================================================
   ADMIN SHELL
   Fifteen destinations is a lot, so the sidebar groups them
   and the group labels do the scanning work.
   ========================================================== */

.admin-shell .portal-side { padding-top: 22px; }
.admin-shell .portal-main { max-width: 1000px; }

.admin-nav-group { margin-bottom: 18px; }
.admin-nav-label {
  display: block; padding: 0 22px 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: #6a6963;
}
.admin-nav a { padding: 9px 22px; font-size: 13.5px; }
.admin-nav .nav-badge { margin-left: auto; }

@media (max-width: 979px) {
  .admin-shell .portal-side { padding: 8px 0; }
  .admin-nav { display: flex; align-items: center; gap: 2px; }
  .admin-nav-group { display: flex; margin-bottom: 0; align-items: center; }
  .admin-nav-label { display: none; }
  .admin-nav a { white-space: nowrap; padding: 11px 12px !important; }
}

/* ==========================================================
   WORDPRESS / WOOCOMMERCE ADDITIONS
   Added for the WooCommerce build. Everything above this line
   is carried over unchanged from the previous version.
   ========================================================== */

/* Two products per row at every width, including phones. The old
   build collapsed to one, which made the shop feel empty. */
ul.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 900px) { ul.products { grid-template-columns: repeat(3, 1fr); gap: 34px 24px; } }
@media (min-width: 1180px) { ul.products { grid-template-columns: repeat(4, 1fr); } }

ul.products li.product { margin: 0; }
.product-card .product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .price { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; }
.product-card .price .per {
  font-family: 'Figtree', sans-serif; font-size: 11.5px;
  font-weight: 600; color: var(--grey); margin-left: 4px;
}

/* ----------------------------------------------------------
   SLIDE-OUT DRAWERS
   Filter slides from the left, basket from the right, both over
   a dimmed page rather than replacing it.
   ---------------------------------------------------------- */

.drawer-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10, 10, 10, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; bottom: 0; z-index: 1001;
  width: min(88vw, 380px);
  background: var(--paper);
  display: flex; flex-direction: column;
  transition: transform 0.26s ease;
  box-shadow: 0 0 30px rgba(10, 10, 10, 0.18);
}
.drawer-filter { left: 0; transform: translateX(-105%); }
.drawer-basket { right: 0; transform: translateX(105%); }
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}
.drawer-head h2 { font-family: 'Figtree', sans-serif; font-size: 16px; font-weight: 700; }
.drawer-head button {
  background: none; border: none; font-size: 17px;
  color: var(--grey); cursor: pointer; padding: 4px 8px;
}
.drawer-head button:hover { color: var(--black); }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }

.filter-opt {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 0; font-size: 14.5px;
  text-decoration: none; color: var(--grey-dark);
  border-bottom: 1px solid var(--rule);
}
.filter-opt:hover { color: var(--black); }
.filter-opt.is-active { color: var(--black); font-weight: 700; }
.filter-opt .count { font-size: 12.5px; color: var(--grey); }
.filter-count:not(:empty) {
  background: var(--black); color: var(--yellow);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 9px; margin-left: 5px;
}

/* Mini basket inside the drawer */
.drawer .woocommerce-mini-cart__buttons { display: grid; gap: 8px; margin-top: 16px; }
.drawer .woocommerce-mini-cart__buttons .button {
  display: block; text-align: center; padding: 13px 22px;
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  background: transparent; color: var(--black); border: 1px solid var(--border);
}
.drawer .woocommerce-mini-cart__buttons .checkout {
  background: var(--yellow); border-color: var(--yellow);
}
.drawer .woocommerce-mini-cart__total {
  display: flex; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--border);
  font-weight: 700; margin-top: 10px;
}
.drawer .woocommerce-mini-cart li {
  list-style: none; padding: 12px 0;
  border-bottom: 1px solid var(--rule); font-size: 14px;
}
.drawer .woocommerce-mini-cart { padding: 0; margin: 0; }

/* WhatsApp number in the mobile menu */
.nav-mobile-wa {
  display: block; margin-top: 18px; padding: 13px 16px;
  background: var(--yellow); color: var(--black);
  font-weight: 700; font-size: 15px; text-align: center;
  text-decoration: none;
}

/* Pagination, always reachable at the foot of the shop */
.pagination-wrap { padding: 34px 0; display: flex; justify-content: center; }
.pagination-wrap ul, .woocommerce-pagination ul {
  display: flex; gap: 6px; list-style: none; padding: 0; margin: 0;
}
.pagination-wrap a, .pagination-wrap span,
.woocommerce-pagination a, .woocommerce-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--grey-dark);
}
.pagination-wrap .current, .woocommerce-pagination .current {
  background: var(--black); color: #fff; border-color: var(--black);
}

/* Prefilled checkout fields: tinted, with a short explanation. */
.tb-prefilled-input {
  border-color: var(--green) !important;
  background: var(--green-bg) !important;
}
.tb-prefilled > label::after {
  content: 'Filled from your last order';
  display: block; font-size: 10.5px; font-weight: 600;
  color: var(--green); margin-top: 3px;
}

/* Article thumbnails on the index */
.article-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 14px; }

/* ==========================================================
   ACCOUNT AREA
   WooCommerce's own screens, restyled so they belong to this
   site rather than looking like a different product.
   ========================================================== */

.woocommerce-MyAccount-content { padding: 34px var(--gutter) 76px; max-width: 940px; }

/* WooCommerce prints its own message boxes on these screens. */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  border-left: 3px solid var(--yellow);
  background: var(--off-white);
  padding: 16px 20px; margin-bottom: 24px;
  font-size: 14.5px; list-style: none;
}
.woocommerce-error { border-left-color: var(--red); }
.woocommerce-message { border-left-color: var(--green); }
.woocommerce-message .button, .woocommerce-info .button {
  float: right; font-size: 13px; font-weight: 700;
  text-decoration: none; color: var(--black);
  border-bottom: 2px solid var(--yellow);
}

/* New account welcome cards, so a first visit is not an empty page. */
.welcome-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .welcome-grid { grid-template-columns: 1fr 1fr; } }

.welcome-card {
  display: block; padding: 22px;
  border: 1px solid var(--border); background: var(--paper);
  text-decoration: none; color: inherit;
  transition: border-color 0.12s ease;
}
.welcome-card:hover { border-color: var(--black); }
.welcome-card .wc-icon { font-size: 24px; display: block; margin-bottom: 12px; }
.welcome-card h3 { font-size: 15px; margin-bottom: 6px; }
.welcome-card p { font-size: 13.5px; color: var(--grey-dark); line-height: 1.5; }

/* ----------------------------------------------------------
   SIGN IN AND REGISTER
   ---------------------------------------------------------- */

.auth-page { padding: 60px 0 90px; }
.auth-grid { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; max-width: 880px; margin: 0 auto; }
@media (min-width: 860px) { .auth-grid { grid-template-columns: 1fr 1fr; gap: 34px; } }

.auth-panel { background: var(--paper); border: 1px solid var(--border); padding: 32px; }
.auth-panel h1 { font-size: 26px; margin-bottom: 6px; }
.auth-panel h2 { font-size: 20px; margin-bottom: 6px; }
.auth-panel-alt { background: var(--off-white); border-top: 3px solid var(--yellow); }

.auth-benefits { list-style: none; padding: 0; margin: 0 0 24px; }
.auth-benefits li {
  position: relative; padding: 7px 0 7px 24px;
  font-size: 14px; color: var(--grey-dark);
}
.auth-benefits li::before {
  content: '\2713'; position: absolute; left: 0; top: 7px;
  color: var(--green); font-weight: 700;
}

.checkbox-inline {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--grey-dark); margin-top: 6px;
}
.checkbox-inline input { width: 15px; height: 15px; accent-color: var(--black); }

/* WooCommerce's own form fields, brought in line with ours. */
.woocommerce form .form-row { margin-bottom: 18px; }
.woocommerce form .form-row label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--grey-dark); margin-bottom: 7px;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single {
  width: 100%; font-family: 'Figtree', sans-serif; font-size: 15px;
  padding: 12px 14px; border: 1px solid var(--border);
  background: var(--paper); color: var(--ink); height: auto;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus { border-color: var(--black); outline: none; }

.woocommerce .button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; font-family: 'Figtree', sans-serif;
  font-size: 14.5px; font-weight: 700; line-height: 1;
  background: var(--yellow); color: var(--black);
  border: 1px solid transparent; border-radius: 0; cursor: pointer;
}
.woocommerce .button:hover { background: #ffee1a; }
.woocommerce .button.alt { background: var(--black); color: #fff; }

/* Order detail and address tables */
.woocommerce table.shop_table {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  border: none; margin-bottom: 24px;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td {
  padding: 14px 12px 14px 0; text-align: left;
  border-bottom: 1px solid var(--rule);
}
.woocommerce table.shop_table thead th {
  font-size: 11px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--grey);
  border-bottom-color: var(--border);
}
.woocommerce .woocommerce-customer-details address {
  font-style: normal; font-size: 14.5px; line-height: 1.7;
  border: 1px solid var(--border); padding: 16px; background: var(--off-white);
}

/* The account tab strip used on the Saved screen */
.tb-tab {
  font-size: 14px; font-weight: 600; padding: 12px 0;
  color: var(--grey); text-decoration: none;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tb-tab.is-active { color: var(--black); font-weight: 700; border-bottom-color: var(--black); }
.tabs { display: flex; gap: 22px; }

/* Saved order rows. The old build had an unclickable gap between the
   name and the buttons; this lays the row out properly so every part
   of it behaves predictably. */
.saved-head {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.saved-main { flex: 1 1 260px; min-width: 0; }
.saved-actions { display: flex; gap: 8px; flex-shrink: 0; }

.pick {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; font-size: 13.5px;
  border-bottom: 1px solid var(--rule);
}
.pick span:first-child { flex: 1; min-width: 0; }
.pick-add {
  background: var(--black); color: var(--yellow); border: none;
  width: 28px; height: 28px; font-size: 16px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
}
.pick-add.added { background: var(--green); color: #fff; cursor: default; }
