/*
 * ShopLeaf shop (/shop, /shop/slug). Fonts and text colour come from the site; surfaces are tints of
 * the text colour so light and dark templates both work. --ssh-accent sets the button colour.
 */
.ssh {
    --ssh-accent: var(--primary, #1b810d);
    --ssh-muted: #6b6f76;
    --ssh-line: rgba(128, 128, 128, 0.28);
    --ssh-card: rgba(128, 128, 128, 0.06);
    max-width: 1200px; margin: 0 auto; padding: calc(var(--sl-header-offset, 0px) + 36px) 20px 80px;
    box-sizing: border-box; color: inherit; text-align: left; font-size: 15px; line-height: 1.55;
}
@supports (color: color-mix(in srgb, red 50%, transparent)) {
    .ssh { --ssh-muted: color-mix(in srgb, currentColor 62%, transparent); --ssh-line: color-mix(in srgb, currentColor 16%, transparent); --ssh-card: color-mix(in srgb, currentColor 4%, transparent); }
}
.ssh * { box-sizing: border-box; }
.ssh a { color: inherit; }
.ssh h1 { font-size: 34px; line-height: 1.2; margin: 0 0 8px; padding: 0; border: 0; text-transform: none; font-weight: 800; }
.ssh h2 { text-transform: none; border: 0; padding: 0; }
.ssh button { all: unset; box-sizing: border-box; cursor: pointer; font: inherit; }
.ssh button:focus-visible { outline: 2px solid var(--ssh-accent); outline-offset: 2px; }
.ssh-empty { color: var(--ssh-muted); padding: 30px 0; }
.ssh-empty a { color: var(--ssh-accent); }
.ssh-flag { background: rgba(255, 179, 0, 0.16); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 14px; }

/* List */
.ssh-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.ssh-search input { width: 260px; font: inherit; color: inherit; background: transparent; border: 1px solid var(--ssh-line); border-radius: 999px; padding: 9px 16px; height: auto; margin: 0; outline: none; }
.ssh-search input:focus { border-color: var(--ssh-accent); }
.ssh-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ssh-cats a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ssh-line); text-decoration: none; font-size: 14px; font-weight: 600; }
.ssh-cats a.on { background: var(--ssh-accent); border-color: var(--ssh-accent); color: #fff; }
.ssh-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 14px; color: var(--ssh-muted); }
.ssh-bar select { font: inherit; font-size: 14px; color: inherit; background: transparent; border: 1px solid var(--ssh-line); border-radius: 8px; padding: 6px 10px; width: auto; height: auto; margin: 0; }
.ssh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 18px; }
.ssh-card { display: block; text-decoration: none; }
.ssh-card img, .ssh-noimage { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: var(--ssh-card); transition: transform 0.25s; }
.ssh-card:hover img { transform: translateY(-3px); }
.ssh-card h2 { font-size: 16px; font-weight: 700; margin: 10px 0 2px; line-height: 1.35; }
.ssh-price { font-weight: 700; }
.ssh-price s { color: var(--ssh-muted); font-weight: 400; margin-left: 6px; }
.ssh-out { font-size: 13px; color: var(--ssh-muted); }
.ssh-pages { display: flex; justify-content: space-between; margin-top: 30px; font-size: 14px; color: var(--ssh-muted); }
.ssh-pages a { color: var(--ssh-accent); }

/* Product */
.ssh-crumbs { font-size: 13px; color: var(--ssh-muted); margin-bottom: 14px; }
.ssh-crumbs a { color: var(--ssh-muted); text-decoration: none; }
.ssh-product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.ssh-main-image img, .ssh-noimage.big { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; display: block; background: var(--ssh-card); }
.ssh-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ssh-thumbs button { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; opacity: 0.6; border: 2px solid transparent; }
.ssh-thumbs button.on, .ssh-thumbs button:hover { opacity: 1; border-color: var(--ssh-accent); }
.ssh-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ssh-vendor { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ssh-muted); }
.ssh-price.big { font-size: 24px; margin: 4px 0 6px; }
.ssh-note { font-size: 13px; color: var(--ssh-muted); margin-bottom: 8px; }
.ssh-option { margin: 16px 0 6px; }
.ssh-option label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; text-transform: none; color: inherit; width: auto; }
.ssh-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.ssh-choices button { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--ssh-line); font-size: 14px; font-weight: 600; }
.ssh-choices button.on { border-color: var(--ssh-accent); box-shadow: inset 0 0 0 1px var(--ssh-accent); }
.ssh-choices button.unavailable { opacity: 0.45; text-decoration: line-through; }
.ssh-stock { min-height: 22px; font-size: 14px; font-weight: 700; color: #c0392b; margin-top: 8px; }
.ssh .ssh-buy { display: flex; justify-content: center; width: 100%; padding: 14px 20px; border-radius: 999px; background: var(--ssh-accent); color: #fff; font-weight: 700; font-size: 16px; margin: 8px 0; }
.ssh .ssh-buy[disabled] { opacity: 0.5; cursor: not-allowed; }
.ssh-description { margin-top: 22px; }
.ssh-description p { margin: 0 0 10px; }
.ssh-fields { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--ssh-line); font-size: 14px; }
.ssh-fields dt { color: var(--ssh-muted); font-weight: 600; }
.ssh-fields dd { margin: 0; }

@media (max-width: 760px) {
    .ssh-product { grid-template-columns: 1fr; gap: 20px; }
    .ssh h1 { font-size: 26px; }
    .ssh-search input { width: 100%; }
    .ssh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
}
