/*
 * SaaS store theme (xylo) — the merchant's own storefront, NOT iShop-branded.
 * --st-accent comes from the store's brand_color setting (set inline in the layout).
 * Shopify-storefront canon: white, product-first, one accent colour.
 */
:root {
    --st-ink: #1d1f24;
    --st-muted: #5d636f;
    --st-line: #e4e6eb;
    --st-soft: #f5f6f8;
    --st-radius: 8px;
    --st-accent-ink: color-mix(in srgb, var(--st-accent) 82%, #000);
    --st-accent-soft: color-mix(in srgb, var(--st-accent) 10%, #fff);
    --bs-primary: var(--st-accent);
    --bs-link-color: var(--st-accent);
    --bs-link-hover-color: var(--st-accent-ink);
}
body { color: var(--st-ink); background: #fff; font-family: "Poppins", system-ui, sans-serif; }
::selection { background: var(--st-accent-soft); }
:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }

.btn-primary {
    --bs-btn-bg: var(--st-accent); --bs-btn-border-color: var(--st-accent);
    --bs-btn-hover-bg: var(--st-accent-ink); --bs-btn-hover-border-color: var(--st-accent-ink);
    --bs-btn-active-bg: var(--st-accent-ink); --bs-btn-active-border-color: var(--st-accent-ink);
    font-weight: 600;
}
.btn-outline-primary {
    --bs-btn-color: var(--st-accent); --bs-btn-border-color: var(--st-accent);
    --bs-btn-hover-bg: var(--st-accent); --bs-btn-hover-border-color: var(--st-accent);
    --bs-btn-active-bg: var(--st-accent-ink); font-weight: 600;
}

/* Header */
.st-header { background: #fff; border-bottom: 1px solid var(--st-line); position: sticky; top: 0; z-index: 1030; }
.st-topline { background: var(--st-accent); color: #fff; text-align: center; font-size: .82rem; font-weight: 500; padding: .35rem 1rem; }
.st-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem 1.5rem; padding-block: .75rem; }
.st-logo { text-transform: none !important; font-weight: 700; font-size: 1.35rem; color: var(--st-ink); text-decoration: none; letter-spacing: -.01em; }
.st-logo img { max-height: 44px; max-width: 170px; }
.st-search { position: relative; max-width: 34rem; width: 100%; justify-self: center; }
.st-search input { width: 100%; height: 2.6rem; border: 1px solid var(--st-line); background: var(--st-soft); border-radius: 999px; padding: 0 3rem 0 1.1rem; font-size: .95rem; }
.st-search input:focus { outline: none; border-color: var(--st-accent); background: #fff; }
.st-search button { position: absolute; right: .25rem; top: .25rem; width: 2.1rem; height: 2.1rem; border: 0; border-radius: 50%; background: transparent; color: var(--st-muted); }
.st-search #search-suggestions { top: 100%; margin-top: .25rem; }
.st-actions { display: flex; align-items: center; gap: 1rem; }
.st-icon { position: relative; color: var(--st-ink); font-size: 1.2rem; text-decoration: none; display: inline-flex; align-items: center; }
.st-icon:hover { color: var(--st-accent); }
.st-count { position: absolute; top: -.45rem; right: -.6rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: var(--st-accent); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.st-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--st-accent); color: #fff; font-size: .85rem; font-weight: 700; display: grid; place-items: center; }
.st-menu { border-top: 1px solid var(--st-line); }
.st-menu .container { display: flex; gap: .25rem; overflow-x: auto; }
.st-menu a { padding: .6rem .75rem; color: var(--st-ink); text-decoration: none; font-weight: 500; font-size: .92rem; white-space: nowrap; }
.st-menu a:hover { color: var(--st-accent); }
@media (max-width: 767.98px) {
    .st-bar { grid-template-columns: 1fr auto; }
    .st-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
}

/* Home */
.st-intro { background: var(--st-accent-soft); padding: 3rem 0; }
.st-intro h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.st-tagline { font-size: 1.1rem; color: var(--st-muted); margin: .5rem 0 0; max-width: 40rem; }
.st-meta { color: var(--st-muted); margin: .5rem 0 0; font-size: .92rem; }
.st-banners { padding: 1.5rem 0 0; }
.st-banner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1.5rem; background: var(--st-accent-soft); border-radius: var(--st-radius); padding: 2rem; min-height: 16rem; }
.st-banner h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 700; margin-bottom: 1rem; }
.st-banner img { width: 100%; max-height: 18rem; object-fit: contain; }
@media (max-width: 767.98px) { .st-banner { grid-template-columns: 1fr; padding: 1.5rem; } }
.st-section { padding: 2.5rem 0 0; }
.st-heading { font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem; }
.st-link { font-weight: 600; text-decoration: none; }
.st-cats { display: grid; grid-auto-flow: column; grid-auto-columns: 7rem; justify-content: start; gap: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.st-cat { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-decoration: none; color: var(--st-ink); font-weight: 500; font-size: .9rem; text-align: center; }
.st-cat img, .st-cat-mono { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; background: var(--st-soft); }
.st-cat-mono { display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--st-accent); background: var(--st-accent-soft); }
.st-cat:hover { color: var(--st-accent); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1rem; }
.st-card { position: relative; display: flex; flex-direction: column; }
.st-card-img { aspect-ratio: 1; border-radius: var(--st-radius); background: var(--st-soft); display: grid; place-items: center; overflow: hidden; color: #b2b7c2; font-size: 2rem; }
.st-card-img img { width: 100%; height: 100%; object-fit: cover; }
.st-wish { position: absolute; top: .5rem; right: .5rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 0; background: #fff; color: var(--st-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.st-wish:hover { color: #d63a4a; }
.st-card-body { padding-top: .6rem; display: flex; flex-direction: column; flex: 1; }
.st-card-name { color: var(--st-ink); text-decoration: none; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-name:hover { color: var(--st-accent); }
.st-price { margin-top: .3rem; font-variant-numeric: tabular-nums; }
.st-price .now { font-weight: 700; }
.st-price .was { color: var(--st-muted); text-decoration: line-through; font-size: .88em; margin-left: .35rem; }
.st-card .btn { margin-top: auto !important; }
.st-empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--st-line); border-radius: var(--st-radius); color: var(--st-muted); }
.st-empty i { font-size: 2.25rem; color: #b2b7c2; margin-bottom: .75rem; }

/* Footer */
.st-footer { background: var(--st-soft); margin-top: 4rem; color: var(--st-muted); font-size: .92rem; }
.st-footer h2 { font-size: .95rem; font-weight: 600; color: var(--st-ink); margin-bottom: .75rem; }
.st-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.st-footer a { color: var(--st-muted); text-decoration: none; }
.st-footer a:hover { color: var(--st-accent); }
.st-footer-name { font-weight: 700; font-size: 1.15rem; color: var(--st-ink); }
.st-footer-legal { border-top: 1px solid var(--st-line); font-size: .82rem; }

/* Customer auth (login, register, password reset) */
.st-auth { max-width: 26rem; margin: 0 auto; padding: 3rem 1rem 4rem; }
.st-auth h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 .35rem; }
.st-auth-sub { color: var(--st-muted); margin-bottom: 1.5rem; }
.st-auth .form-label { font-weight: 600; font-size: .92rem; margin: 1rem 0 .3rem; }
.st-auth .form-control { min-height: 2.75rem; border-radius: var(--st-radius); }
.st-auth .form-control:focus { border-color: var(--st-accent); box-shadow: 0 0 0 3px var(--st-accent-soft); }
.st-auth .btn { min-height: 2.9rem; margin-top: 1.5rem; }
.st-auth-links { margin-top: 1.25rem; color: var(--st-muted); line-height: 1.9; }

/* Product page: keep the merchant's product name as typed, and put the buy button on the store accent */
.pro-textarea .sec-heading { text-transform: none; font-size: 1.75rem; }
.pro-textarea #variant-price, .pro-textarea #currency-symbol { font-variant-numeric: tabular-nums; }
.cart-actions .add-to-cart { background: var(--st-accent); border-color: var(--st-accent); color: #fff; border-radius: var(--st-radius); }
.cart-actions .add-to-cart:hover { background: var(--st-accent-ink); border-color: var(--st-accent-ink); }
.cart-actions .quantity { border-radius: var(--st-radius); }
