/* Work Abroad shop: product cards, product page, cart. Uses the site's own
   colour variables so light and dark themes both work. */
.shop-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 26px; }
.shop-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.shop-img, .shop-img-fallback { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-soft); }
.shop-img-fallback { display: grid; place-items: center; color: var(--muted); font-size: 2.2rem; font-weight: 700; }
.shop-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shop-body h3 { margin: 0; }
.shop-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.shop-price { font-weight: 700; color: var(--accent); font-size: 1.15rem; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 10px; }
.shop-actions .btn { margin: 0; }
.shop-bar { display: none !important; position: fixed; left: 16px; bottom: 16px; z-index: 40; display: none; }
.shop-bar.show { display: block; }
.shop-bar a { display: inline-block; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lift); }
.shop-detail { display: grid; gap: 28px; grid-template-columns: 1fr; margin-top: 10px; }
@media (min-width: 820px) { .shop-detail { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.shop-detail .shop-img, .shop-detail .shop-img-fallback { border-radius: var(--radius); }
.shop-includes { margin: 12px 0 0; padding-left: 1.2em; }
.shop-includes li { margin: 6px 0; }
.cart-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.cart-row .shop-img, .cart-row .shop-img-fallback { width: 84px; border-radius: 10px; aspect-ratio: 1 / 1; font-size: 1.3rem; }
.cart-row h3 { margin: 0 0 2px; font-size: 1.02rem; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.15rem; padding: 16px 0 6px; }
.cart-pay { display: grid; gap: 10px; margin-top: 14px; }
.cart-pay .btn { margin: 0; }
.cart-link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* Quantity stepper, notes, side cart */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--accent); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty input { width: 44px; text-align: center; border: 0; background: none; font: inherit; color: inherit; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-line { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.cart-line-top { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.cart-line-top .shop-img, .cart-line-top .shop-img-fallback { width: 64px; aspect-ratio: 1 / 1; border-radius: 10px; font-size: 1.2rem; }
.cart-line-top h3 { margin: 0 0 2px; font-size: 1rem; }
.cart-line-controls { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 6px; }
.cart-notes { display: block; font-size: .85rem; color: var(--muted); }
.cart-notes textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: .92rem; }
.shop-buy { display: grid; gap: 10px; margin: 14px 0; }
.shop-buy .qty { justify-self: start; width: fit-content; max-width: 100%; }
.wa-save { margin-top: 14px; }
.wa-save summary { cursor: pointer; color: var(--muted); }
.wa-save .co-code-row { margin: 8px 0; }
.ghs-sub { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); opacity: .75; margin-top: 2px; }
.co-card .field textarea { width: 100%; font: inherit; font-size: 16px; }
.co-card .field input[readonly] { opacity: .7; }
.cart-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.cart-actions .btn { margin: 0; }
.shop-bar button { background: var(--accent); color: #fff; font-weight: 600; border: 0; cursor: pointer; font: inherit; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lift); }
.shop-drawer { position: fixed; inset: 0; z-index: 90; }
.shop-drawer[hidden] { display: none; }
.shop-drawer-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.shop-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); box-shadow: var(--shadow-lift); display: flex; flex-direction: column; }
#shop-drawer-body { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.shop-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; }
.shop-drawer-head h2 { margin: 0; font-size: 1.2rem; }
.shop-drawer-head .cart-link-btn { font-size: 1.8rem; text-decoration: none; line-height: 1; }
.shop-drawer-lines { overflow-y: auto; padding: 0 18px; flex: 1; }
.shop-drawer-foot { padding: 14px 18px 18px; display: grid; gap: 10px; border-top: 1px solid var(--hairline); }
.shop-drawer-foot .btn { margin: 0; text-align: center; }
.shop-noscroll { overflow: hidden; }

/* Hideable lists */
.wa-toggle { margin: 14px 0; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); }
.wa-toggle > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; cursor: pointer; font-weight: 700; list-style: none; -webkit-tap-highlight-color: transparent; }
.wa-toggle > summary::-webkit-details-marker { display: none; }
.wa-toggle > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; opacity: .6; }
.wa-toggle[open] > summary::after { transform: rotate(-135deg); }
.wa-toggle > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wa-count { background: var(--bg-soft); color: var(--muted); border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 600; }
.wa-toggle-body { padding: 0 16px 14px; }
.wa-toggle-body > :first-child { margin-top: 0; }

/* One-payment checkout */
.co-card { margin-top: 18px; }
.co-card .field input { width: 100%; font-size: 16px; min-height: 46px; }
.co-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.co-line small { display: block; color: var(--muted); font-size: .8rem; }
.co-line:last-child { border-bottom: 0; }
.co-code-row { display: flex; gap: 10px; }
.co-code-row input { flex: 1; min-width: 0; }
.co-code-row .btn { margin: 0; }
.co-pay { width: 100%; margin: 6px 0 0; min-height: 50px; font-size: 1.05rem; }
.co-card .msg { margin-top: 12px; }

/* Phones and small tablets */
@media (max-width: 640px) {
  .shop-grid { grid-template-columns: 1fr; gap: 16px; }
  .shop-actions .btn, .cart-actions .btn { flex: 1 1 100%; text-align: center; }
  .cart-row { grid-template-columns: 64px 1fr; row-gap: 6px; }
  .cart-row > strong { grid-column: 2; }
  .cart-row .shop-img, .cart-row .shop-img-fallback { width: 64px; }
  .cart-line-top { grid-template-columns: 52px 1fr; }
  .cart-line-top .shop-img, .cart-line-top .shop-img-fallback { width: 52px; }
  .cart-line-top .cart-line-total { grid-column: 2; }
  .cart-line-controls { flex-wrap: wrap; gap: 8px; }
  .qty button { width: 44px; height: 44px; }
  .qty input { width: 48px; font-size: 16px; }
  .cart-notes textarea, .shop-buy textarea { font-size: 16px; }
  .shop-drawer-panel { width: 100%; }
  .shop-drawer-foot { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .shop-bar { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .shop-bar button { width: 100%; min-height: 48px; }
  .co-code-row { flex-direction: column; }
  .co-code-row .btn { width: 100%; }
  .cart-total { font-size: 1.05rem; }
  .wa-toggle > summary { padding: 10px 14px; }
  .wa-toggle-body { padding: 0 14px 12px; }
}
@media (max-width: 380px) { .shop-body { padding: 14px; } .cart-total { flex-direction: column; gap: 2px; } }
@media (prefers-reduced-motion: reduce) { .wa-toggle > summary::after { transition: none; } }
