/*
 * Store pages. The WebBeans plugin draws the shop, product, cart, checkout and
 * account markup and keeps its own behaviour; this file only dresses that
 * markup in the theme's colours. It is loaded only when the plugin is active.
 */

.wb {
  --wb-accent: var(--tf-ink);
  --wb-line: var(--tf-line);
  --wb-soft: rgba(12, 15, 14, .05);
  --wb-warn: #8a4b00;
}

/* Store content uses the full page width; written copy stays readable. */
.wp-block-post-content > .wb { max-width: none; }
.wb a { color: var(--tf-ink); }
.wb a:hover { color: var(--tf-bronze); }
.wb h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.wb-muted { opacity: 1; color: var(--tf-slate); }

/* Buttons and fields */
.wb-button, .wb button.wb-button {
  padding: .8em 1.3em;
  border: 1.5px solid var(--tf-ink);
  border-radius: var(--tf-radius);
  color: var(--tf-ink);
  font-size: .9375rem;
  font-weight: 700;
  transition: background-color .15s, color .15s, border-color .15s;
}
.wb-button:hover, .wb button.wb-button:hover { background: var(--tf-ink); color: var(--tf-paper); }
.wb-button.wb-primary, .wb button.wb-button.wb-primary { border-color: var(--tf-ink); background: var(--tf-ink); color: var(--tf-paper); }
.wb-button.wb-primary:hover, .wb button.wb-button.wb-primary:hover { border-color: var(--tf-bronze); background: var(--tf-bronze); filter: none; }
.wb button.wb-link { color: var(--tf-slate); font-size: .875rem; }
.wb button.wb-link:hover { color: var(--tf-ink); }

.wb input[type=text], .wb input[type=email], .wb input[type=password], .wb input[type=search], .wb input[type=number], .wb select, .wb textarea {
  padding: .7em .85em;
  border-color: rgba(12, 15, 14, .28);
  border-radius: var(--tf-radius);
  color: var(--tf-ink);
}
.wb :is(input, select, textarea):hover { border-color: var(--tf-ink); }
.wb :is(input, select, textarea):focus-visible { outline: 2px solid var(--tf-bronze); outline-offset: 1px; border-color: var(--tf-bronze); }
.wb-field label, .wb legend { font-size: .875rem; font-weight: 700; }

.wb-notice { border-left-color: var(--tf-bronze); border-radius: 0 var(--tf-radius) var(--tf-radius) 0; background: var(--tf-white); font-weight: 600; }
.wb-notice-error { border-left-color: #a12a1c; }

/* Shop */
.wb-shop-bar { gap: 10px; margin-bottom: 1.25rem; }
.wb-cats { gap: 8px; margin-bottom: 1.5rem; }
.wb-cats a { padding: .45em 1em; border-color: rgba(12, 15, 14, .22); background: var(--tf-white); font-size: .9375rem; font-weight: 600; }
.wb-cats a:hover { border-color: var(--tf-ink); background: var(--tf-ink); color: var(--tf-paper); }
/* Category navigation (beside the products on a wide screen, folded on a phone) */
.wb-catnav summary { border-color: rgba(12, 15, 14, .22); border-radius: var(--tf-radius); background: var(--tf-white); font-size: .9375rem; font-weight: 700; }
.wb-catnav-list a { border-radius: var(--tf-radius); color: var(--tf-ink); font-size: .9375rem; font-weight: 600; }
.wb-catnav-list a:hover { background: rgba(12, 15, 14, .06); color: var(--tf-ink); }
.wb-catnav-list a[aria-current], .wb-catnav-list a[aria-current]:hover { background: var(--tf-ink); color: var(--tf-paper); }
.wb-catnav-list ul { border-left-color: var(--tf-line); }
.wb-catnav-list ul a { color: var(--tf-slate); font-weight: 500; }
@media (min-width: 900px) {
  /* A little wider than the plugin's default, and never a scroll box of its own: the list runs its
     full length beside the products and scrolls with the page. */
  .wb-has-catnav { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 2.5rem; }
  .wb-has-catnav .wb-catnav { position: static; max-height: none; overflow: visible; }
  .wb-has-catnav .wb-catnav summary { margin-bottom: .35rem; background: none; color: var(--tf-slate); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
}
.wb-crumbs { color: var(--tf-slate); font-size: .875rem; }
.wb-crumbs a { color: var(--tf-slate); }

.wb-grid { gap: 20px; }
.wb-card a {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius);
  background: var(--tf-white);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.wb-card a:hover { border-color: rgba(12, 15, 14, .4); box-shadow: 0 10px 28px rgba(12, 15, 14, .1); transform: translateY(-2px); color: var(--tf-ink); }
.wb-card-image { border-radius: 0; background: var(--tf-white); border-bottom: 1px solid var(--tf-line); }
.wb-card-name { padding: 14px 16px 0; font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.wb-card a:hover .wb-card-name { text-decoration: none; }
.wb-card-price { margin-top: auto; padding: 6px 16px 16px; color: var(--tf-slate); font-weight: 600; }
.wb-badge { top: 10px; left: 10px; border-radius: var(--tf-radius); background: var(--tf-ink); color: var(--tf-paper); font-weight: 700; }
.wb-pager a, .wb-pager span { border-radius: var(--tf-radius); background: var(--tf-white); font-weight: 600; }

/* Product */
.wb-gallery-main { border: 1px solid var(--tf-line); border-radius: var(--tf-radius); background: var(--tf-white); }
.wb-gallery-thumbs button { border-radius: var(--tf-radius); background: var(--tf-white); }
.wb-gallery-thumbs button[aria-current] { border-color: var(--tf-brass); }
.wb-price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.wb-short { color: var(--tf-slate); }
.wb-stock { color: #2f6b46; font-size: .9375rem; }
.wb-stock.wb-out { color: #a12a1c; }
.wb-add-row { gap: 10px; }
.wb-add-row .wb-button { flex: 1; max-width: 320px; padding-block: .95em; font-size: 1rem; }
.wb-description { max-width: 760px; padding-top: clamp(20px, 3vw, 36px); border-top: 1px solid var(--tf-line); }
.wb-attributes { width: 100%; }
.wb-attributes th { width: 34%; color: var(--tf-slate); font-size: .875rem; font-weight: 700; }
.wb-related { padding-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--tf-line); }

/* Cart, checkout, account */
.wb-table th { color: var(--tf-slate); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.wb-checkout-side, .wb-returning, .wb-panel { border-radius: var(--tf-radius); background: var(--tf-white); }
.wb-checkout-side { top: calc(var(--tf-header) + 16px); }
.wb-tabs a { font-weight: 600; text-decoration: none; }
.wb-tabs a[aria-current] { border-bottom-color: var(--tf-brass); }

.wb-cart-pill { border-radius: var(--tf-radius); background: var(--tf-ink); color: var(--tf-paper) !important; box-shadow: 0 8px 24px rgba(12, 15, 14, .28); }
.wb-cart-pill span { background: var(--tf-brass); color: var(--tf-ink); }

/* The plugin's own phone layout applies below its 760px breakpoint. */
@media (min-width: 761px) {
  .wb-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .wb-product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
}

@media (max-width: 760px) {
  .wb-grid, .wb-related .wb-grid { gap: 12px; }
  .wb-card-name { padding: 12px 12px 0; font-size: .9375rem; }
  .wb-card-price { padding: 4px 12px 12px; }
  .wb-add-row .wb-button { max-width: none; }
}
