/* Saće i maslina: honey amber, olive green and warm white. Light only. */
:root {
  --bg: #fffaf0;
  --surface: #ffffff;
  --ink: #3a2a0c;
  --muted: #6b5a3a;
  --line: #efdfbd;
  --accent: #9a5d05;
  --on-accent: #ffffff;
  --band: #4f5d1c;
  --on-band: #fffaf0;
  --error: #a5281b;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --radius: 999px;
  --radius-lg: 20px;
  --radius-field: 12px;
}

.cart-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; text-decoration: none;
}
.cart-count {
  display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 0.8rem; font-variant-numeric: tabular-nums;
}

.product-grid .card img { aspect-ratio: 1 / 1; }
/* The padding makes a 44 px touch target without changing the card's layout (the negative margin cancels it). */
.card h3 a { display: inline-block; padding-block: 11px; margin-block: -11px; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.btn-small { min-height: 44px; padding: 0.5em 1em; font-size: 0.95rem; }

.story-section { background: var(--surface); border-block: 1px solid var(--line); }
.story { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.story img { width: 100%; max-height: 560px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.story-text { display: grid; gap: 14px; }
.story-text p:not(.kicker) { color: var(--muted); }

.breadcrumb { margin-bottom: 20px; color: var(--muted); font-size: 0.9rem; }
.breadcrumb a, .back-link { color: var(--accent); }
.breadcrumb a { display: inline-block; padding-block: 11px; margin-block: -11px; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.product > img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-lg); }
.product-info { display: grid; gap: 14px; justify-items: start; }
.product-size { color: var(--muted); }
.product-price { font: 700 1.6rem/1 var(--font-head); font-variant-numeric: tabular-nums; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* No overflow: hidden here, because it would clip the keyboard focus ring of the buttons and the input. */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.qty button:disabled { opacity: 0.4; cursor: default; }
.qty input, .qty-value { width: 48px; text-align: center; font: inherit; font-variant-numeric: tabular-nums; }
.qty input { height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); appearance: textfield; }
/* The minus and plus buttons replace the browser's own spin arrows. */
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.details dt { font-weight: 600; }
.details dd { margin: 0; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; }

.cart-empty { display: grid; gap: 14px; justify-items: start; margin-top: 20px; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 24px; }
.cart-line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px 16px;
  padding-block: 14px; border-bottom: 1px solid var(--line);
}
.cart-name { display: grid; }
.cart-name small { color: var(--muted); }
/* A fixed minimum keeps the quantity boxes in line when one price has more digits than another. */
.cart-line .price { min-width: 5.5em; text-align: right; }
.remove { min-height: 44px; min-width: 44px; padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; }
.summary { display: grid; gap: 8px; margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.summary > div { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.summary .total { padding-top: 8px; border-top: 1px solid var(--line); font-size: 1.15rem; font-weight: 700; }
.payment { margin: 0; padding: 0; border: 0; }
.payment legend { padding: 0; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
/* demo.css's ".field label" (bold, small) would otherwise win over ".radio" */
.field .radio { font-size: 1rem; font-weight: 500; }
.field .radio input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent); }

@media (max-width: 860px) {
  .product, .cart-layout, .story { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .cart-line { grid-template-columns: minmax(0, 1fr) auto; }
  .cart-name { grid-column: 1; grid-row: 1; }
  .cart-line .price { grid-column: 2; grid-row: 1; min-width: 0; }
  .cart-line .qty { grid-column: 1; grid-row: 2; justify-self: start; }
  .remove { grid-column: 2; grid-row: 2; justify-self: end; }
}
@media (max-width: 420px) {
  /* Keeps the logo and the cart link on one row on 360 px phones, even with a two-digit count. */
  .cart-link { gap: 6px; padding: 0 10px; }
}
