.cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink, #25291f);
  text-decoration: none;
  margin-inline-start: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line, #dedbd2);
  border-radius: 999px;
  background: var(--panel, #fff);
}
.cart-link svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.cart-link span {
  font-size: 12px;
}
.offer-banner {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: #33443b;
  color: #fff;
  text-decoration: none;
}
.cart-page {
  max-width: 1120px;
  margin: auto;
  padding: 28px 20px 64px;
}
.cart-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.cart-heading h1 {
  font-size: clamp(25px, 4vw, 36px);
  margin: 0;
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}
.cart-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 15px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line, #dedbd2);
}
.cart-item img {
  width: 88px;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
}
.cart-item h2 {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 5px;
}
.cart-item p {
  margin: 5px 0;
}
.cart-sku {
  font-size: 11px;
  direction: ltr;
  display: block;
  opacity: 0.75;
  overflow-wrap: anywhere;
}
.cart-item-controls {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 14px;
}
.cart-item-controls strong {
  margin-inline-start: auto;
}
.cart-item-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-remove {
  border: 0;
  background: transparent;
  text-decoration: underline;
  color: inherit;
  min-height: 44px;
  padding: 6px 10px;
}
.cart-box {
  border: 1px solid var(--line, #dedbd2);
  border-radius: 18px;
  padding: 20px;
  background: var(--card, transparent);
  margin-bottom: 20px;
}
.cart-box h2 {
  font-size: 21px;
  margin: 0 0 16px;
}
.cart-box .money-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}
.money-line.total {
  font-size: 22px;
  font-weight: 600;
  border-top: 1px solid var(--line, #dedbd2);
  margin-top: 8px;
  padding-top: 15px;
}
.promo-controls {
  display: flex;
  gap: 8px;
  margin-block: 16px;
}
.promo-controls input {
  min-width: 0;
  flex: 1;
  direction: ltr;
}
.promo-controls button {
  white-space: nowrap;
}
.cart-page input,
.cart-page select,
.cart-page textarea,
.admin-page input,
.admin-page select,
.admin-page textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  border: 1px solid var(--line, #bcbfb5);
  border-radius: 9px;
  color: inherit;
  background: var(--bg, #f7f5f0);
  min-height: 44px;
}
.cart-page button,
.admin-page button {
  cursor: pointer;
  font: inherit;
}
.cart-page button:disabled,
.admin-page button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.cart-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #34473d;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  min-height: 48px;
  text-decoration: none;
  font: inherit;
}
.cart-primary.full {
  width: 100%;
}
.cart-checkout fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.cart-checkout label {
  display: block;
  margin-bottom: 15px;
}
.cart-checkout label span {
  display: block;
  margin-bottom: 6px;
}
.cart-note {
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.85;
}
.cart-status {
  padding: 12px;
  border-inline-start: 3px solid #b26d24;
  line-height: 1.7;
  margin: 14px 0;
}
.cart-checkout textarea {
  resize: vertical;
}
.cart-hp {
  position: absolute !important;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.cart-page :focus-visible,
.cart-link:focus-visible {
  outline: 3px solid #9d742e;
  outline-offset: 3px;
}
.cart-page [hidden] {
  display: none !important;
}
.admin-page {
  max-width: 760px;
  margin: auto;
  padding: 24px 18px 60px;
}
.admin-page label {
  display: block;
  margin: 14px 0;
}
.admin-page button {
  margin: 6px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.admin-list {
  padding: 12px 0;
  border-bottom: 1px solid #ccc;
}
.admin-page [hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .cart-page {
    padding: 24px 16px 48px;
  }
  .cart-heading {
    align-items: start;
  }
  .cart-heading a {
    font-size: 14px;
  }
  .cart-box {
    padding: 16px;
  }
  .cart-item h2 {
    font-size: 16px;
  }
  .hdr .wrap {
    flex-wrap: wrap;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cart-page * {
    scroll-behavior: auto !important;
  }
}
/* PDP hides delivery fields once the shared cart owns checkout. */
#order .fld[hidden] {
  display: none !important;
}

.cart-button {
  position: relative;
  flex: 0 0 44px;
}
.cart-count {
  position: absolute;
  inset-inline-end: -1px;
  top: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #ff5b5b;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--ground, #f7f5f0);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.cart-count[hidden] {
  display: none !important;
}
.cart-quantity {
  display: inline-flex;
  align-items: center;
  direction: ltr;
  border: 1px solid var(--line, #dedbd2);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.cart-quantity button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 23px;
  padding: 0;
}
.cart-quantity output {
  display: block;
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
.cart-page .cart-quantity button:disabled {
  opacity: 0.35;
  cursor: default;
}
.cart-quantity button:focus-visible {
  outline-offset: -3px;
}
/* Reuse the storefront's olive, sand, panel and pill-button system. */
.pdp-checkout {
  display: flex;
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  margin: 12px auto 0;
  padding: 9px 25px;
  font-size: 14px;
  border-color: var(--olive);
  background: var(--olive-soft);
  color: var(--olive);
}
.pdp-checkout:hover {
  background: var(--sand);
  border-color: var(--olive);
}
#cart-items {
  display: grid;
  gap: 14px;
}
.cart-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 20px);
  background: var(--panel);
  box-shadow: var(--shadow);
  align-items: start;
}
.cart-item img {
  border: 1px solid var(--line);
  border-radius: var(--r, 14px);
}
.cart-item h2 {
  color: var(--ink);
  line-height: 1.6;
}
.cart-item-info p,
.cart-sku {
  color: var(--ink-2);
}
.cart-sku {
  opacity: 1;
}
.cart-item-controls {
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.cart-item-controls strong {
  color: var(--olive);
  font-size: 18px;
}
.cart-box {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--r-lg, 20px);
}
.cart-box h2 {
  color: var(--ink);
  font-weight: 600;
}
.money-line {
  color: var(--ink-2);
}
.money-line b,
.money-line.total {
  color: var(--ink);
}
.money-line.total b {
  color: var(--olive);
}
.cart-primary {
  background: var(--olive);
  color: var(--btn-ink);
  border-radius: 999px;
  font-weight: 600;
  padding: 13px 24px;
  transition: background-color 0.18s ease;
}
.cart-primary:hover {
  background: var(--olive-2);
}
.cart-page input,
.cart-page select,
.cart-page textarea {
  background: var(--ground);
  border-color: var(--line);
  border-radius: var(--r, 14px);
  color: var(--ink);
}
.cart-quantity {
  background: var(--ground);
  border-radius: 999px;
}
.cart-quantity button:hover:not(:disabled) {
  background: var(--olive-soft);
}
.cart-heading > a {
  color: var(--olive);
  font-size: 14px;
  text-underline-offset: 4px;
}
.cart-remove {
  color: var(--ink-2);
  font-size: 14px;
  text-underline-offset: 4px;
}
.cart-page.is-empty .cart-layout {
  display: block;
}
.cart-page.is-empty #cart-items {
  max-width: 680px;
  margin: 0 auto;
}
.cart-page.is-empty .cart-heading > a {
  display: none;
}
.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 20px);
  box-shadow: var(--shadow);
}
.empty-cart-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--olive);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.empty-cart-icon svg {
  width: 46px;
  height: 46px;
}
.empty-cart h2 {
  font-size: clamp(23px, 4vw, 30px);
  line-height: 1.5;
  margin: 0 0 10px;
  font-weight: 600;
}
.empty-cart p {
  color: var(--ink-2);
  line-height: 1.8;
  margin: 0 0 26px;
  max-width: 32ch;
}
@media (max-width: 600px) {
  .cart-item {
    padding: 14px;
    gap: 12px;
  }
  .cart-item-controls strong {
    font-size: 16px;
  }
  .empty-cart {
    padding: 40px 20px;
  }
  .pdp-checkout {
    margin-top: 10px;
  }
}

