/* ES standard v2 (component theme 5) — shared tokens + primitives.
   Source: dev_template/UI mockups setup/Marketplace Pro.dc.html. Every rule is scoped to
   .sf-scope[data-ct="5"]; chunk files (chrome / home / catalog / product / commerce / account)
   add their blocks. Values are the design's literal values — do not "improve" them. */

/* brand palette — the design's exact colours. Every brand colour in css/es/*.css reads these
   tokens; functions/builder/theme.php re-declares them (same selectors, printed after this
   file) from the store's Theme row when it is not the ES default, so each sub-standard
   recolours. html[data-sf-ct="5"] carries them for the Buy-now modal (outside .sf-scope).
   Rating stars stay literal gold on purpose. */
.sf-scope[data-ct="5"],
html[data-sf-ct="5"] {
    --es-blue: #2563EB;
    --es-blue-ink: #1D4ED8;
    --es-blue-soft: #EFF6FF;
    --es-blue-soft-2: #DBEAFE;
    --es-amber: #F59E0B;
    --es-amber-soft: #FEF3C7;
    --es-amber-ink: #92400E;
    --es-navy: #0F172A;
}

.sf-scope[data-ct="5"] {
    --es-font: 'Inter', 'Cairo', system-ui, sans-serif;
    --es-text: #1E293B;
    --es-text-2: #334155;
    --es-muted: #64748B;
    --es-muted-2: #94A3B8;
    --es-border: #E2E8F0;
    --es-line: #F1F5F9;
    --es-bg: #F8FAFC;
    --es-surface: #FFFFFF;
    --es-red: #DC2626;
    --es-green: #15803D;
    --es-shadow-pop: 0 16px 40px rgba(15, 23, 42, .14);
    --es-wrap: min(1320px, calc(100% - 32px));
    font-family: var(--es-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--es-text);
    background: var(--es-bg);
    -webkit-font-smoothing: antialiased;
}
.sf-scope[data-ct="5"] *,
.sf-scope[data-ct="5"] *::before,
.sf-scope[data-ct="5"] *::after { box-sizing: border-box; }
.sf-scope[data-ct="5"] a { color: inherit; text-decoration: none; }
.sf-scope[data-ct="5"] a:hover { color: var(--es-blue); }
.sf-scope[data-ct="5"] :focus-visible { outline: 2px solid var(--es-blue); outline-offset: 2px; }
.sf-scope[data-ct="5"] button,
.sf-scope[data-ct="5"] input,
.sf-scope[data-ct="5"] select,
.sf-scope[data-ct="5"] textarea { font-family: inherit; font-size: inherit; color: inherit; }
.sf-scope[data-ct="5"] img,
.sf-scope[data-ct="5"] svg { display: block; max-width: 100%; }
.sf-scope[data-ct="5"] h1,
.sf-scope[data-ct="5"] h2,
.sf-scope[data-ct="5"] h3,
.sf-scope[data-ct="5"] p,
.sf-scope[data-ct="5"] ul,
.sf-scope[data-ct="5"] ol { margin: 0; }
.sf-scope[data-ct="5"] ul,
.sf-scope[data-ct="5"] ol { padding: 0; list-style: none; }
@media (prefers-reduced-motion: reduce) {
    .sf-scope[data-ct="5"] * { transition: none !important; }
}

/* page frame — the design's <main> is a flex column with gap clamp(44px,5cqi,72px),
   20px under the header; the footer pulls clamp(56px,6cqi,96px) above itself. Our page
   is a flat list of .sf-part blocks inside .sf-scope, so the scope IS the column. */
