/* Shop page — works with the markup that shop.js builds. Loaded after site.css. */
.shop-hero { padding-bottom: clamp(24px, 4vw, 40px); }
.shop-status:not(:empty) { display: inline-flex; margin: 8px 0 0; padding: 8px 14px; border-radius: 999px; border: 1px solid rgb(226 184 92 / 60%); background: #fff7e3; color: var(--gold-deep); font: 600 .74rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.catalog-toolbar { position: sticky; top: var(--header-h); z-index: 40; background: rgb(247 242 231 / 88%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-block: 1px solid var(--line); }
.catalog-toolbar .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 12px; }
.categories { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.categories::-webkit-scrollbar { display: none; }
.categories .chip { flex: none; }
.categories .chip[aria-current] { color: #fff; background: var(--leaf); border-color: var(--leaf); }
.filters { display: flex; gap: 8px; flex: none; }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filters input, .filters select { min-height: 42px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 .88rem/1 var(--body); }
.filters input { width: 250px; padding: 0 16px 0 40px; }
.filters select { padding: 0 34px 0 16px; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2395a0c2' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; }
.filters select option { background: #fff; color: var(--ink); }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--garden); box-shadow: 0 0 0 3px rgb(60 138 95 / 18%); }
@media (max-width: 1000px) {
  .catalog-toolbar .container { flex-direction: column; align-items: stretch; }
  .filters input { width: 100%; }
  .filters .search-field { flex: 1; }
}

.product-count { margin: 26px 0 16px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.product-count:focus { outline: none; }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.8vw, 22px); }
@media (max-width: 1120px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .products { grid-template-columns: 1fr; } }

.product { position: relative; display: flex; flex-direction: column; padding: 10px; border-radius: var(--radius); border: 1px solid transparent; background: linear-gradient(180deg, var(--surface), rgb(255 253 248 / 88%)) padding-box, linear-gradient(140deg, rgb(226 184 92 / 65%), var(--line) 35%, var(--line) 65%, rgb(60 138 95 / 50%)) border-box; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.product:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -28px rgb(21 55 42 / 45%); }
.family-media { background: var(--plate); border-radius: calc(var(--radius) - 8px); overflow: hidden; }
.family-media img { width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; transition: transform .6s var(--ease); }
.product:hover .family-media img { transform: scale(1.05); }
.product-copy { padding: 16px 8px 8px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-tag { margin: 0; font: 600 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--garden); }
.product h2 { font-size: clamp(.98rem, 1.3vw, 1.12rem); line-height: 1.25; letter-spacing: -.01em; }
.product p { margin: 0; }
.pack { color: var(--muted); font-size: .88rem; }
.family-details { margin-top: auto; padding-top: 10px; }
.price { font: 650 clamp(1.05rem, 1.6vw, 1.25rem)/1 var(--display); color: var(--gold-deep); }

/* Buttons and fields that shop.js creates */
.shop-main button, #cart button {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: 700 .88rem/1 var(--body); color: #fff;
  background: linear-gradient(135deg, var(--garden), var(--leaf));
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.shop-main button:hover, #cart button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgb(31 77 54 / 70%); }
.shop-main button:disabled, #cart button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.shop-main button.secondary, #cart button.secondary { color: var(--ink); background: var(--surface); border-color: var(--line-2); }
.shop-main button.secondary:hover, #cart button.secondary:hover { border-color: var(--garden); box-shadow: none; }
.add-form { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: end; margin-top: 12px; }
.add-form label { display: grid; gap: 4px; font: 600 .64rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.add-form input, #cart input, #cart textarea {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); font: 600 .95rem/1 var(--body);
}
.add-form input { text-align: center; padding: 0 4px; }
#cart textarea { min-height: 76px; padding: 12px; line-height: 1.4; resize: vertical; }
.add-form input:focus, #cart input:focus, #cart textarea:focus { outline: none; border-color: var(--garden); box-shadow: 0 0 0 3px rgb(60 138 95 / 18%); }
@media (max-width: 520px) {
  .product { padding: 7px; }
  .product-copy { padding: 12px 5px 5px; }
  .add-form { grid-template-columns: 50px 1fr; gap: 6px; }
  .shop-main .add-form button { padding: 0 8px; font-size: .78rem; }
}

#pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
#pagination button { min-width: 44px; padding: 0 12px; }
#pagination [aria-current] { color: #2b1d04; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: var(--gold); }

.trust-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: clamp(40px, 6vw, 72px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.trust-row > div { background: var(--surface); padding: 22px 24px; display: grid; gap: 6px; }
.trust-row b { font: 650 1rem/1.2 var(--display); color: var(--leaf); }
.trust-row span { color: var(--muted); font-size: .92rem; }
.trust-row a { color: var(--ink); }
@media (max-width: 760px) { .trust-row { grid-template-columns: 1fr; } }

/* Cart drawer */
#cart {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100%); height: 100%; max-height: 100%; max-width: 100%;
  padding: 26px clamp(18px, 4vw, 30px) 40px; border: 0; border-left: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface), var(--bg)); color: var(--ink); overflow-y: auto;
}
#cart::backdrop { background: rgb(21 55 42 / 45%); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: no-preference) {
  #cart[open] { animation: cart-in .35s var(--ease); }
  @keyframes cart-in { from { transform: translateX(100%); } to { transform: none; } }
}
.cart-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.cart-heading h2 { font-size: 1.5rem; }
.cart-heading form { margin: 0; }
#cart .icon-close { width: 44px; padding: 0; font-size: 1rem; }
#cart-feedback { margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--mint); border: 1px solid rgb(60 138 95 / 30%); color: var(--leaf); font-weight: 700; font-size: .92rem; }
#empty-cart { color: var(--muted); margin: 18px 0; }
#cart-items, #offers { list-style: none; padding: 0; margin: 0; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line > span { font-weight: 700; line-height: 1.3; }
.cart-line small { display: block; margin-top: 4px; font-weight: 500; }
.quantity { display: flex; gap: 6px; align-items: center; }
.quantity input { width: 64px !important; text-align: center; }
#cart .quantity button { min-height: 40px; padding: 0 12px; font-size: .8rem; }
#cart form#promo, #cart form#checkout { display: grid; gap: 12px; margin-top: 18px; }
#cart form[hidden] { display: none; }
#cart label { display: grid; gap: 6px; font: 700 .78rem/1.2 var(--body); letter-spacing: .04em; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.address-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#promo-status:not(:empty), #checkout-status:not(:empty) { margin: 12px 0 0; font-weight: 700; font-size: .9rem; color: var(--leaf); }
#offers li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; color: var(--ink-2); }
#totals { margin: 20px 0 0; padding: 18px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; display: grid; gap: 10px; }
#totals div { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); }
#totals dd { margin: 0; font-variant-numeric: tabular-nums; }
#totals .total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--leaf); font: 650 1.15rem/1 var(--display); }
#checkout h3 { margin-top: 10px; font-size: 1.1rem; }
#cart #pay { min-height: 52px; font-size: 1rem; margin-top: 6px; color: #2b1d04; background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #cf9e3c); }
