/* Shared storefront stylesheet. Colours, shapes and fonts are design tokens (App\Themes\ThemeStyle) set per shop
   in a <style> block; the values below are only fallbacks. Themes add their own stylesheet on top. */
:root {
    --primary: #0f766e; --on-primary: #fff; --accent: #f59e0b; --on-accent: #111827;
    --bg: #fff; --text: #1f2937; --muted: #6b7280; --border: #e5e7eb; --bg-soft: #f9fafb;
    --header-bg: #fff; --header-text: #1f2937; --footer-bg: #f9fafb; --footer-text: #1f2937;
    --radius: 10px; --btn-radius: 8px; --card-ratio: 1 / 1;
    --danger: #b91c1c;
    --success: #15803d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); color: var(--text); line-height: 1.55; background: var(--bg); }
h1, h2, h3 { font-family: var(--font-heading, inherit); }
a { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin: .3em 0 .5em; }
h2 { font-size: 1.35rem; margin: 1.6em 0 .7em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.site-header { border-bottom: 1px solid var(--border); background: var(--header-bg); color: var(--header-text); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { font-weight: 800; font-size: 1.3rem; text-decoration: none; color: var(--header-text); white-space: nowrap; }
.brand img { max-height: 44px; width: auto; }
.search { flex: 1; }
.search input { width: 100%; max-width: 520px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--header-text) 18%, var(--header-bg)); border-radius: 999px; font: inherit; background: color-mix(in srgb, var(--header-text) 4%, var(--header-bg)); color: var(--header-text); }
.search input::placeholder { color: color-mix(in srgb, var(--header-text) 55%, var(--header-bg)); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.cart-link { text-decoration: none; font-weight: 600; white-space: nowrap; color: var(--header-text); }
.badge { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: var(--on-primary); text-align: center; font-size: .8rem; }
.nav { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 10px; }
.nav a { text-decoration: none; color: var(--header-text); white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a.active, .nav a:hover { border-color: var(--primary); }

.main { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
.flash { background: #ecfdf5; border: 1px solid #a7f3d0; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.hero { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #000)); color: var(--on-primary); border-radius: var(--radius); padding: 48px 32px; }
.hero h1 { margin: 0 0 .3em; }
.hero p { font-size: 1.1rem; max-width: 640px; margin: 0; opacity: .95; }
.breadcrumbs { font-size: .9rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-image img, .placeholder { aspect-ratio: var(--card-ratio); object-fit: cover; width: 100%; }
.placeholder { background: repeating-linear-gradient(45deg, var(--bg-soft), var(--bg-soft) 10px, #f3f4f6 10px, #f3f4f6 20px); }
.placeholder.large { border-radius: var(--radius); }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1rem; margin: 0; }
.card-body h3 a { color: var(--text); text-decoration: none; }
.price { font-weight: 700; font-size: 1.1rem; }
.price.big { font-size: 1.8rem; }
.bundle-contents { margin: .75rem 0; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 8px; }
.bundle-contents ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.bundle-saving { margin-top: .5rem; font-weight: 600; color: #067647; }
.sale-countdown { display: inline-block; margin: .5rem 0; padding: .35rem .75rem; border-radius: 6px; background: #fdecea; color: #b42318; font-size: .95rem; }
.sale-countdown strong { font-variant-numeric: tabular-nums; }
.price s { font-weight: 400; font-size: .85em; margin-left: 6px; }
.stock { font-size: .875rem; font-weight: 600; }
.stock.in { color: var(--success); }
.stock.out { color: var(--danger); }
.delivery-estimate { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.delivery-estimate strong, .delivery-date { color: var(--success); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; text-decoration: none; color: var(--text); }
.sort { margin: 12px 0 20px; text-align: right; }
.pager { display: flex; justify-content: center; gap: 20px; margin-top: 28px; }

.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.gallery { display: grid; gap: 12px; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--border); }
.lead { font-size: 1.1rem; color: var(--muted); }
.add-to-cart { display: grid; gap: 12px; margin: 20px 0 12px; }
.add-to-cart label { display: grid; gap: 4px; font-weight: 600; }
.qty-row { display: flex; gap: 10px; }
.qty-row input { width: 80px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; color: var(--muted); }
.meta dd { margin: 0; }
.prose { max-width: 780px; }
.description { margin-top: 40px; }

input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: inherit; }
.btn { display: inline-block; background: var(--primary); color: var(--on-primary); border: 0; padding: 12px 24px; border-radius: var(--btn-radius); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: var(--bg); color: var(--primary); border: 1px solid var(--primary); }
.link-button { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; font: inherit; }

table.cart { width: 100%; border-collapse: collapse; }
table.cart th, table.cart td { padding: 12px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.cart td.num, table.cart th.num { text-align: right; white-space: nowrap; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; flex-wrap: wrap; }
.totals { margin-left: auto; min-width: 280px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { font-size: 1.25rem; font-weight: 800; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }

.checkout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.checkout fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0 0 18px; }
.checkout legend { font-weight: 700; padding: 0 6px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields label { display: grid; gap: 4px; font-size: .9rem; }
.fields .full { grid-column: 1 / -1; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--bg)); }
.option .grow { flex: 1; }
.summary { position: sticky; top: 90px; background: var(--bg-soft); border-radius: var(--radius); padding: 20px; }
.box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.qr { max-width: 220px; }

.site-footer { border-top: 1px solid var(--border); background: var(--footer-bg); color: var(--footer-text); padding: 32px 0; font-size: .95rem; }
.site-footer a { color: var(--footer-text); }
.site-footer .muted { color: color-mix(in srgb, var(--footer-text) 65%, var(--footer-bg)); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.cookie-bar { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 560px; margin: 0 auto; background: #111827; color: #fff; padding: 14px 18px; border-radius: var(--radius); display: flex; gap: 16px; align-items: center; justify-content: space-between; z-index: 20; }
.cookie-bar[hidden] { display: none; }
.cookie-bar button { background: #fff; color: #111827; border: 0; border-radius: 6px; padding: 8px 14px; font-weight: 700; cursor: pointer; }

@media (max-width: 800px) {
    .header-row { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
    .search { order: 3; flex-basis: 100%; }
    .product, .checkout { grid-template-columns: 1fr; }
    .fields { grid-template-columns: 1fr; }
    .summary { position: static; }
}
@media (max-width: 560px) {
    .header-row { gap: 12px; }
    .brand { font-size: 1.1rem; margin-right: auto; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card-body { padding: 10px; }
    .card h3 { font-size: .95rem; }
}

/* Pickup point picker modal (Balíkovna iframe) */
.picker-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.picker-modal[hidden] { display: none; }
.picker-dialog { position: relative; background: var(--bg); border-radius: var(--radius); width: min(1000px, 100%); height: min(720px, 90vh); overflow: hidden; }
.picker-dialog iframe { width: 100%; height: 100%; border: 0; }
.picker-close { position: absolute; top: 8px; right: 12px; z-index: 2; background: #fff; border: 1px solid var(--border); border-radius: 50%; width: 36px; height: 36px; font-size: 1.4rem; cursor: pointer; }

/* Customer accounts */
.auth-box { max-width: 440px; margin: 20px auto; }
.fields.one { grid-template-columns: 1fr; }
.check { display: flex !important; gap: 8px; align-items: flex-start; grid-template-columns: none !important; }
.account-link { text-decoration: none; font-weight: 600; white-space: nowrap; color: var(--header-text); }
.account-head { display: flex; justify-content: space-between; align-items: center; }

/* Listing with filters, labels, parameters */
.listing { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.listing-main { min-width: 0; }
.listing:not(:has(.filters)) { grid-template-columns: 1fr; }
.filters { position: sticky; top: 90px; font-size: .95rem; }
.filter-group { border-bottom: 1px solid var(--border); padding: 10px 0; }
.filter-group summary { font-weight: 700; cursor: pointer; margin-bottom: 6px; }
.filter-group .check { padding: 3px 0; }
.price-range { display: flex; gap: 6px; align-items: center; }
.price-range input { width: 90px; }
.card-image { position: relative; display: block; }
.labels { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; }
.labels.inline { position: static; margin-bottom: 8px; }
.label-badge { color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
table.params { border-collapse: collapse; width: 100%; max-width: 640px; }
table.params th, table.params td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.params th { width: 40%; color: var(--muted); font-weight: 600; }
@media (max-width: 800px) { .listing { grid-template-columns: 1fr; } .filters { position: static; } }
.coupon-box { margin-top: 18px; max-width: 420px; }

/* Reviews, stock alerts */
.stars { color: #f59e0b; letter-spacing: 1px; } .stars .off { color: #d1d5db; }
.rating-summary { display: inline-block; margin-top: 8px; text-decoration: none; color: var(--text); }
.review { border-bottom: 1px solid var(--border); padding: 12px 0; }
.review p { margin: 6px 0 0; }
.review-reply { background: var(--bg-soft); padding: 8px 12px; border-radius: 8px; }
.stock-alert { margin-top: 12px; } .stock-alert summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.stock-alert form { margin-top: 8px; flex-wrap: wrap; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cookie-bar { flex-wrap: wrap; max-width: 720px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-bar button.secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.cookie-options { display: grid; gap: 4px; margin: 8px 0; }

/* Content: banners, announcement, blog */
.announcement { color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; font-size: .95rem; }
.announcement a { color: #fff; }
.hero-banner { background-size: cover; background-position: center; min-height: 320px; display: flex; flex-direction: column; justify-content: center; }
.btn-light { background: #fff; color: var(--primary); }
.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.promo { display: flex; flex-direction: column; justify-content: flex-end; min-height: 160px; padding: 18px; border-radius: var(--radius); background: var(--bg-soft) center/cover; color: #fff; text-decoration: none; background-color: color-mix(in srgb, var(--primary) 80%, #000); }
.promo strong { font-size: 1.2rem; } .promo span { opacity: .9; }
.article-image { border-radius: var(--radius); margin: 16px 0; width: 100%; }

/* Search suggestions */
.search { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-width: 520px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.12); z-index: 30; overflow: hidden; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text); text-decoration: none; }
.suggest a:hover { background: var(--bg-soft); }
.suggest img, .suggest .ph { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); flex: none; }
.suggest a span { flex: 1; } .suggest strong { white-space: nowrap; }
.suggest .suggest-cat { font-weight: 600; color: var(--primary); }
.free-shipping { background: color-mix(in srgb, var(--primary) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--bg)); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }

/* Gallery lightbox */
.gallery-item { display: block; cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 60; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 16px; right: 20px; background: #fff; border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 1.5rem; cursor: pointer; }

/* Benefits bar, contact, HTML sitemap */
.benefits { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 18px 0; margin-top: 40px; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.benefit { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.benefit span { color: var(--primary, #1966ff); font-size: 1.2rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.sitemap-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
@media (max-width: 760px) { .contact-grid, .sitemap-grid { grid-template-columns: 1fr; } }
.brand-head { display: flex; align-items: center; gap: 18px; }
.brand-logo { max-height: 60px; width: auto; object-fit: contain; }
.favorite-form { margin: 8px 0; }
.btn-link { background: none; border: 0; padding: 0; color: var(--primary, #1966ff); cursor: pointer; font: inherit; }
.favorite-toggle[aria-pressed="true"] { color: #e11d48; }
.category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.category-tile { display: block; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; text-decoration: none; color: inherit; }
.category-tile:hover { border-color: var(--primary, #1966ff); color: var(--primary, #1966ff); }
.home-text { margin: 32px 0; }
.video { position: relative; aspect-ratio: 16 / 9; max-width: 800px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.newsletter { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid rgba(127,127,127,.25); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.newsletter-form input[type=email] { flex: 1 1 220px; max-width: 320px; }
.newsletter-form label { flex-basis: 100%; display: flex; gap: 6px; align-items: flex-start; }
.filters-summary { display: none; }
@media (max-width: 800px) {
    .filters-summary { display: block; cursor: pointer; font-weight: 700; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; }
    .filters-toggle[open] .filters-summary { margin-bottom: 10px; }
}
@media (min-width: 801px) { .filters-toggle > summary { display: none; } }

/* Cart: product rows as a grid, cards on phones (no horizontal table scrolling). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-block { display: block; width: 100%; margin-top: 12px; text-align: center; }
.cart-lines { border-top: 1px solid var(--border); }
.cart-line { display: grid; grid-template-columns: 72px 1fr 90px 120px 36px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-thumb img { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: var(--bg-soft); display: block; }
.cart-qty input { width: 80px; }
.cart-total { text-align: right; font-weight: 700; white-space: nowrap; }
.cart-remove { background: none; border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--muted); }
.cart-remove:hover { color: var(--danger); border-color: var(--danger); }
.cart-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 18px; align-items: flex-start; }
.cart-actions .totals { min-width: 280px; }
.cart-trust { text-align: center; margin: 8px 0 0; }
.coupon-box summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.free-shipping .meter { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--primary) 18%, #fff); margin-top: 8px; overflow: hidden; }
.free-shipping .meter span { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }
.field-error { display: block; color: var(--danger); font-size: .85rem; margin-top: 4px; }
[aria-invalid=true] { border-color: var(--danger) !important; }
@media (max-width: 640px) {
    .cart-line { grid-template-columns: 64px 1fr 36px; grid-template-areas: "thumb name remove" "thumb qty total"; row-gap: 8px; }
    .cart-thumb { grid-area: thumb; align-self: start; } .cart-thumb img { width: 64px; height: 64px; }
    .cart-name { grid-area: name; } .cart-remove { grid-area: remove; align-self: start; }
    .cart-qty { grid-area: qty; } .cart-total { grid-area: total; }
    .cart-actions .totals { min-width: 0; width: 100%; }
}
.social-login { display: grid; gap: .5rem; margin: 1rem 0; }
.social-login .btn { width: 100%; text-align: center; }
.social-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; }
.social-divider::before, .social-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
/* Layout variants (App\Themes\ThemeStyle, classes on <body>) */
.header-centered .header-row { display: grid; grid-template-columns: 1fr auto 1fr; }
.header-centered .brand { grid-column: 2; grid-row: 1; justify-self: center; }
.header-centered .search { grid-column: 1; grid-row: 1; }
.header-centered .header-actions { grid-column: 3; grid-row: 1; justify-self: end; }
.header-centered .nav { justify-content: center; }
.header-minimal .site-header { border-bottom-color: transparent; }
.header-minimal .header-row { min-height: 56px; }
.header-minimal .search input { max-width: 280px; }
.header-minimal .nav { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; gap: 28px; }
@media (max-width: 800px) {
    .header-centered .header-row { display: flex; }
    .header-centered .nav { justify-content: flex-start; }
}
.card-plain .card { border: 0; }
.card-plain .card-image img, .card-plain .placeholder { border-radius: var(--radius); }
.card-plain .card-body { padding: 12px 2px; }
.card-shadow .card { border: 0; box-shadow: 0 8px 30px rgba(15, 23, 42, .08); transition: transform .2s, box-shadow .2s; }
.card-shadow .card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15, 23, 42, .14); }
body.hero-full { overflow-x: clip; }
.hero-full .hero { border-radius: 0; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: max(32px, calc(50vw - 580px)); padding-right: max(32px, calc(50vw - 580px)); }
.hero-simple .hero { background: none; color: var(--text); padding: 16px 0 8px; }
.hero-simple .hero p { color: var(--muted); }
.hero-simple .hero .btn-light { background: var(--primary); color: var(--on-primary); }
.theme-preview-bar { background: #111827; color: #fff; text-align: center; font-size: .85rem; padding: 6px 12px; position: sticky; top: 0; z-index: 40; }
