/* The shop's default look — written by "php artisan engine:scan" because this design had no shop of its
   own. Yours to edit, or delete in favour of rules in css/site.css.

   Two decisions make it safe to drop into any design:

   - Every rule is wrapped in :where(), so it adds no specificity, and this file is linked
     BEFORE css/site.css. Wherever the design already styles a class these pages use — .btn,
     .input, .wrap, .section — the design wins, and these rules only fill the gaps.
   - Colours and type come from the theme the admin controls (--primary, --bg, --text, --font),
     so the shop follows the site when the client changes them.

   Several rules style markup that is in no template: site/js/cart.js writes the whole basket
   (lines, steppers, coupon box, totals) and site/js/checkout.js the payment options. */

:where(.shopPage) {
  --shop-primary: var(--primary, #1f2937);
  --shop-bg: var(--bg, #ffffff);
  --shop-text: var(--text, #111827);
  --shop-muted: color-mix(in srgb, var(--shop-text) 60%, var(--shop-bg));
  --shop-border: color-mix(in srgb, var(--shop-text) 14%, var(--shop-bg));
  --shop-surface: color-mix(in srgb, var(--shop-text) 4%, var(--shop-bg));
  color: var(--shop-text);
}
:where(.shopPage) :where(*, *::before, *::after) { box-sizing: border-box; }

/* ---- Layout ---- */
:where(.shopPage .wrap) { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
:where(.shopPage .section) { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
:where(.shopPage .section__title) {
  font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 1.5rem;
}
:where(.shopPage .shopBar) {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.75rem;
}
:where(.shopPage .shopBar .section__title) { margin: 0; }
:where(.shopPage .shopBar__back) { color: var(--shop-muted); text-decoration: none; }
:where(.shopPage .shopBar__cart) {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600;
  color: var(--shop-text); text-decoration: none;
  padding: .45rem .9rem; border: 1px solid var(--shop-border); border-radius: 999px;
}
:where(.shopPage .shopBar__badge) {
  display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem;
  border-radius: 1rem; background: var(--shop-primary); color: #fff; font-size: .75rem; line-height: 1;
}
:where(.shopPage [hidden]) { display: none !important; }

/* ---- Buttons and fields ---- */
:where(.shopPage .btn) {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .75rem 1.4rem; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: opacity .15s, background .15s;
}
:where(.shopPage .btn--primary) { background: var(--shop-primary); color: #fff; }
:where(.shopPage .btn--primary:hover) { opacity: .88; }
:where(.shopPage .btn--ghost) { border-color: var(--shop-border); color: var(--shop-text); background: none; }
:where(.shopPage .btn--sm) { padding: .45rem .8rem; font-size: .88rem; }
:where(.shopPage .btn--block) { display: flex; width: 100%; margin-top: 1rem; }
:where(.shopPage .btn:disabled) { opacity: .55; cursor: not-allowed; }
:where(.shopPage .field) { display: block; margin-bottom: 1rem; }
:where(.shopPage .field__label) { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
:where(.shopPage .input, .shopPage .select) {
  width: 100%; font: inherit; color: var(--shop-text); background: var(--shop-bg);
  padding: .65rem .8rem; border: 1px solid var(--shop-border); border-radius: 8px;
}
:where(.shopPage .input:focus, .shopPage .select:focus) {
  outline: none; border-color: var(--shop-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-primary) 18%, transparent);
}
:where(.shopPage textarea.input) { resize: vertical; min-height: 5rem; }

/* ---- Messages ---- */
:where(.shopPage .cartMessage) {
  position: fixed; inset: auto 1rem 1rem auto; z-index: 40; margin: 0;
  padding: .7rem 1.1rem; border-radius: .6rem; background: #14532d; color: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / .18);
}
:where(.shopPage .cartMessage.is-error) { background: #7f1d1d; }

/* ---- Catalogue ---- */
:where(.shopPage .productGrid) {
  display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
:where(.shopPage .productCard__media) { display: block; }
:where(.shopPage .productCard__media img, .shopPage .productCard__placeholder) {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: .8rem; background: var(--shop-surface);
}
:where(.shopPage .productCard__title) { font-size: 1.05rem; margin: .85rem 0 .3rem; }
:where(.shopPage .productCard__title a) { color: inherit; text-decoration: none; }
:where(.shopPage .productCard__excerpt) { font-size: .92rem; color: var(--shop-muted); margin: .35rem 0 0; }
:where(.shopPage .price) { font-weight: 700; }

/* ---- One product ---- */
:where(.shopPage .product__layout) {
  display: grid; gap: clamp(1.5rem, 5vw, 3rem); grid-template-columns: 1fr 1fr; align-items: start;
}
:where(.shopPage .product__media) { border-radius: 1rem; overflow: hidden; background: var(--shop-surface); }
:where(.shopPage .product__media img) { display: block; width: 100%; }
:where(.shopPage .product__placeholder) { display: block; aspect-ratio: 1; }
:where(.shopPage .product__title) { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.02em; margin: 0 0 .6rem; }
:where(.shopPage .product__price) { font-size: 1.5rem; margin: 0 0 1.1rem; }
:where(.shopPage .product__lede) { color: var(--shop-muted); margin: 0 0 1.5rem; }
:where(.shopPage .product__options) { margin-bottom: 1.5rem; max-width: 22rem; }
:where(.shopPage .product__buy) { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
:where(.shopPage .product__stock) { min-height: 1.4rem; margin-top: .9rem; font-size: .88rem; }
:where(.shopPage .product__body) { margin-top: 3rem; max-width: 46rem; line-height: 1.7; }
:where(.shopPage .product__body img) { max-width: 100%; height: auto; }

:where(.shopPage .stockBadge) {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600; font-size: .82rem; padding: .25rem .65rem; border-radius: 1rem;
}
:where(.shopPage .stockBadge--in) { color: #05683c; background: #e6f5ee; }
:where(.shopPage .stockBadge--low) { color: #92400e; background: #fef3c7; }
:where(.shopPage .stockBadge--out) { color: #b42318; background: #fdeceb; }

:where(.shopPage .qtyStepper) {
  display: inline-flex; align-items: stretch; height: 2.75rem;
  border: 1px solid var(--shop-border); border-radius: 8px; overflow: hidden;
}
:where(.shopPage .qtyStepper__btn) {
  display: grid; place-items: center; width: 2.5rem; border: 0; cursor: pointer;
  background: var(--shop-surface); color: var(--shop-text); font: inherit; font-size: 1.1rem;
}
:where(.shopPage .qtyStepper__btn:disabled) { opacity: .4; cursor: not-allowed; }
:where(.shopPage .qtyStepper__input) {
  width: 3rem; border: 0; border-inline: 1px solid var(--shop-border); text-align: center;
  font: inherit; font-weight: 600; color: var(--shop-text); background: var(--shop-bg);
  -moz-appearance: textfield;
}
:where(.shopPage .qtyStepper__input)::-webkit-outer-spin-button,
:where(.shopPage .qtyStepper__input)::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Basket (written by cart.js) ---- */
:where(.shopPage .cart__loading) { color: var(--shop-muted); padding: 1rem 0; }
:where(.shopPage .cart__empty) { padding: 3rem 0; text-align: center; color: var(--shop-muted); }
:where(.shopPage .cart__empty .btn) { margin-top: 1.25rem; }
:where(.shopPage .cart__notices, .shopPage .checkout__notice) {
  color: #92400e; background: #fef3c7; margin: 0 0 1rem; padding: .7rem 1rem .7rem 2rem; border-radius: .5rem;
}
:where(.shopPage .cart__layout) {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr) 22rem; align-items: start;
}
:where(.shopPage .cart__freeDelivery) {
  margin-bottom: 1.25rem; padding: .9rem 1.1rem; border-radius: .7rem;
  background: var(--shop-surface); border: 1px solid var(--shop-border);
}
:where(.shopPage .cart__freeDelivery p) { margin: 0 0 .55rem; font-size: .95rem; }
:where(.shopPage .cart__progress) {
  display: block; height: .4rem; border-radius: 1rem; overflow: hidden;
  background: color-mix(in srgb, var(--shop-text) 10%, var(--shop-bg));
}
:where(.shopPage .cart__progress > span) {
  display: block; height: 100%; border-radius: inherit; background: var(--shop-primary); transition: width .3s ease;
}
:where(.shopPage .cart__freeDelivery.is-reached .cart__progress > span) { background: #15803d; }
:where(.shopPage .cart__head) {
  display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem 6rem; gap: 1rem;
  padding-bottom: .7rem; border-bottom: 1px solid var(--shop-border);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--shop-muted);
}
:where(.shopPage .cart__head span:last-child) { text-align: right; }
:where(.shopPage .cart__lines) { margin-bottom: 1rem; }
:where(.shopPage .cartLine) {
  display: grid; grid-template-columns: 5rem minmax(0, 1fr) 9.5rem 6rem; gap: 1rem; align-items: center;
  padding: 1.25rem 0; border-bottom: 1px solid var(--shop-border);
}
:where(.shopPage .cart__head) { padding-left: 6rem; }
:where(.shopPage .cartLine__media) { display: block; }
:where(.shopPage .cartLine__media img, .shopPage .cartLine__placeholder) {
  display: block; width: 5rem; height: 5rem; object-fit: cover; border-radius: .6rem;
  background: var(--shop-surface); border: 1px solid var(--shop-border);
}
:where(.shopPage .cartLine__body p) { margin: 0; }
:where(.shopPage .cartLine__title) { font-weight: 600; line-height: 1.35; }
:where(.shopPage .cartLine__title a) { color: inherit; text-decoration: none; }
:where(.shopPage .cartLine__title a:hover) { text-decoration: underline; }
:where(.shopPage .cartLine__variant, .shopPage .cartLine__unit) {
  display: block; color: var(--shop-muted); font-size: .88rem; margin-top: .2rem;
}
:where(.shopPage .cartLine__qty) { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
:where(.shopPage .cartLine__qty .qtyStepper) { height: 2.4rem; }
:where(.shopPage .cartLine__qty .qtyStepper__btn) { width: 2.2rem; }
:where(.shopPage .cartLine__qty .qtyStepper__input) { width: 2.6rem; }
:where(.shopPage .cartLine__remove, .shopPage .cart__couponClear) {
  display: inline-flex; align-items: center; gap: .3rem; padding: 0; border: 0; background: none;
  font: inherit; font-size: .82rem; color: var(--shop-muted); cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
:where(.shopPage .cartLine__remove:hover, .shopPage .cart__couponClear:hover) { color: #b42318; }
:where(.shopPage .cartLine__total) { margin: 0; font-weight: 700; text-align: right; }
:where(.shopPage .cart__continue) { margin: 1.25rem 0 0; }
:where(.shopPage .cart__continue a) { color: var(--shop-muted); text-decoration: none; }
:where(.shopPage .cart__continue a:hover) { color: var(--shop-text); }

:where(.shopPage .summaryCard) {
  background: var(--shop-surface); border: 1px solid var(--shop-border); border-radius: .9rem; padding: 1.5rem;
}
:where(.shopPage .cart__aside) { position: sticky; top: 6rem; }
:where(.shopPage .cart__summaryTitle, .shopPage .checkout__summaryTitle) { font-size: 1.1rem; margin: 0 0 1rem; }
:where(.shopPage .cart__row) { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; font-size: .95rem; }
:where(.shopPage .cart__row.is-discount span:last-child) { color: #15803d; }
:where(.shopPage .cart__rowNote) {
  display: inline-block; margin-left: .35rem; font-size: .78rem; color: var(--shop-muted);
}
:where(.shopPage .cart__row.is-total) {
  align-items: baseline; border-top: 1px solid var(--shop-border); margin-top: .6rem; padding-top: .9rem;
  font-size: 1.25rem; font-weight: 700;
}
:where(.shopPage .cart__currency) { font-size: .75rem; font-weight: 500; color: var(--shop-muted); }
:where(.shopPage .cart__coupon) {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin: .9rem 0; padding: .9rem 0; border-block: 1px solid var(--shop-border);
}
:where(.shopPage .cart__coupon .input) { flex: 1; min-width: 8rem; padding-block: .55rem; }
:where(.shopPage .cart__coupon.is-applied) { justify-content: space-between; font-size: .92rem; }
:where(.shopPage .cart__couponError) { flex-basis: 100%; margin: 0; font-size: .85rem; color: #b42318; }
:where(.shopPage .cart__checkout) { gap: .5rem; padding-block: .95rem; font-size: 1.02rem; }
:where(.shopPage .cart__note) { margin: .75rem 0 0; font-size: .85rem; color: var(--shop-muted); text-align: center; }

/* ---- Checkout ---- */
:where(.shopPage .checkout__crumbs) {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin-bottom: 1.5rem; font-size: .88rem; color: var(--shop-muted);
}
:where(.shopPage .checkout__crumbs a) { color: var(--shop-primary); text-decoration: none; }
:where(.shopPage .checkout__crumbs [aria-current]) { color: var(--shop-text); font-weight: 600; }
:where(.shopPage .checkout__layout) {
  display: grid; gap: clamp(1.5rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-areas: "form aside"; align-items: start;
}
:where(.shopPage .checkout__form) { grid-area: form; counter-reset: checkoutStep; }
:where(.shopPage .checkout__aside) { grid-area: aside; position: sticky; top: 6rem; }
:where(.shopPage .checkout__block) { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
:where(.shopPage .checkout__block legend) {
  display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 650; margin-bottom: 1rem; padding: 0;
}
/* Counted, not read from data-step, so a step that hides itself (delivery, on a shop with no
   zones) does not leave a gap in the numbering. */
:where(.shopPage .checkout__block:not([hidden]) legend)::before {
  counter-increment: checkoutStep; content: counter(checkoutStep);
  display: inline-grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--shop-primary); color: #fff; font-size: .8rem; font-weight: 700;
}
:where(.shopPage .field__row) { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
:where(.shopPage .field__optional) { font-weight: 400; color: var(--shop-muted); }
:where(.shopPage .checkout__lead) { margin: -.4rem 0 1rem; font-size: .9rem; color: var(--shop-muted); }
:where(.shopPage .checkout__note) { color: var(--shop-muted); font-size: .9rem; margin: .7rem 0 0; }
:where(.shopPage .checkout__note:empty) { display: none; }
:where(.shopPage .checkout__card:not(:empty)) { margin-top: 1rem; }
:where(.shopPage .checkout__error) {
  color: #b91c1c; background: #fdeceb; margin: 0 0 1rem; padding: .75rem 1rem; border-radius: .5rem;
}
:where(.shopPage .payMethods, .shopPage .shipMethods) {
  display: grid; gap: 0; border: 1px solid var(--shop-border); border-radius: .75rem; overflow: hidden;
}
:where(.shopPage .shipMethods > .checkout__note) { padding: .7rem 1.1rem; margin: 0; border-top: 1px solid var(--shop-border); }
:where(.shopPage .payMethod, .shopPage .shipMethod) {
  display: flex; align-items: center; gap: .75rem; cursor: pointer; padding: 1rem 1.1rem;
  background: var(--shop-bg); transition: background .15s;
}
:where(.shopPage .payMethod + .payMethod, .shopPage .shipMethod + .shipMethod) { border-top: 1px solid var(--shop-border); }
:where(.shopPage .payMethod:has(input:checked), .shopPage .shipMethod:has(input:checked)) {
  background: color-mix(in srgb, var(--shop-primary) 7%, var(--shop-bg));
  box-shadow: inset 3px 0 0 var(--shop-primary);
}
:where(.shopPage .payMethod input[type="radio"], .shopPage .shipMethod input[type="radio"]) {
  width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--shop-primary); flex: none;
}
:where(.shopPage .payMethod__icon) { color: var(--shop-muted); flex: none; }
:where(.shopPage .payMethod:has(input:checked) .payMethod__icon) { color: var(--shop-primary); }
:where(.shopPage .payMethod__fee) { color: var(--shop-muted); font-weight: 400; }
:where(.shopPage .shipMethod__label) { flex: 1; }
:where(.shopPage .shipMethod__price) { font-weight: 600; }
:where(.shopPage .checkout__extra) { margin: 0 0 1.5rem; }
:where(.shopPage .checkout__extra summary) { cursor: pointer; color: var(--shop-primary); font-size: .95rem; margin-bottom: .75rem; }
:where(.shopPage .checkout__submit) { padding-block: 1rem; font-size: 1.05rem; }
:where(.shopPage .checkout__back) { margin: 1rem 0 0; text-align: center; }
:where(.shopPage .checkout__back a) { color: var(--shop-muted); text-decoration: none; }
:where(.shopPage .checkout__secure) {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  margin: .75rem 0 0; font-size: .82rem; color: var(--shop-muted);
}

:where(.shopPage .checkout__summaryWrap) { display: block; }
:where(.shopPage .checkout__summaryToggle) {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer;
  padding: .9rem 1.1rem; border: 1px solid var(--shop-border); border-radius: .75rem;
  background: var(--shop-surface); color: var(--shop-primary); font-weight: 600; list-style: none;
}
:where(.shopPage .checkout__summaryToggle)::-webkit-details-marker { display: none; }
:where(.shopPage .checkout__summaryToggle strong) { color: var(--shop-text); }
:where(.shopPage .orderLines) { list-style: none; margin: 0 0 .25rem; padding: 0; }
:where(.shopPage .orderLine) {
  display: grid; grid-template-columns: 3.75rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .55rem 0;
}
:where(.shopPage .orderLine__media) {
  position: relative; display: block; width: 3.75rem; height: 3.75rem; border-radius: .6rem;
  background: var(--shop-bg); border: 1px solid var(--shop-border);
}
:where(.shopPage .orderLine__media img) { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
:where(.shopPage .orderLine__qty) {
  position: absolute; top: -.5rem; right: -.5rem; display: grid; place-items: center;
  min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem; border-radius: 1rem;
  background: color-mix(in srgb, var(--shop-text) 70%, var(--shop-bg)); color: #fff; font-size: .72rem; font-weight: 700;
}
:where(.shopPage .orderLine__title) { display: block; font-weight: 600; font-size: .92rem; line-height: 1.35; }
:where(.shopPage .orderLine__variant) { display: block; font-size: .82rem; color: var(--shop-muted); }
:where(.shopPage .orderLine__total) { font-weight: 600; font-size: .92rem; }

@media (min-width: 900px) {
  :where(.shopPage .checkout__summaryToggle) { display: none; }
}

/* ---- Order confirmation ---- */
:where(.shopPage .checkout__done) { max-width: 46rem; }
:where(.shopPage .orderSuccess) { display: flex; align-items: flex-start; gap: 1.1rem; margin-bottom: 2rem; }
:where(.shopPage .orderSuccess .section__title) { margin-bottom: .5rem; }
:where(.shopPage .orderSuccess__icon) {
  flex: none; display: grid; place-items: center; width: 3rem; height: 3rem;
  border-radius: 50%; background: #e6f5ee; color: #05683c;
}
:where(.shopPage .bankDetails) {
  margin: 0 0 1.5rem; padding: 1.5rem; border: 1px solid var(--shop-border);
  border-radius: .8rem; background: var(--shop-surface);
}
:where(.shopPage .bankDetails__title) { font-size: 1.05rem; margin: 0 0 .6rem; }
:where(.shopPage .bankDetails__list) { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; margin: 1rem 0 0; }
:where(.shopPage .bankDetails__list dt) { color: var(--shop-muted); }
:where(.shopPage .bankDetails__list dd) { margin: 0; font-weight: 650; }
:where(.shopPage .orderTable) { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
:where(.shopPage .orderTable th) {
  text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--shop-muted); padding-bottom: .6rem; border-bottom: 1px solid var(--shop-border);
}
:where(.shopPage .orderTable td) { padding: .8rem 0; border-bottom: 1px solid var(--shop-border); }
:where(.shopPage .orderTable th:last-child, .shopPage .orderTable td:last-child) { text-align: right; }
:where(.shopPage .orderTable__variant) { display: block; color: var(--shop-muted); font-size: .85rem; }
:where(.shopPage .orderMeta) { color: var(--shop-muted); margin: .5rem 0; }
:where(.shopPage .orderMeta__heading) { font-size: 1.05rem; margin-top: 2rem; }

@media (max-width: 899px) {
  :where(.shopPage .checkout__layout) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "aside" "form"; }
  :where(.shopPage .checkout__aside) { position: static; }
  :where(.shopPage .checkout__summary) { margin-top: .5rem; }
  :where(.shopPage .cart__layout) { grid-template-columns: minmax(0, 1fr); }
  :where(.shopPage .cart__aside) { position: static; }
}

@media (max-width: 760px) {
  :where(.shopPage .product__layout) { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :where(.shopPage .cart__head) { display: none; }
  :where(.shopPage .cartLine) { grid-template-columns: 4.25rem minmax(0, 1fr) auto; grid-template-areas: "media body total" "media qty qty"; align-items: start; gap: .5rem .9rem; }
  :where(.shopPage .cartLine__media) { grid-area: media; }
  :where(.shopPage .cartLine__media img, .shopPage .cartLine__placeholder) { width: 4.25rem; height: 4.25rem; }
  :where(.shopPage .cartLine__body) { grid-area: body; }
  :where(.shopPage .cartLine__total) { grid-area: total; }
  :where(.shopPage .cartLine__qty) { grid-area: qty; flex-direction: row; align-items: center; gap: 1rem; }
  :where(.shopPage .field__row) { grid-template-columns: 1fr; }
}