/* Preserve safe header gutters, including where desktop navigation first appears. */
.hdr .hdr-in {
  --pad-i: 20px;
}
@media (max-width: 1039px) {
  /* The theme control remains available inside the mobile menu. */
  .hdr-in > .thm {
    display: none;
  }
}
@media (max-width: 999px) {
  .hdr .hdr-in {
    --pad-i: 16px;
  }
}
@media (max-width: 400px) {
  .hdr .hdr-in {
    --pad-i: 14px;
  }
}
.cart-page.is-empty .cart-heading {
  max-width: 680px;
  margin-inline: auto;
}
/* Keep the shopping controls aligned without competing with the brand. */
@media (max-width: 559px) {
  .hdr-in {
    gap: 8px;
  }
  .hdr-in > .lang {
    min-width: 44px;
    width: 44px;
    padding-inline: 0;
    margin-inline-start: 0;
    flex: 0 0 44px;
  }
  .hdr-in > .brand {
    flex: 1 1 auto;
  }
  .hdr-in > .cart-link {
    flex: 0 0 44px;
  }
}
.cart-link:hover {
  border-color: var(--brass);
  color: var(--brass-ink);
}

.product-scope {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-block: 16px;
}
.admin-page .scope-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  cursor: pointer;
}
.admin-page .scope-option input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  margin: 0;
  accent-color: var(--olive);
}
.scope-option span {
  overflow-wrap: anywhere;
}
.scope-all {
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.scope-options {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.scope-option:focus-within {
  outline: 2px solid var(--olive);
  outline-offset: -2px;
  border-radius: 6px;
}
.hdr-in > .thm,
.hdr-in > .lang {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
}
.hdr-in > .lang {
  padding-inline: 0;
}

.scope-option small {
  display: block;
  color: var(--ink-2);
  font-size: 12px;
  unicode-bidi: isolate;
}
