/* Seller blocks: shared by public pages, previews and the editor canvas.
   Container queries (not media queries) drive the breakpoints, so the editor's device frames
   behave exactly like real devices. Desktop is the base; tablet and mobile fall back to it. */
.sb-page { container: sb / inline-size; display: flex; flex-wrap: wrap; align-items: flex-start; width: 100%; max-width: 1240px; margin: 0 auto; color: #172B24; font-size: 16px; line-height: 1.5; box-sizing: border-box; }
.sb-page *, .sb-page *::before, .sb-page *::after { box-sizing: border-box; }
.sb-col { display: flex; flex-wrap: wrap; align-content: flex-start; min-width: 0; }

.sb-block {
    --sb-w: var(--sb-width-d, 100%);
    --sb-p: var(--sb-padding-d, 12px);
    --sb-f: var(--sb-font-d, inherit);
    --sb-a: var(--sb-align-d, left);
    --sb-h: var(--sb-height-d, auto);
    flex: 0 0 var(--sb-w);
    width: var(--sb-w);
    max-width: 100%;
    min-width: 0;
    padding: var(--sb-p);
    font-size: var(--sb-f);
    text-align: var(--sb-a);
    color: var(--sb-fg, inherit);
    background: var(--sb-bg, transparent);
    border-radius: var(--sb-radius, 0);
}

.sb-heading { margin: 0; font-size: 1.75em; font-weight: 800; line-height: 1.2; color: inherit; }
h3.sb-heading { font-size: 1.4em; }
h4.sb-heading { font-size: 1.15em; }
.sb-text { margin: 0; color: inherit; overflow-wrap: anywhere; }
.sb-title { margin: 0 0 14px; font-size: 1.35em; font-weight: 800; color: inherit; line-height: 1.25; }
.sb-image img { display: inline-block; max-width: 100%; height: var(--sb-h); object-fit: cover; border-radius: var(--sb-radius, 12px); vertical-align: top; }
.sb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 999px; background: #08783E; color: #fff !important; font-weight: 700; text-decoration: none; }
.sb-t-button .sb-btn { background: var(--sb-bg, #08783E); color: var(--sb-fg, #fff) !important; border-radius: var(--sb-radius, 999px); font-size: inherit; }
.sb-t-button { background: transparent; color: inherit; }
.sb-btn:hover { filter: brightness(.92); }
.sb-btn:focus-visible, .sb-card:focus-visible, .sb-cat:focus-visible, .sb-arrow:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.sb-icon { color: var(--sb-fg, #08783E); }
.sb-icon svg { width: 1em; height: 1em; font-size: 2.5em; }
.sb-divider { border: 0; border-top: 1px solid var(--sb-fg, #E2E8F0); margin: 0; }
.sb-spacer { height: var(--sb-h, 32px); }
.sb-t-spacer { padding: 0; }
.sb-t-spacer .sb-spacer { min-height: 8px; }
.sb-hint { display: flex; align-items: center; gap: 10px; padding: 18px; border: 1px dashed #94A3B8; border-radius: 10px; background: #F8FAFC; color: #475569; font-size: 14px; text-align: left; }
.sb-hint svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* Banners */
.sb-t-banner_full, .sb-t-banner_image, .sb-t-banner_promo, .sb-t-banner_text_image, .sb-t-ad_banner, .sb-t-offer, .sb-t-festival, .sb-t-banner_carousel { padding: var(--sb-p, 12px); background: transparent; }
.sb-banner { position: relative; display: flex; align-items: center; min-height: var(--sb-h, 220px); overflow: hidden; border-radius: var(--sb-radius, 16px); background: var(--sb-bg, #0F5132); color: var(--sb-fg, #fff); }
.sb-banner-media { position: absolute; inset: 0; }
.sb-banner-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-banner.has-media .sb-banner-copy { background: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,.05)); color: #fff; align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; width: 100%; }
.sb-banner-copy { position: relative; padding: 28px 32px; width: 100%; }
.sb-banner-copy h2 { margin: 0 0 8px; font-size: 1.9em; font-weight: 800; line-height: 1.2; color: inherit; }
.sb-banner-copy p { margin: 0 0 14px; color: inherit; }
.sb-banner-image { background: var(--sb-bg, #F1F5F9); }
.sb-banner-promo { background: var(--sb-bg, #FFF8E7); color: var(--sb-fg, #172B24); }
.sb-banner-festival { background: var(--sb-bg, #7B1E5A); color: var(--sb-fg, #fff); }
.sb-banner-ad { background: var(--sb-bg, #EAF7EE); color: var(--sb-fg, #172B24); }
.sb-banner-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--sb-bg, #EAF7EE); color: var(--sb-fg, #172B24); }
.sb-banner-split .sb-banner-media { position: relative; inset: auto; min-height: 220px; height: 100%; }
.sb-banner-split.has-media .sb-banner-copy { background: none; color: inherit; }
.sb-ad-tag { display: inline-block; margin-bottom: 6px; padding: 1px 8px; border-radius: 6px; background: rgba(15, 23, 42, .75); color: #fff; font-size: 11px; font-weight: 700; }

/* Banner images never stretch: cover crops, contain letterboxes, and an image alone keeps its shape. */
.sb-banner.has-media { min-height: 220px; }
.sb-banner.has-height { min-height: var(--sb-h, 220px); height: var(--sb-h, auto); }
.sb-fit-contain .sb-banner-media img { object-fit: contain; }
.sb-pos-left .sb-banner-media img { object-position: left center; }
.sb-pos-right .sb-banner-media img { object-position: right center; }
.sb-banner.sb-image-only:not(.has-height) { display: block; min-height: 0; background: transparent; }
.sb-image-only:not(.has-height) .sb-banner-media { position: relative; inset: auto; min-height: 0; }
.sb-image-only:not(.has-height) .sb-banner-media img { height: auto; }
.sb-banner-split.sb-image-only { display: block; }
.sb-banner-split.sb-image-only .sb-banner-media { height: 100%; }
.sb-banner-link { position: absolute; inset: 0; z-index: 1; }
.sb-clickable .sb-btn::after { content: ""; position: absolute; inset: 0; }
.sb-banner-link:focus-visible { outline: 3px solid #1d4ed8; outline-offset: -3px; }

/* Scrollers */
.sb-scroller { position: relative; }
.sb-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; }
.sb-track::-webkit-scrollbar { display: none; }
.sb-track > * { scroll-snap-align: start; flex: 0 0 auto; }
.sb-slide { flex-basis: 100% !important; min-width: 0; }
.sb-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #CBD5E1; background: #fff; color: #08783E; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.sb-arrow svg { width: 20px; height: 20px; }
.sb-prev { left: 4px; }
.sb-next { right: 4px; }
.sb-scroller.is-static .sb-arrow { display: none; }

/* Products */
.sb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sb-col .sb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sb-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #E2E8F0; border-radius: 14px; background: #fff; color: #172B24; text-decoration: none; min-width: 0; text-align: left; }
.sb-card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .1); }
.sb-card > .sb-ad-tag { position: absolute; top: 14px; left: 14px; z-index: 1; margin: 0; }
.sb-card-img { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #F1F5F9; }
.sb-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sb-card-name { font-weight: 700; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-card-rating { font-size: 12px; color: #92400E; }
.sb-card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 15px; }
.sb-card-price s { color: #64748B; font-size: 12px; }
.sb-product-carousel .sb-card { flex-basis: 220px; }

/* Categories */
.sb-cats { display: grid; gap: 12px; }
.sb-cats-cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sb-cats-grid, .sb-cats-boxes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sb-cat { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: #FFF8E7; color: #172B24; text-decoration: none; font-weight: 600; min-height: 60px; }
.sb-cat:hover { color: #08783E; box-shadow: 0 0 0 2px #B7A726 inset; }
.sb-cat-visual { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; overflow: hidden; background: #EEF5E0; color: #08783E; }
.sb-cat-visual img { width: 100%; height: 100%; object-fit: cover; }
.sb-cat-visual svg { width: 22px; height: 22px; }
.sb-cats-grid .sb-cat, .sb-cats-boxes .sb-cat { flex-direction: column; text-align: center; padding: 14px; }
.sb-cats-boxes .sb-cat-visual { width: 100%; height: auto; flex: none; aspect-ratio: 4 / 3; border-radius: 12px; }
.sb-cats-grid .sb-cat-visual { width: 64px; height: 64px; flex: none; }
.sb-cat-nav .sb-track { padding-inline: 2px; }
.sb-cat-nav .sb-arrow { width: 34px; height: 34px; }
.sb-featured-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.sb-featured-head .sb-title { margin-bottom: 4px; }
.sb-view-all { color: #08783E; font-weight: 700; white-space: nowrap; }

/* Store */
.sb-store-intro { display: flex; gap: 16px; align-items: center; }
.sb-store-logo { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 2px solid #E2E8F0; background: #fff; }
.sb-store-logo img { width: 100%; height: 100%; object-fit: contain; }
.sb-info ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.sb-info li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sb-info li svg { width: 18px; height: 18px; color: #08783E; flex: 0 0 auto; }
.sb-info li strong { font-weight: 700; }
.sb-info a:not(.sb-btn) { color: #08783E; overflow-wrap: anywhere; }
.sb-icon-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.sb-icon-item { display: flex; gap: 12px; align-items: flex-start; text-align: left; }
.sb-icon-item strong, .sb-icon-item span { display: block; }
.sb-icon-item div span { font-size: .875em; opacity: .85; }
.sb-icon-badge { flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 50%; background: #EAF7EE; color: #08783E; }
.sb-icon-badge svg { width: 22px; height: 22px; }

/* Marketing and layout */
.sb-coupon { padding: 18px; border: 2px dashed #08783E; border-radius: var(--sb-radius, 14px); }
.sb-coupon h3 { margin: 0 0 10px; font-size: 1.1em; color: inherit; }
.sb-coupon p { margin: 10px 0 0; font-size: .85em; }
.sb-coupon-code { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid #08783E; border-radius: 10px; background: #EAF7EE; color: #06612F; font-weight: 800; letter-spacing: .06em; cursor: pointer; }
.sb-coupon-code svg { width: 16px; height: 16px; }
.sb-cols { display: grid; gap: 12px; }
.sb-cols-1 { grid-template-columns: minmax(0, 1fr); }
.sb-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sb-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sb-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.sb-gallery-item { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #F1F5F9; }
.sb-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--sb-radius, 12px); overflow: hidden; background: #0F172A; }
.sb-video iframe, .sb-video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }

/* Breakpoints come after the base block rules: equal specificity, so the later rule wins. */
@container sb (max-width: 1023px) {
    .sb-block {
        --sb-w: var(--sb-width-t, var(--sb-width-d, 100%));
        --sb-p: var(--sb-padding-t, var(--sb-padding-d, 12px));
        --sb-f: var(--sb-font-t, var(--sb-font-d, inherit));
        --sb-a: var(--sb-align-t, var(--sb-align-d, left));
        --sb-h: var(--sb-height-t, var(--sb-height-d, auto));
    }
    .sb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sb-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container sb (max-width: 640px) {
    .sb-block {
        /* A phone is single-column unless the seller set a mobile width on purpose. */
        --sb-w: var(--sb-width-m, 100%);
        --sb-p: var(--sb-padding-m, var(--sb-padding-t, var(--sb-padding-d, 10px)));
        --sb-f: var(--sb-font-m, var(--sb-font-t, var(--sb-font-d, inherit)));
        --sb-a: var(--sb-align-m, var(--sb-align-t, var(--sb-align-d, left)));
        --sb-h: var(--sb-height-m, var(--sb-height-t, var(--sb-height-d, auto)));
    }
    .sb-hide-m { display: none !important; }
    .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .sb-cols, .sb-cols-2, .sb-cols-3, .sb-cols-4 { grid-template-columns: minmax(0, 1fr); }
    .sb-banner-split { grid-template-columns: minmax(0, 1fr); }
    .sb-title { font-size: 1.15em; }
    .sb-banner-copy { padding: 18px; }
    .sb-banner-copy h2 { font-size: 1.3em; }
    .sb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sb-cats-grid, .sb-cats-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sb-store-intro { flex-direction: column; align-items: flex-start; }
    .sb-product-carousel .sb-card { flex-basis: 46%; }
    .sb-arrow { display: none; }
}
@container sb (min-width: 641px) and (max-width: 1023px) { .sb-hide-t { display: none !important; } }
@container sb (min-width: 1024px) { .sb-hide-d { display: none !important; } }

/* Store category navigation */
.ssn-wrap { display: flex; align-items: center; gap: 10px; max-width: 1240px; margin: 14px auto 0; }
.ssn-track { display: flex; gap: 12px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 3px; }
.ssn-track::-webkit-scrollbar { display: none; }
.ssn-track .sf-nav-link, .ssn-track .sf-nav-link:hover { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; min-height: 64px; max-width: 200px; padding: 8px 16px 8px 10px; border: 2px solid transparent; border-radius: 18px; background: #FFF8E7; color: #172B24; font-size: .92rem; font-weight: 600; line-height: 1.2; white-space: normal; text-decoration: none; }
.ssn-track .sf-nav-link:hover { color: #08783E; }
.ssn-track .sf-nav-link.active { border-color: #B7A726; color: #08783E; font-weight: 800; }
.ssn-track .sf-nav-link:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 1px; }
.ssn-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; overflow: hidden; background: #EEF5E0; color: #08783E; }
.ssn-icon img { width: 100%; height: 100%; object-fit: cover; }
.ssn-icon svg { width: 24px; height: 24px; }
.ssn-arrow { flex: 0 0 40px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #CBD5E1; border-radius: 50%; background: #fff; color: #08783E; cursor: pointer; }
.ssn-arrow[disabled] { color: #94A3B8; background: #F1F5F9; cursor: default; }
.ssn-arrow svg { width: 20px; height: 20px; }
.ssn-wrap.is-static .ssn-arrow { display: none; }
@media (max-width: 640px) {
    .ssn-arrow { display: none; }
    .ssn-track .sf-nav-link, .ssn-track .sf-nav-link:hover { min-height: 54px; padding: 6px 12px 6px 8px; font-size: .85rem; }
    .ssn-icon { width: 36px; height: 36px; flex-basis: 36px; }
}

/* Category and page routes */
.scp-wrap { max-width: 1240px; margin: 0 auto; padding: 16px 24px 48px; }
.scp-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: #475569; margin: 12px 0; }
.scp-crumbs a { color: #08783E; }
.scp-head { display: flex; gap: 14px; align-items: center; margin: 8px 0 14px; }
.scp-head h1 { margin: 0; font-size: 1.6rem; font-weight: 800; color: #172B24; }
.scp-head p { margin: 4px 0 0; color: #475569; }
.scp-sub { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.scp-sub a { padding: 8px 14px; border-radius: 999px; background: #FFF8E7; color: #172B24; font-weight: 600; text-decoration: none; min-height: 40px; }
.scp-sub a:hover { color: #08783E; }
.scp-empty { padding: 40px 20px; text-align: center; color: #475569; border: 1px dashed #CBD5E1; border-radius: 14px; }
.scp-products { container: sb / inline-size; }
.scp-list .sb-grid { grid-template-columns: minmax(0, 1fr); }
.scp-list .sb-card { flex-direction: row; align-items: center; flex-wrap: wrap; }
.scp-list .sb-card-img { flex: 0 0 90px; }
.scp-list .sb-card-name { flex: 1 1 160px; }
.scp-carousel .sb-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.scp-carousel .sb-card { flex: 0 0 220px; scroll-snap-align: start; }

/* Marketplace homepage */
.shc-wrap { max-width: 1240px; margin: 0 auto; padding: 16px 16px 8px; }
.shc-title { margin: 0 0 12px; font-size: 1.35rem; font-weight: 800; color: #172B24; }
.shc-track { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 3px; scroll-snap-type: x proximity; }
.shc-track::-webkit-scrollbar { display: none; }
.shc-card { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; width: 230px; min-height: 72px; padding: 10px 14px 10px 10px; border: 2px solid transparent; border-radius: 18px; background: #FFF8E7; color: #172B24; text-decoration: none; scroll-snap-align: start; }
.shc-card:hover { border-color: #B7A726; }
.shc-card:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 1px; }
.shc-card strong { display: block; font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.shc-card small { display: block; font-size: .78rem; color: #475569; margin-top: 2px; }
.shc-section { padding: 8px 4px; }
.shc-by { display: block; padding: 0 16px 4px; font-size: .78rem; color: #475569; }