.sf-scope[data-ct="5"] { --es-main-gap: clamp(44px, 5vw, 72px); display: flex; flex-direction: column; gap: var(--es-main-gap); container-type: inline-size; min-height: 100vh; }
.sf-scope[data-ct="5"] > .sf-part.sf-part { margin: 0; padding: 0; min-width: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.sf-scope[data-ct="5"] > .sf-part:has(> .es-header) { margin-block-end: calc(20px - var(--es-main-gap)); position: relative; z-index: 30; }
/* the footer block carries the design's own margin-top (clamp(56px,6cqi,96px)); cancel the column gap */
.sf-scope[data-ct="5"] > .sf-part:has(> .es-footer) { margin-block-start: calc(-1 * var(--es-main-gap)); }
.sf-scope[data-ct="5"] > .sf-part:has(> .es-bottombar__pad),
.sf-scope[data-ct="5"] > .sf-part:has(> .es-bottombar) { margin-block-start: calc(-1 * var(--es-main-gap)); }
/* A block whose only child is hidden (e.g. "Recently viewed" with nothing viewed yet) must not
   leave an empty gap in the column. */
.sf-scope[data-ct="5"] > .sf-part:has(> [hidden]:only-child) { display: none; }
.sf-scope[data-ct="5"] .es-wrap { width: var(--es-wrap); margin-inline: auto; }
/* The design's <main> constrains every home section to the 1320px column; here each section
   is its own block, so the block roots take that width themselves (chrome stays full-bleed,
   the listing / product / commerce / account roots carry their own .es-wrap). */
.sf-scope[data-ct="5"] > .sf-part > .es-sect,
.sf-scope[data-ct="5"] > .sf-part > .es-hero,
.sf-scope[data-ct="5"] > .sf-part > .es-promos,
.sf-scope[data-ct="5"] > .sf-part > .es-camps,
.sf-scope[data-ct="5"] > .sf-part > .es-recent { width: var(--es-wrap); margin-inline: auto; }
.sf-scope[data-ct="5"] .es-main { display: flex; flex-direction: column; gap: var(--es-main-gap); }
.sf-scope[data-ct="5"] .es-tnum { font-variant-numeric: tabular-nums; }
.sf-scope[data-ct="5"] .es-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* surfaces */
.sf-scope[data-ct="5"] .es-panel { background: var(--es-surface); border: 1px solid var(--es-border); border-radius: 20px; }
.sf-scope[data-ct="5"] .es-pop { background: var(--es-surface); border: 1px solid var(--es-border); border-radius: 16px; box-shadow: var(--es-shadow-pop); }

/* buttons (the design's four looks) */
.sf-scope[data-ct="5"] .es-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.sf-scope[data-ct="5"] .es-btn--primary { background: var(--es-blue); color: #fff; }
.sf-scope[data-ct="5"] .es-btn--primary:hover { background: var(--es-blue-ink); color: #fff; }
.sf-scope[data-ct="5"] .es-btn--dark { background: var(--es-navy); color: #fff; }
.sf-scope[data-ct="5"] .es-btn--dark:hover { background: #1E293B; color: #fff; }
.sf-scope[data-ct="5"] .es-btn--soft { background: var(--es-blue-soft); color: var(--es-blue-ink); }
.sf-scope[data-ct="5"] .es-btn--soft:hover { background: var(--es-blue-soft-2); color: var(--es-blue-ink); }
.sf-scope[data-ct="5"] .es-btn--ghost { background: var(--es-surface); color: var(--es-text); border: 1px solid var(--es-border); }
.sf-scope[data-ct="5"] .es-btn--ghost:hover { background: var(--es-line); color: var(--es-text); }
.sf-scope[data-ct="5"] .es-btn--amber { background: var(--es-amber); color: var(--es-navy); }
.sf-scope[data-ct="5"] .es-btn[disabled],
.sf-scope[data-ct="5"] .es-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.sf-scope[data-ct="5"] .es-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--es-border); border-radius: 999px; background: var(--es-surface); color: var(--es-text); cursor: pointer; }

/* fields */
.sf-scope[data-ct="5"] .es-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sf-scope[data-ct="5"] .es-label { font-size: 13px; font-weight: 600; color: var(--es-text-2); }
.sf-scope[data-ct="5"] .es-input,
.sf-scope[data-ct="5"] .es-select,
.sf-scope[data-ct="5"] .es-textarea { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--es-border); border-radius: 12px; background: var(--es-surface); font-size: 14px; color: var(--es-text); }
.sf-scope[data-ct="5"] .es-textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
.sf-scope[data-ct="5"] .es-input:focus,
.sf-scope[data-ct="5"] .es-select:focus,
.sf-scope[data-ct="5"] .es-textarea:focus { outline: none; border-color: var(--es-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--es-blue) 15%, transparent); }
.sf-scope[data-ct="5"] .es-input.is-invalid,
.sf-scope[data-ct="5"] .es-select.is-invalid { border-color: var(--es-red); }
.sf-scope[data-ct="5"] .es-error { font-size: 12px; color: var(--es-red); }
.sf-scope[data-ct="5"] .es-help { font-size: 12px; color: var(--es-muted); }

/* text */
.sf-scope[data-ct="5"] .es-h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--es-navy); }
.sf-scope[data-ct="5"] .es-h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: var(--es-text); }
.sf-scope[data-ct="5"] .es-h3 { font-size: 16px; font-weight: 700; color: var(--es-navy); }
.sf-scope[data-ct="5"] .es-muted { color: var(--es-muted); }
.sf-scope[data-ct="5"] .es-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; }
.sf-scope[data-ct="5"] .es-badge--sale { background: var(--es-red); color: #fff; }
.sf-scope[data-ct="5"] .es-badge--new { background: var(--es-blue); color: #fff; }
.sf-scope[data-ct="5"] .es-badge--best { background: var(--es-amber); color: var(--es-navy); }
.sf-scope[data-ct="5"] .es-badge--soft { background: var(--es-blue-soft); color: var(--es-blue-ink); }

/* breadcrumb (listing + product) */
.sf-scope[data-ct="5"] .es-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--es-muted); }
.sf-scope[data-ct="5"] .es-crumbs a { color: var(--es-muted); }
.sf-scope[data-ct="5"] .es-crumbs a:hover { color: var(--es-blue); }
.sf-scope[data-ct="5"] .es-crumbs [aria-current] { color: var(--es-text); }
