/* Shop: Produkte block, product page, cart, thank-you page. Colors come from the site's
   theme variables (--accent, --text, --muted, --border), set in site/layout.twig. */

.visually-hidden { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.shop-muted { color: var(--muted); font-size: .9rem; }
.shop-taxnote { margin-top: 4px; }

/* Header: Warenkorb link */
.site-cart-link { display:inline-flex; align-items:center; gap:6px; color: var(--text); text-decoration:none; margin-left:24px; white-space:nowrap; }
.site-cart-link:hover { color: var(--accent); }
.site-cart-link svg { width:20px; height:20px; }
/* the header row is space-between: keep the nav next to the cart link, not centred between logo and cart */
.site-header .wrap:has(.site-cart-link) .site-nav { margin-left:auto; }
@media (max-width: 900px) {
    .site-header .site-cart-link { order:1; margin-left:auto; margin-right:12px; }
    .site-header .nav-toggle { order:2; }
}
.site-cart-count { display:inline-block; min-width:20px; padding:0 6px; border-radius:10px; background: var(--accent); color: var(--on-accent, #fff); font-size:.75rem; line-height:20px; text-align:center; font-weight:600; }

/* Produkte block */
.products-title { margin-top:0; }
.product-grid { display:grid; gap:28px; grid-template-columns: repeat(3, 1fr); }
.product-grid--2 { grid-template-columns: repeat(2, 1fr); }
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .product-grid--3, .product-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr; } }
.product-card { display:flex; flex-direction:column; border:1px solid var(--border); border-radius:10px; overflow:hidden; background: var(--page-bg, #fff); }
.product-card-img { display:block; aspect-ratio: 1 / 1; background:#f5f6f8; }
.product-card-img img { width:100%; height:100%; object-fit:cover; display:block; }
.product-card-noimg { display:block; width:100%; height:100%; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #f1f2f4, #e4e6ea); }
.product-card-body { display:flex; flex-direction:column; gap:8px; padding:16px; flex:1; }
.product-card-body .btn { margin-top:auto; align-self:flex-start; }
.product-card-title { margin:0; font-size:1.1rem; }
.product-card-title a { color: inherit; text-decoration:none; }
.product-card-title a:hover { color: var(--accent); }
.product-card-summary { margin:0; color: var(--muted); font-size:.95rem; }
.product-price { margin:0; font-weight:700; }
.product-price--big { font-size:1.6rem; margin-top:8px; }
.product-soldout { display:inline-block; margin-left:8px; padding:2px 8px; border-radius:5px; background:#fdecea; color:#a4281b; font-size:.8rem; font-weight:600; }
.product-soldout--big { margin:16px 0; font-size:1rem; }

/* Product page */
.product-layout { display:grid; grid-template-columns: 1fr 1fr; gap:48px; align-items:start; }
@media (max-width: 800px) { .product-layout { grid-template-columns: 1fr; gap:24px; } }
.product-main-img { width:100%; border-radius:10px; display:block; }
.product-thumbs { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.product-thumb { width:64px; height:64px; padding:0; border:2px solid transparent; border-radius:7px; overflow:hidden; background:none; cursor:pointer; }
.product-thumb.is-active { border-color: var(--accent); }
.product-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.product-info h1 { margin-top:0; }
.product-summary { font-size:1.1rem; color: var(--muted); }
.product-buy { margin:20px 0 28px; display:grid; gap:10px; max-width:420px; }
.product-buy label { font-weight:600; font-size:.9rem; }
.product-buy select, .cart-side select { padding:10px 12px; border:1px solid var(--border); border-radius:7px; font:inherit; background:#fff; }
.product-buy-row { display:flex; gap:10px; }
.product-buy .btn { border:none; cursor:pointer; font:inherit; font-weight:600; }
.product-qty { width:72px; padding:9px 10px; border:1px solid var(--border); border-radius:7px; font:inherit; }
.product-description { margin-top:12px; }

/* Product page: Zusatzmaterial (audio/video players) */
.product-media { margin-top:56px; padding-top:32px; border-top:1px solid var(--border); }
.product-media h2 { margin-top:0; }
.product-media-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:28px; }
@media (max-width: 800px) { .product-media-grid { grid-template-columns: 1fr; } }
.product-media-item { margin:0; display:flex; flex-direction:column; gap:10px; }
.product-media-item video, .product-media-item audio { width:100%; display:block; border-radius:8px; }
.product-media-item figcaption { display:flex; flex-direction:column; gap:2px; }

/* Cart */
.cart-table { width:100%; border-collapse:collapse; margin:16px 0 24px; }
.cart-table th { text-align:left; font-size:.85rem; color: var(--muted); font-weight:600; border-bottom:1px solid var(--border); padding:8px; }
.cart-table td { border-bottom:1px solid var(--border); padding:12px 8px; vertical-align:middle; }
.cart-table .num { text-align:right; white-space:nowrap; }
.cart-item { display:flex; align-items:center; gap:12px; }
.cart-item a { color: var(--text); font-weight:600; text-decoration:none; }
.cart-thumb { width:56px; height:56px; object-fit:cover; border-radius:6px; }
.cart-remove { border:none; background:none; font-size:1.4rem; line-height:1; color: var(--muted); cursor:pointer; padding:4px 8px; }
.cart-remove:hover { color:#a4281b; }
.cart-bottom { display:flex; justify-content:space-between; gap:32px; flex-wrap:wrap; align-items:flex-start; }
.cart-side { display:grid; gap:8px; min-width:220px; }
.cart-side label { font-weight:600; font-size:.9rem; }
.btn.btn-secondary { background:transparent; color: var(--text); border:1px solid var(--border); cursor:pointer; font:inherit; }
.cart-update { justify-self:start; }
.cart-totals { border-collapse:collapse; min-width:280px; margin-left:auto; }
.cart-totals th { text-align:left; font-weight:400; padding:6px 16px 6px 0; }
.cart-totals td { text-align:right; padding:6px 0; white-space:nowrap; }
.cart-totals td.shop-muted { white-space:normal; text-align:left; padding-top:10px; }
.cart-totals .cart-total th, .cart-totals .cart-total td { font-weight:700; font-size:1.15rem; border-top:1px solid var(--border); padding-top:10px; }
.cart-totals--order { margin:24px 0 0; min-width:0; width:100%; max-width:520px; }
.cart-checkout { margin-top:32px; padding-top:24px; border-top:1px solid var(--border); display:grid; gap:14px; justify-items:start; }
.cart-checkout .form-check { display:flex; gap:10px; align-items:flex-start; max-width:640px; }
.cart-checkout .shop-muted { max-width:640px; margin:0; }
.cart-pay { border:none; cursor:pointer; font:inherit; font-weight:600; font-size:1.05rem; padding:14px 28px; }
.cart-pay[disabled] { opacity:.5; cursor:not-allowed; }
@media (max-width: 640px) {
    .cart-table thead { display:none; }
    .cart-table tr { display:grid; grid-template-columns: 1fr auto; gap:4px 12px; padding:12px 0; border-bottom:1px solid var(--border); }
    .cart-table td { border:none; padding:2px 0; }
    .cart-table td.cart-item { grid-column: 1 / -1; }
    .cart-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size:.85rem; }
    .cart-table .num { text-align:left; }
    .cart-totals { width:100%; margin:0; }
}

/* Thank-you page */
.shop-downloads { list-style:none; padding:0; display:grid; gap:10px; }
