/*
 * Banto for WordPress styles. Themes can override them; colors follow the theme where possible.
 *
 * Settings → Banto → Design picks a style (the root element gets banto-style-minimal, -editorial or -pop)
 * and sets the variables below (accent, image shape, corners) on .banto. No web fonts are loaded:
 * each style lists fonts that are usually on the visitor's device, then falls back to the theme's.
 */
.banto {
	--banto-gap: 1rem;
	--banto-border: color-mix(in srgb, currentColor 20%, transparent);
	--banto-muted: color-mix(in srgb, currentColor 65%, transparent);
	--banto-surface: color-mix(in srgb, currentColor 5%, transparent);
	--banto-accent: var(--wp--preset--color--primary, #1f6feb);
	--banto-accent-text: var(--wp--preset--color--base, #fff);
	--banto-ratio: 4 / 5;
	--banto-radius: .3rem;
	--banto-radius-media: 0;
}
.banto-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--banto-gap); grid-template-columns: repeat(var(--banto-columns, 3), minmax(0, 1fr)); }
@media (max-width: 600px) { .banto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.banto-card a { display: block; color: inherit; text-decoration: none; }
.banto-card__media { position: relative; display: block; aspect-ratio: var(--banto-ratio); margin-bottom: .6rem; overflow: hidden; border-radius: var(--banto-radius-media); background: var(--banto-surface); }
.banto-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.banto-card__brand { display: block; font-size: .8em; letter-spacing: .08em; color: var(--banto-muted); }
.banto-card__name { display: block; }
.banto-badge { position: absolute; top: .5rem; left: .5rem; padding: .15rem .6rem; font-size: .75rem; line-height: 1.6; border-radius: 999px; background: var(--banto-accent); color: var(--banto-accent-text); }
.banto-badge--sale { background: #b42318; color: #fff; }
.banto-price { display: block; font-weight: 600; }
.banto-price del { font-weight: 400; color: var(--banto-muted); margin-right: .35em; }
.banto-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 var(--banto-gap); }
.banto-tag { display: inline-block; padding: .2rem .6rem; border: 1px solid var(--banto-border); border-radius: 999px; text-decoration: none; color: inherit; font-size: .9em; }
.banto-tag.is-active { background: var(--banto-accent); border-color: var(--banto-accent); color: var(--banto-accent-text); }
.banto-pager { display: flex; gap: 1rem; justify-content: center; margin-top: var(--banto-gap); }
.banto-product__layout { display: grid; gap: calc(var(--banto-gap) * 2); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.banto-product__layout > :only-child { grid-column: 1 / -1; }
@media (max-width: 782px) { .banto-product__layout { grid-template-columns: minmax(0, 1fr); } }
.banto-product__summary > * + * { margin-top: var(--banto-gap); }
@media (min-width: 783px) { .banto-product__summary { position: sticky; top: 2rem; align-self: start; } }
.banto-product__title .banto-brand { margin: 0 0 .25rem; font-size: .85em; letter-spacing: .08em; }
.banto-product__name { margin: 0; }
.banto-product__price { margin: 0; font-size: 1.25em; }
.banto-gallery img { width: 100%; height: auto; display: block; margin-bottom: .5rem; border-radius: var(--banto-radius-media); }
/* Main image with thumbnails (Settings → Banto → Design → Product images). */
.banto-gallery[data-banto-gallery] { display: grid; gap: .6rem; }
.banto-gallery__main img { margin: 0; }
.banto-gallery__thumbs { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; }
.banto-gallery__thumbs li { flex: 0 0 auto; margin: 0; }
.banto-gallery__thumb { display: block; width: 4.5rem; border-radius: var(--banto-radius-media); outline: 2px solid transparent; outline-offset: -2px; opacity: .7; transition: opacity .15s; }
.banto-gallery__thumb:hover, .banto-gallery__thumb:focus-visible { opacity: 1; }
.banto-gallery__thumb[aria-current="true"] { opacity: 1; outline-color: var(--banto-accent); }
.banto-gallery .banto-gallery__thumb img { margin: 0; aspect-ratio: 1 / 1; object-fit: cover; }
.banto-gallery--side { grid-template-columns: 4.5rem minmax(0, 1fr); align-items: start; }
.banto-gallery--side .banto-gallery__main { grid-column: 2; grid-row: 1; }
.banto-gallery--side .banto-gallery__thumbs { grid-column: 1; grid-row: 1; flex-direction: column; max-height: 36rem; overflow-y: auto; }
.banto-gallery--below-scroll .banto-gallery__thumbs { overflow-x: auto; scroll-snap-type: x proximity; }
.banto-gallery--below-scroll .banto-gallery__thumbs li { scroll-snap-align: start; }
.banto-gallery--below-grid .banto-gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); }
.banto-gallery--below-grid .banto-gallery__thumb { width: auto; }
/* On a phone the side column becomes a scrolling row below the main image. */
@media (max-width: 600px) {
	.banto-gallery--side { grid-template-columns: minmax(0, 1fr); }
	.banto-gallery--side .banto-gallery__main, .banto-gallery--side .banto-gallery__thumbs { grid-column: 1; grid-row: auto; }
	.banto-gallery--side .banto-gallery__thumbs { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; }
}
.banto-breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85em; color: var(--banto-muted); margin: 0 0 var(--banto-gap); }
.banto-breadcrumb a { color: inherit; }
.banto-add__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.banto-add__qty { display: flex; flex-direction: column; gap: .25rem; font-size: .85em; }
.banto-add__qty input { width: 5em; min-height: 2.75rem; box-sizing: border-box; font: inherit; padding: 0 .6rem; }
.banto-add .banto-button { min-height: 2.75rem; flex-grow: 1; }
.banto-attributes { width: 100%; border-collapse: collapse; }
.banto-attributes th, .banto-attributes td { padding: .5rem 0; border-bottom: 1px solid var(--banto-border); text-align: left; vertical-align: top; }
.banto-attributes th { width: 35%; font-weight: 400; color: var(--banto-muted); }
/* "Banto: Product layout": the parts sit in the editor's own columns and groups. */
.banto-product-layout > * + * { margin-top: var(--banto-gap); }
.banto-brand, .banto-muted, .banto-count { color: var(--banto-muted); }
.banto-skus { border: 0; padding: 0; margin: 0 0 var(--banto-gap); }
.banto-sku { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: .6rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--banto-border); }
.banto-sku .banto-price { font-weight: 400; text-align: right; white-space: nowrap; }
.banto-sku .banto-out { grid-column: 2 / -1; }
.banto-sku.is-out { opacity: .6; }
.banto-out { color: #b42318; font-size: .9em; }
.banto-button { display: inline-block; padding: .6rem 1.25rem; border: 1px solid var(--banto-accent); border-radius: var(--banto-radius); background: var(--banto-accent); color: var(--banto-accent-text); text-decoration: none; cursor: pointer; font: inherit; }
.banto-button--secondary { background: transparent; color: inherit; border-color: var(--banto-border); }
.banto-button[disabled] { opacity: .5; cursor: not-allowed; }
.banto-link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.banto-table, .banto-totals { width: 100%; border-collapse: collapse; margin: 0 0 var(--banto-gap); }
.banto-table th, .banto-table td, .banto-totals th, .banto-totals td { padding: .5rem; border-bottom: 1px solid var(--banto-border); text-align: left; vertical-align: top; }
.banto-totals td { text-align: right; }
.banto-total th, .banto-total td { font-weight: 700; font-size: 1.1em; }
.banto-tax th, .banto-tax td { font-size: .9em; color: var(--banto-muted); }
.banto-qty input[type="number"] { width: 4.5em; }
.banto-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: flex-end; }
.banto-form .banto-field { display: flex; flex-direction: column; gap: .25rem; margin: 0 0 .75rem; }
.banto-form input[type="text"], .banto-form input[type="email"], .banto-form input[type="tel"], .banto-form select { max-width: 100%; padding: .45rem; }
.banto-field.is-invalid input, .banto-field.is-invalid select { border-color: #b42318; outline: 1px solid #b42318; }
.banto-form fieldset { border: 1px solid var(--banto-border); padding: var(--banto-gap); margin: 0 0 var(--banto-gap); }
.banto-radio { display: block; margin: .3rem 0; }
.banto-notice { padding: .75rem 1rem; margin: 0 0 var(--banto-gap); border-left: 4px solid var(--banto-accent); background: color-mix(in srgb, currentColor 5%, transparent); }
.banto-notice--error { border-left-color: #b42318; }
.banto-notice--success { border-left-color: #027a48; }
.banto-section { margin: 0 0 calc(var(--banto-gap) * 1.5); }
.banto-dl dt { font-weight: 600; margin-top: .5rem; }
.banto-dl dd { margin: 0 0 .25rem; }
.banto-legal-links { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; padding: 0; }
.banto-inline { display: inline-block; margin-right: 1rem; }
.banto-coupon, .banto-coupon-add { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 0 0 .5rem; }
.banto-coupon.is-rejected { color: var(--banto-muted); }
.banto-placeholder { padding: 1rem; border: 1px dashed var(--banto-border); }

/* ---- Style: minimal (white space, thin lines, square corners) ---- */
.banto-style-minimal { --banto-radius: 0; --banto-radius-media: 0; --banto-gap: 1.25rem; }
.banto-style-minimal .banto-grid { gap: 2.5rem 1.5rem; }
.banto-style-minimal .banto-card__name { font-size: .95em; line-height: 1.6; }
.banto-style-minimal .banto-price { font-weight: 500; }
.banto-style-minimal .banto-tags { gap: 1.25rem; border-bottom: 1px solid var(--banto-border); }
.banto-style-minimal .banto-tag { border: 0; border-radius: 0; padding: 0 0 .6rem; margin-bottom: -1px; color: var(--banto-muted); }
.banto-style-minimal .banto-tag.is-active { background: none; color: inherit; border-bottom: 2px solid var(--banto-accent); font-weight: 700; }
.banto-style-minimal .banto-product__name { font-weight: 500; letter-spacing: .02em; }
.banto-style-minimal .banto-button { letter-spacing: .1em; }

/* ---- Style: editorial (serif headings, generous space, tall images) ---- */
.banto-style-editorial { --banto-radius: 0; --banto-radius-media: 0; --banto-gap: 1.5rem; --banto-ratio: 3 / 4; --banto-serif: "Shippori Mincho", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Noto Serif JP", serif; }
.banto-style-editorial .banto-card__name, .banto-style-editorial .banto-product__name, .banto-style-editorial h2, .banto-style-editorial h3 { font-family: var(--banto-serif); font-weight: 400; }
.banto-style-editorial .banto-grid { gap: 3rem 1.75rem; }
.banto-style-editorial .banto-grid > :first-child { grid-column: span 2; grid-row: span 2; }
.banto-style-editorial .banto-grid > :first-child > a { display: flex; flex-direction: column; height: 100%; }
.banto-style-editorial .banto-grid > :first-child .banto-card__media { aspect-ratio: auto; flex-grow: 1; min-height: 16rem; }
.banto-style-editorial .banto-grid > :first-child .banto-card__name { font-size: 1.35em; }
@media (max-width: 600px) { .banto-style-editorial .banto-grid > :first-child { grid-row: auto; } .banto-style-editorial .banto-grid > :first-child .banto-card__media { aspect-ratio: var(--banto-ratio); flex-grow: 0; } }
.banto-style-editorial .banto-card__name { font-size: 1.05em; }
.banto-style-editorial .banto-price { font-weight: 400; font-size: .9em; }
.banto-style-editorial .banto-product__price { font-size: 1.2em; }
.banto-style-editorial .banto-tag { border: 0; padding: 0; text-decoration: underline; text-underline-offset: .3em; letter-spacing: .08em; }
.banto-style-editorial .banto-tag.is-active { background: none; color: inherit; text-decoration-thickness: 2px; }
.banto-style-editorial .banto-product__layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 4rem; }
@media (max-width: 782px) { .banto-style-editorial .banto-product__layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.banto-style-editorial .banto-product__name { font-size: 2em; line-height: 1.5; }
.banto-style-editorial .banto-description { line-height: 2.1; }
.banto-style-editorial .banto-button { letter-spacing: .2em; padding: .8rem 1.5rem; }

/* ---- Style: pop (rounded cards, bold type, color) ---- */
.banto-style-pop { --banto-radius: 999px; --banto-radius-media: 1rem; --banto-ratio: 1 / 1; --banto-card: var(--wp--preset--color--base, #fff); --banto-round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Meiryo", sans-serif; font-family: var(--banto-round); }
.banto-style-pop .banto-card { background: var(--banto-card); border: 2px solid var(--banto-border); border-radius: 1.25rem; padding: .75rem .75rem 1rem; }
.banto-style-pop .banto-card__media { border-radius: var(--banto-radius-media); }
.banto-style-pop .banto-card__name { line-height: 1.5; }
.banto-style-pop .banto-price { font-weight: 800; font-size: 1.05em; }
.banto-style-pop .banto-tag { padding: .45rem 1rem; border-width: 2px; font-weight: 700; }
.banto-style-pop .banto-badge { font-weight: 700; }
.banto-style-pop .banto-product__summary, .banto-style-pop.banto-product-layout .banto-add { border-radius: 1.5rem; }
.banto-style-pop .banto-product__summary { background: var(--banto-card); border: 2px solid var(--banto-border); padding: 1.5rem; }
.banto-style-pop .banto-product__name { font-weight: 800; }
.banto-style-pop .banto-product__price { color: var(--banto-accent); font-weight: 800; font-size: 1.35em; }
.banto-style-pop .banto-gallery img { border-radius: 1.5rem; }
.banto-style-pop .banto-gallery__thumb, .banto-style-pop .banto-gallery .banto-gallery__thumb img { border-radius: .75rem; }
.banto-style-pop .banto-sku { border: 2px solid var(--banto-border); border-radius: .75rem; padding: .6rem .9rem; margin-bottom: .5rem; }
.banto-style-pop .banto-sku:has(input:checked) { border-color: var(--banto-accent); }
.banto-style-pop .banto-button { font-weight: 800; padding: .75rem 1.5rem; }
.banto-style-pop .banto-add__qty input { border-radius: .75rem; }
