:root {
    color-scheme: light;
    --ink: #0a234c;
    --border: #d8e2ef;
    --action: #ab3a00;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f4f7fb; color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
a { color: inherit; }
.store-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; background: #081d3e; color: white; padding: 1rem max(1rem, calc((100vw - 72rem) / 2)); font-weight: 500; }
.store-language { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
.store-language a { padding: .35rem .65rem; border-radius: .5rem; }
.store-language a[aria-current] { background: #ffffff26; text-decoration: underline; }
main { max-width: 74rem; margin: auto; padding: 1rem; }
.store-products, .store-fields { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.store-card { padding: 1.25rem; border: 1px solid var(--border); border-radius: 14px; background: white; overflow-wrap: anywhere; }
.store-card h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.store-card img { display: block; width: 100%; height: 10rem; object-fit: contain; margin-bottom: .75rem; }
.store-checkout { margin-top: 1rem; }
.store-address { grid-column: 1 / -1; }
label { display: block; }
input:not([type=hidden]):not([type=checkbox]), select, textarea { display: block; width: 100%; padding: .6rem; border: 1px solid #8395ae; border-radius: .5rem; font: inherit; }
button { margin-top: 1rem; padding: .75rem 1.25rem; border: 0; border-radius: .5rem; background: var(--action); color: white; font: inherit; font-weight: 500; cursor: pointer; }
.alert-danger { border: 1px solid #dc958d; border-radius: .5rem; background: #fff0ef; color: #781b12; margin-bottom: 1rem; }
.store-pagination { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
dt { font-weight: 500; }
dd { margin: 0 0 .5rem; }
.ec-store-logo { width: auto; max-width: 160px; height: 38px; object-fit: contain; }
.ec-store-banner { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 16px; margin-block: 0 1rem; }
.ec-product-gallery { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; }
.ec-product-gallery img { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.ec-theme-market .store-products { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ec-theme-market .store-card { border-radius: 8px; box-shadow: none; }
.ec-theme-studio .store-products { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.ec-theme-studio .store-card { border-radius: 24px; padding: 1.5rem; }

/* Shop themes share the same catalogue and checkout controls. */
.ec-store {
    --shop-action: #163c76;
    --shop-action: color-mix(in srgb, var(--store-brand, #163c76) 38%, #081d3e);
    --shop-wash: #edf4ff;
    --shop-wash: color-mix(in srgb, var(--store-brand, #163c76) 9%, #f6f9ff);
    --action: var(--shop-action);
    background: #f4f7fb;
}
.ec-store .store-header {
    background: var(--shop-action);
    border-bottom-width: 1px;
    box-shadow: 0 4px 16px #0a234c20;
}
.store-header__brand { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 1.09rem; }
.store-header__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; margin-inline-start: auto; }
.ec-store .store-install {
    margin: 0;
    padding: .43rem .65rem;
    border: 1px solid #ffffff75;
    border-radius: 8px;
    background: #ffffff1a;
    font-size: .82rem;
}
.store-install .ec-icon { width: 16px; height: 16px; }
.ec-store .store-hero {
    margin-bottom: 1rem;
    border-radius: 18px;
    background: radial-gradient(circle at 85% 8%, #ffffff26, transparent 50%), linear-gradient(120deg, #081d3e, var(--shop-action));
}
.ec-store .store-hero h1 { margin: .25rem 0; font-size: clamp(1.55rem, 4vw, 2.6rem); line-height: 1.14; }
.ec-store .store-hero span { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.ec-store .store-hero p { max-width: 60ch; }
.ec-store .store-hero > .ec-icon { width: clamp(2rem, 6vw, 4.2rem); }
.ec-store .ec-shop-links { justify-content: flex-end; flex-wrap: wrap; }
.ec-store .ec-shop-links a {
    padding: .36rem .65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--shop-action);
    background: #fff;
    font-weight: 500;
    text-decoration: none;
}
.ec-store .ec-search {
    align-items: end;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--shop-wash);
}
.ec-store .ec-search label { font-size: .82rem; font-weight: 500; }
.ec-store .ec-search :is(input, select) { margin-top: .25rem; background: #fff; }
.ec-store .store-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ec-store .store-products > .store-card {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: .45rem;
    min-width: 0;
    overflow: hidden;
}
.ec-store .store-products > .store-card > p { margin: 0; }
.ec-store .store-products > .store-card h2 { margin: 0; line-height: 1.3; }
.ec-store .store-products h2 a { text-decoration: none; }
.ec-store .store-products h2 a:hover { text-decoration: underline; }
.ec-store .store-products > .store-card > img, .ec-store .ec-product-gallery { width: 100%; }
.ec-store .store-products img { background: var(--shop-wash); }
.ec-store .store-products :is(.ec-stock, .store-card__price) { margin-top: .2rem; }
.ec-store .store-card__price { color: var(--shop-action); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.ec-store .store-products [data-stock-controls] { width: 100%; margin-top: auto; }
.ec-store .store-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; }
.ec-store .is-product-page img { height: clamp(12rem, 38vw, 24rem); }
.ec-store.ec-theme-market .store-hero { color: var(--ink); background: linear-gradient(135deg, #fff, var(--shop-wash)); border: 1px solid var(--border); }
.ec-store.ec-theme-market .store-hero :is(span, p, .ec-icon) { color: var(--shop-action); }
.ec-store.ec-theme-market .store-products > .store-card { padding: .8rem; border-radius: 10px; }
.ec-store.ec-theme-market .store-products img { height: 8rem; }
.ec-store.ec-theme-studio .store-hero { min-height: 180px; padding: clamp(1.5rem, 5vw, 3rem); }
.ec-store.ec-theme-studio .store-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ec-store.ec-theme-studio .store-products img { height: clamp(11rem, 22vw, 17rem); }
.ec-store.ec-theme-studio .store-products.is-product-page img { height: clamp(12rem, 38vw, 24rem); }
@media (max-width: 960px) {
    .ec-store .store-products, .ec-store.ec-theme-studio .store-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .ec-store .store-products, .ec-store.ec-theme-studio .store-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
    .ec-store .store-products > .store-card { padding: .8rem; }
    .ec-store .store-products:not(.is-product-page) img { height: 8rem; }
    .ec-store .store-products [data-stock-controls] small { display: block; }
}
@media (max-width: 360px) {
    .ec-store .store-products, .ec-store.ec-theme-studio .store-products { grid-template-columns: minmax(0, 1fr); }
}
.ec-store .store-products.is-product-page,
.ec-store.ec-theme-studio .store-products.is-product-page { grid-template-columns: minmax(0, min(100%, 52rem)); justify-content: center; }
