/* Cart + checkout layer for the one-page order site */

.brand-sub { letter-spacing: 0.18em; }

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.cart-btn .count {
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
}

.section-lead {
  color: var(--muted);
  max-width: 34rem;
  margin: 0.2rem 0 0;
}

.cab-grid {
  grid-template-columns: repeat(2, minmax(220px, 280px));
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.75rem;
}

.house-section { padding-top: 0.5rem; }

.house-grid {
  grid-template-columns: repeat(3, minmax(180px, 240px));
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.secretos-band {
  margin-top: 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.secretos-grid {
  grid-template-columns: minmax(180px, 240px);
  justify-content: center;
  margin-top: 1.5rem;
}

.product-meta h3 {
  font-size: 1.35rem;
}

.product-card {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  color: var(--ivory);
}

.product-face {
  border: 1px solid var(--line-soft);
  background: #050403;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  width: 100%;
}

.product-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}

.product-card.in-cart .product-face {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.product-meta {
  text-align: center;
}

.product-meta h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.product-meta .appel,
.product-meta .price {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}

.qty-step {
  display: inline-flex;
  border: 1px solid var(--line);
}

.qty-step button,
.qty-step span {
  width: 2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--ivory);
  border: 0;
  font-family: var(--font-body);
}

.qty-step button { cursor: pointer; }

.add-btn {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  cursor: pointer;
}

.add-btn:hover { background: rgba(184, 149, 74, 0.12); }

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: none;
}

.cart-drawer.open { display: block; }

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  width: 100%;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #120e0c;
  border-left: 1px solid var(--line);
  padding: 1.25rem 1.1rem 1.5rem;
  overflow: auto;
  box-shadow: var(--shadow);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cart-lines { list-style: none; padding: 0; margin: 1rem 0; }

.cart-lines li {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.cart-lines img {
  width: 52px;
  height: 68px;
  object-fit: contain;
  background: #050403;
}

.line-name { margin: 0; font-size: 0.95rem; }
.line-sub { color: var(--muted); font-size: 0.78rem; }

.icon-x {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.totals {
  display: grid;
  gap: 0.35rem;
  margin: 0.8rem 0 1rem;
  font-size: 0.92rem;
}

.totals div { display: flex; justify-content: space-between; gap: 1rem; }
.totals .grand { font-size: 1.05rem; color: var(--gold-bright); }

.discount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  margin: 0.4rem 0 0.2rem;
}

.discount-row input,
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  background: #0c0a09;
  color: var(--ivory);
  border: 1px solid var(--line-soft);
  padding: 0.65rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.ship-choices { display: grid; gap: 0.55rem; margin-top: 0.35rem; }
.ship-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.92rem;
  color: var(--ivory);
  border: 1px solid var(--line-soft);
  padding: 0.7rem 0.75rem;
}
.age-cert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  border: 1px solid var(--gold);
  padding: 0.8rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
.discount-msg { min-height: 1.2rem; font-size: 0.82rem; color: var(--gold-bright); }
.discount-msg.bad { color: #e0a0a0; }

.checkout-wrap { display: none; }
.checkout-wrap.open { display: block; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.summary-card,
.pay-note {
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(18, 14, 12, 0.65);
}

.confirm-box {
  display: none;
  border: 1px solid var(--gold);
  padding: 1.25rem;
  margin-top: 1rem;
}

.confirm-box.show { display: block; }

.empty-cart { color: var(--muted); }

@media (max-width: 800px) {
  .product-grid,
  .house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .cab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .secretos-grid { grid-template-columns: minmax(0, 220px); }
  .checkout-grid { grid-template-columns: 1fr; }
  .product-actions { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
}

/* v3 polish: centered Secretos + balanced odd last card on small screens */
.product-meta { text-align: center; }
.product-meta h3, .product-meta .appel, .product-meta .price { display: block; }
@media (max-width: 800px) {
  .secretos-grid { grid-template-columns: minmax(0, 48%); justify-content: center; }
  .house-grid > .product-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 0.5rem); }
}
@media (max-width: 520px) {
  .secretos-grid { grid-template-columns: minmax(0, 48%); justify-content: center; }
  .house-grid > .product-card:last-child:nth-child(odd) { width: calc(50% - 0.3rem); }
}

/* v6: single flowing wines list */
#shop .house-grid, #shop .secretos-grid { margin-top: 2rem; }

/* v7: collapsible discount + address quote */
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-bright); font: inherit; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; margin: 0.4rem 0; }
.link-btn:hover { opacity: 0.85; }
.code-panel { margin: 0.3rem 0 0.6rem; }
.code-panel[hidden], [data-discount-row][hidden], [data-q-discount-row][hidden] { display: none !important; }
.opt { opacity: 0.6; font-weight: 400; }
.quote-box { border: 1px solid rgba(201,169,97,0.35); border-radius: 6px; padding: 0.9rem 1rem; margin: 0.6rem 0; }
.quote-box .totals { margin: 0; }
.quote-msg { margin: 0.6rem 0 0; font-size: 0.85rem; opacity: 0.85; }
.quote-msg.bad { color: #e0a0a0; opacity: 1; }
.quote-msg.ok { color: var(--gold-bright); }
.check-line { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; text-transform: none; letter-spacing: normal; font-size: 0.92rem; color: var(--ivory); }
.checkout-form input[type="checkbox"], .checkout-form input[type="radio"] { width: 1.1rem; height: 1.1rem; padding: 0; margin-top: 0.15rem; }
.opt { text-transform: none; letter-spacing: normal; }
.return-policy { font-size: 0.8rem; line-height: 1.45; opacity: 0.8; margin: 0.25rem 0 0.75rem; }
