/* Storefront (step 24, §3.14) — a clean, light shop theme of its own.
   Deliberately separate from the admin app.css: the customer website
   never wears the ERP shell. */
:root {
    --shop-accent: #2e6da4;
    --shop-accent-dark: #245a89;
    --shop-topstrip-bg: #245a89;
    --shop-footer-bg: #22303c;
    --shop-gold: #2e6da4;
    --shop-head-font: inherit;
    --shop-ink: #1d2733;
    --shop-muted: #68707a;
    --shop-line: #dde3e8;
    --shop-bg: #f7f9fa;
    --shop-good: #20713a;
    --shop-bad: #b3372c;
}
* { box-sizing: border-box; }
body.shop {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    color: var(--shop-ink);
    background: var(--shop-bg);
}
.shop-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.shop-header { background: #fff; border-bottom: 1px solid var(--shop-line); }
.shop-header .shop-wrap { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.shop-brand { font-size: 22px; font-weight: 700; color: var(--shop-ink); text-decoration: none; }
.shop-brand small { display: block; font-size: 12px; font-weight: 400; color: var(--shop-muted); }
.shop-nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.shop-nav a { color: var(--shop-ink); text-decoration: none; font-size: 14px; }
.shop-nav a:hover { color: var(--shop-accent); }
.shop-cart-link { font-weight: 600; }
.shop-flash { padding: 10px 14px; border-radius: 6px; margin: 14px 0 0; font-size: 14px; }
.shop-flash.ok { background: #e6f4ea; color: var(--shop-good); border: 1px solid #bfe3c9; }
.shop-flash.err { background: #fbeae8; color: var(--shop-bad); border: 1px solid #f2c7c2; }
.shop-hero { background: var(--shop-accent); color: #fff; border-radius: 10px; padding: 28px; margin: 20px 0; }
.shop-hero h1 { margin: 0 0 6px; font-size: 28px; }
.shop-hero p { margin: 0; opacity: .92; }
.shop-hero img { max-width: 100%; border-radius: 8px; margin-top: 14px; }
.shop-section { margin: 28px 0; }
.shop-section h2 { font-size: 20px; margin: 0 0 12px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.shop-card { background: #fff; border: 1px solid var(--shop-line); border-radius: 10px; padding: 14px; }
.shop-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; background: #eef1f3; }
.shop-card h3 { margin: 10px 0 4px; font-size: 16px; }
.shop-card h3 a { color: var(--shop-ink); text-decoration: none; }
.shop-price { font-size: 17px; font-weight: 700; }
.shop-was { color: var(--shop-muted); text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.shop-stock { font-size: 13px; color: var(--shop-good); }
.shop-stock.out { color: var(--shop-bad); }
.shop-btn {
    display: inline-block; background: var(--shop-accent); color: #fff; border: 0;
    padding: 9px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; text-decoration: none;
}
.shop-btn.secondary { background: #fff; color: var(--shop-accent); border: 1px solid var(--shop-accent); }
.shop-btn:disabled { background: #aeb9c2; cursor: not-allowed; }
.shop-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 24px 0; }
@media (max-width: 760px) { .shop-detail { grid-template-columns: 1fr; } .shop-detail > * { min-width: 0; } }
.shop-detail .gallery img { width: 100%; border-radius: 10px; margin-bottom: 10px; background: #eef1f3; }
.shop-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--shop-line); border-radius: 10px; overflow: hidden; }
.shop-table th, .shop-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--shop-line); font-size: 14px; vertical-align: top; }
.shop-table tfoot td { font-weight: 700; border-bottom: 0; }
.shop-table .num { text-align: right; }
.shop-form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.shop-form input, .shop-form select, .shop-form textarea {
    width: 100%; padding: 9px 10px; border: 1px solid var(--shop-line); border-radius: 6px; font-size: 14px; background: #fff;
}
.shop-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .shop-form .row { grid-template-columns: 1fr; } }
.shop-muted { color: var(--shop-muted); font-size: 13px; }
.shop-footer { border-top: 1px solid var(--shop-line); background: #fff; margin-top: 40px; }
.shop-footer .shop-wrap { padding-top: 18px; padding-bottom: 22px; display: flex; gap: 28px; flex-wrap: wrap; }
.shop-footer a { color: var(--shop-muted); text-decoration: none; font-size: 13px; display: block; margin: 3px 0; }
.shop-testimonial { background: #fff; border-left: 4px solid var(--shop-accent); padding: 12px 16px; border-radius: 6px; margin: 10px 0; }
.shop-faq { background: #fff; border: 1px solid var(--shop-line); border-radius: 8px; padding: 12px 16px; margin: 8px 0; }
.shop-faq strong { display: block; margin-bottom: 4px; }
.shop-offer { background: #fff8e6; border: 1px solid #ecd9a0; border-radius: 8px; padding: 10px 14px; margin: 8px 0; font-size: 14px; }
.shop-offline { text-align: center; padding: 80px 20px; }
.shop-qty { width: 90px !important; }

/* Storefront v2 (shops #038/#039): the captured shop furniture —
   top strip, search + category menu bar, pack-size buttons, the
   Description|Documents tabs, IN STOCK ribbon, four-column footer.
   Themes (layout's inline <style>) only move the variables above:
   TRAFA = crimson on white with a navy footer; OPTFORNATURE = sage
   green with gold serif accents. */
.shop-header h1, .shop-section h2, .shop-brand, .foot-brand {
    font-family: var(--shop-head-font);
}
.shop-topstrip { background: var(--shop-topstrip-bg); color: #fff; font-size: 13px; }
.shop-topstrip .strip-in { display: flex; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.shop-topstrip a { color: #fff; text-decoration: none; margin-left: 10px; }
.shop-topstrip .strip-left a { margin-left: 4px; text-decoration: underline; }
.shop-topstrip a:hover { text-decoration: underline; }
.head-in { display: flex; align-items: center; gap: 22px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.shop-logo { height: 42px; vertical-align: middle; margin-right: 10px; }
.shop-search { display: flex; gap: 0; flex: 1; min-width: 260px; max-width: 560px; }
.shop-search select { border: 1px solid var(--shop-line); border-right: 0; border-radius: 6px 0 0 6px; padding: 8px; background: #f2f5f7; font-size: 14px; }
.shop-search input { flex: 1; border: 1px solid var(--shop-line); padding: 9px 10px; font-size: 14px; min-width: 0; }
.shop-search .shop-btn { border-radius: 0 6px 6px 0; }
.shop-menubar { background: var(--shop-accent); }
.shop-menubar .menu-in { display: flex; gap: 4px; flex-wrap: wrap; align-items: stretch; }
.shop-menubar .menu-item { color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px 12px; display: inline-block; }
.shop-menubar .menu-item:hover { background: var(--shop-accent-dark); }
.shop-dropdown { position: relative; }
.shop-dropdown-panel { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--shop-line); border-radius: 0 0 8px 8px; box-shadow: 0 10px 24px rgba(0,0,0,.14); min-width: 240px; z-index: 30; padding: 6px 0; }
.shop-dropdown:hover .shop-dropdown-panel, .shop-dropdown:focus-within .shop-dropdown-panel { display: block; }
.shop-dropdown-panel a { display: block; padding: 7px 14px; color: var(--shop-ink); text-decoration: none; font-size: 14px; }
.shop-dropdown-panel a:hover { background: var(--shop-bg); color: var(--shop-accent); }
.shop-crumb { margin: 16px 0 0; font-size: 13px; color: var(--shop-muted); }
.shop-crumb a { color: var(--shop-accent); text-decoration: none; }
.shop-detail .gallery { position: relative; }
.shop-ribbon { position: absolute; top: 10px; left: 10px; background: var(--shop-good); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; letter-spacing: .04em; z-index: 2; }
.shop-label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; letter-spacing: .03em; }
.shop-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-size { border: 1px solid var(--shop-line); border-radius: 8px; padding: 8px 12px; cursor: pointer; background: #fff; display: inline-block; margin: 0 !important; font-weight: 600; }
.shop-size small { display: block; font-weight: 400; color: var(--shop-muted); font-size: 12px; }
.shop-size:has(input:checked) { border-color: var(--shop-accent); box-shadow: 0 0 0 2px var(--shop-accent) inset; color: var(--shop-accent-dark); }
.shop-size:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.shop-size input { position: absolute; opacity: 0; pointer-events: none; }
.shop-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; align-items: center; }
.shop-actions .inline-form { display: inline; }
.shop-tabs { background: #fff; border: 1px solid var(--shop-line); border-radius: 10px; padding: 0 18px 18px; }
.shop-tabbar { display: flex; gap: 4px; border-bottom: 2px solid var(--shop-line); margin: 0 -18px 14px; padding: 0 12px; }
.shop-tab { background: none; border: 0; font-size: 15px; font-weight: 600; padding: 12px 14px; cursor: pointer; color: var(--shop-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.shop-tab.active { color: var(--shop-accent-dark); border-bottom-color: var(--shop-accent); }
.cat-card h3 { margin-top: 0; }
.shop-check { font-weight: 400 !important; }
.shop-footer { background: var(--shop-footer-bg); color: #dfe5ea; border-top: 0; }
.shop-footer .foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px; padding-top: 26px; padding-bottom: 20px; }
.shop-footer strong { color: #fff; display: block; margin-bottom: 8px; }
.shop-footer .foot-brand { font-size: 18px; }
.shop-footer p { margin: 3px 0; font-size: 13px; color: #c3ccd4; }
.shop-footer a { color: #c3ccd4; display: block; margin: 4px 0; font-size: 13px; }
.shop-footer a:hover { color: #fff; }
.shop-footer .shop-form label { color: #dfe5ea; }
.shop-footer .foot-base { border-top: 1px solid rgba(255,255,255,.18); padding-top: 12px; padding-bottom: 16px; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shop-footer .foot-base a { display: inline; margin: 0; }
@media (max-width: 760px) {
    .shop-search { order: 3; flex-basis: 100%; }
    .shop-menubar .menu-item { padding: 9px 8px; font-size: 13px; }
    .shop-topstrip .strip-in { justify-content: flex-start; }
}

/* Change round 1 (2026-10-14, #003): storefront small-screen pass.
   The shop already stacks its detail/form grids at 760px (above);
   this adds the phone finish — 16px inputs (no iOS auto-zoom),
   tappable buttons/nav, a denser product grid, and cart/checkout
   tables scrolling horizontally via the shared .tbl-scroll wrapper
   (app-ui.js, included by the storefront footer). */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* #003: a grid item must be allowed to shrink below its table's
   min-width, else the whole page overflows on phones. */
.tbl-scroll { min-width: 0; }
@media (max-width: 760px) {
    .shop-header .shop-wrap { gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
    .shop-nav { margin-left: 0; gap: 8px 14px; }
    .shop-nav a { font-size: 15px; padding: 6px 0; }
    .shop-hero { padding: 20px 16px; margin: 14px 0; }
    .shop-hero h1 { font-size: 23px; }
    .shop-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
    .shop-card img { height: 110px; }
    .shop-table { min-width: 540px; }
    .shop-form input, .shop-form select, .shop-form textarea { font-size: 16px; padding: 11px 10px; }
    .shop-btn { min-height: 42px; padding: 11px 18px; font-size: 15px; }
    .shop-qty { width: 72px !important; }
    .shop-footer .shop-wrap { gap: 18px; }
    .shop-section { margin: 20px 0; }
}

/* ---- Ditto Phase B (#152) ---- */
/* Cart icon + count badge */
.shop-cart-link { display: inline-flex; align-items: center; gap: 6px; }
.cart-badge { background: var(--shop-accent); color: #fff; border-radius: 999px;
    padding: 0 7px; font-size: 12px; line-height: 20px; min-width: 20px; text-align: center; }
/* Top strip socials + currency (OptForNature) */
.shop-socials { margin-left: 12px; display: inline-flex; gap: 6px; }
.shop-socials .soc { display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor;
    font-size: 11px; text-decoration: none; }
.shop-currency { font-weight: 600; margin-right: 10px; }
/* Hero carousel */
.shop-hero-carousel { position: relative; margin: 18px 0; border-radius: 12px;
    overflow: hidden; background: var(--shop-accent); color: #fff; min-height: 220px; }
.hero-slide { display: none; position: relative; padding: 44px 34px; }
.hero-slide.active { display: block; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero-copy { position: relative; max-width: 640px; }
.hero-copy h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.25; }
.hero-cta { background: #fff; color: var(--shop-accent-dark); font-weight: 700; }
.hero-dots { position: absolute; right: 18px; bottom: 14px; display: flex; gap: 6px; }
.hero-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #fff;
    background: transparent; color: #fff; cursor: pointer; font-size: 12px; }
.hero-dot.active { background: #fff; color: var(--shop-accent-dark); font-weight: 700; }
/* Why-choose-us strip */
.why-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px; margin: 8px 0 20px; }
.why-item { display: flex; align-items: center; gap: 10px; background: #fff;
    border: 1px solid var(--shop-line); border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.why-ico { font-size: 20px; }
/* Section heads with View All */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-head h2 { margin: 0; }
/* Product cards: ribbon overlay, category line, image placeholder */
.card-media { position: relative; }
.card-ribbon { position: absolute; top: 8px; left: 8px; background: var(--shop-accent);
    color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em;
    padding: 3px 8px; border-radius: 4px; }
.card-noimg { display: flex; align-items: center; justify-content: center; height: 150px;
    background: #eef1f3; border-radius: 6px; color: #7a8794; font-size: 13px; }
.detail-noimg { height: 260px; }
.card-add { margin: 10px 0 6px; }
.card-cart { width: 100%; text-align: center; }
a.card-cart { display: block; margin: 10px 0 6px; text-decoration: none; }
.card-cat { color: var(--shop-muted, #667); font-size: 13px; margin: 4px 0 0; }
.cat-img img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; background: #eef1f3; }
/* Pagination bar */
.shop-pager { display: flex; justify-content: space-between; align-items: center;
    gap: 14px; flex-wrap: wrap; margin: 16px 0; font-size: 14px; }
.pager-links { display: inline-flex; gap: 12px; align-items: center; }
.pager-links a { font-weight: 600; }
/* Footer payment modes + standards badges + contact map + auth tabs */
.pay-modes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding-top: 6px; padding-bottom: 14px; }
.pay-modes-label { font-weight: 700; font-size: 13px; letter-spacing: .04em; margin-right: 6px; }
.pay-chip { border: 1px solid rgba(255,255,255,.45); border-radius: 4px;
    padding: 3px 9px; font-size: 12px; font-weight: 600; }
.standards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin: 14px 0; }
.std-badge { border: 2px solid var(--shop-accent); color: var(--shop-accent-dark);
    border-radius: 10px; padding: 16px 12px; text-align: center; font-weight: 700; }
.contact-map { width: 100%; max-width: 560px; height: 280px; border: 0; border-radius: 8px; margin-top: 14px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab { border: 1px solid var(--shop-line); background: #fff; border-radius: 6px;
    padding: 8px 18px; font-weight: 700; cursor: pointer; color: var(--shop-ink); }
.auth-tab.active { background: var(--shop-accent); border-color: var(--shop-accent); color: #fff; }
.sitemap-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.about-summary .about-body { max-height: 190px; overflow: hidden; position: relative; }
.pay-summary td.num, .pay-summary td { text-align: right; }
.pay-summary td:first-child { text-align: left; }

/* #216 (Shops ditto Phase B): lifted-asset furniture — the CP
   no-image placeholder as a real picture, the payment-brands strip
   image, dropdown group labels (OFN Quick Shop / Our Categories),
   footer follow row, and the OFN benefit-card excerpt clamp. */
.card-noimg-img { display: block; width: 100%; height: 150px; object-fit: cover;
                  border-radius: 6px; background: #eef1f3; }
.card-media .card-noimg-img { border-radius: 0; }
.detail-noimg { height: 300px; }
.pay-modes-img { height: 35px; width: auto; border-radius: 3px; background: #fff; }
.shop-dropdown-panel .dd-label { display: block; padding: 8px 14px 2px; font-size: 11px;
                  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.foot-follow { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.foot-follow .shop-socials { margin-left: 4px; }
.benefit-excerpt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
