body {
  min-height: max(884px, 100dvh);
}

/* Core utility — used throughout for JS show/hide */
.hidden {
    display: none !important;
}

/* Fluid product grid — columns are DYNAMIC, derived from the viewport and each
   template's natural card size (--ps-card-min), never a hardcoded count or
   breakpoint. min(...,100%) prevents overflow on very narrow phones. Used by the
   storefront templates' browse grid + category rows. */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(var(--ps-card-min, 160px), 100%), 1fr));
    gap: var(--ps-grid-gap, 10px);
}

/* Category rows adapt to the device — NO fixed counts:
   • phone/tablet (<1024px): a compact horizontal swipe-strip (few items just sit
     in a scrollable rail; the page stays short and Browse remains the full grid).
   • desktop (>=1024px): a row-FILLING grid inside the centered page, so a 4-item
     category fills its row with no empty gap and no giant stretched cards. */
.ps-rail,
.ps-cat-row {
    display: flex;
    gap: var(--ps-grid-gap, 14px);
    overflow-x: auto;
    /* No scroll-snap: it fights the continuous auto-scroll (snaps scrollLeft back to
       a card edge). Manual swipe/arrows still scroll freely. */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;          /* Firefox — no scrollbar under the carousel */
    -ms-overflow-style: none;       /* old Edge */
}
.ps-rail::-webkit-scrollbar,
.ps-cat-row::-webkit-scrollbar { display: none; height: 0; }   /* Chrome/Safari */
/* CONSISTENT card width at every viewport (Amazon-style carousel) — all category
   rows show the same size cards; few-item rows just scroll. ~210px on desktop. */
.ps-rail > *,
.ps-cat-row > * {
    /* Per-template card size: each template sets --ps-card-min to its brand's card
       width (a clamp that gives ~2 visible on mobile and the brand size on desktop).
       Falls back to a neutral size if a template doesn't define one. */
    flex: 0 0 var(--ps-card-min, clamp(160px, 46vw, 210px));
}

/* Center the storefront page on wide screens (Amazon-style) so content doesn't
   sprawl edge-to-edge with oversized cards. Header bar stays full-width; its inner
   content + the page body align to the same max width. Storefront only (.ps-page). */
@media (min-width: 1024px) {
    .ps-page main { max-width: 1500px; margin-inline: auto; }
    .ps-page #site-header > div:first-child,
    .ps-page #hdr-nav-cats { max-width: 1500px; margin-inline: auto; }
}

:root {
    --primary: #131921;
    --secondary: #232f3e;
    --accent: #febd69;
    --surface: #f3f4f6;
    --surf: #f3f4f6;
    --card-bg: #ffffff;
    --card: #ffffff;

    /* Brand theme variables — overridden per-tenant by applyTheme() in tenant.js.
       These defaults match the PRIMARY/Amazon-style palette so every page looks
       correct even before brand_theme loads or when brand_theme is null. */
    --bp: #131921;
    --bpt: #ffffff;
    --bs: #232f3e;
    --bst: #ffffff;
    --ba: #febd69;
    --bat: #111827;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--surface);
    color: #111827;
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.bento-item-large {
    grid-column: span 2;
}
.amazon-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.pb-20 {
    padding-bottom: 5rem;
}
.bg-primary-custom {
    background-color: var(--primary);
}
.bg-secondary-custom {
    background-color: var(--secondary);
}
.bg-accent {
    background-color: var(--accent);
}
.text-accent {
    color: var(--accent);
}
.border-accent {
    border-color: var(--accent);
}
.text-primary-custom {
    color: var(--primary);
}
.min-w-70 {
    min-width: 4.375rem;
}
.w-16 {
    width: 4rem;
}
.h-16 {
    height: 4rem;
}
.h-32 {
    height: 8rem;
}
.h-24 {
    height: 6rem;
}
.h-28 {
    height: 7rem;
}
.text-3xl {
    font-size: 1.875rem;
}
.text-lg {
    font-size: 1.125rem;
}
.text-sm {
    font-size: 0.875rem;
}
.text-xs {
    font-size: 0.75rem;
}
.text-10px {
    font-size: 0.625rem;
}
.text-8px {
    font-size: 0.5rem;
}
.px-1-5 {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}
.py-0-5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}
.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.gap-1 {
    gap: 0.25rem;
}
.gap-2 {
    gap: 0.5rem;
}
.gap-4 {
    gap: 1rem;
}
.gap-6 {
    gap: 1.5rem;
}
.mb-1 {
    margin-bottom: 0.25rem;
}
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-3 {
    margin-bottom: 0.75rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mt-1 {
    margin-top: 0.25rem;
}
.mt-0 {
    margin-top: 0;
}
.mr-2 {
    margin-right: 0.5rem;
}
.p-0-5 {
    padding: 0.125rem;
}
.p-3 {
    padding: 0.75rem;
}
.p-4 {
    padding: 1rem;
}
.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.rounded-lg {
    border-radius: 0.5rem;
}
.rounded-xl {
    border-radius: 0.75rem;
}
.rounded-full {
    border-radius: 9999px;
}
.rounded {
    border-radius: 0.25rem;
}
.border-2 {
    border-width: 2px;
}
.border {
    border-width: 1px;
}
.border-t {
    border-top-width: 1px;
}
.border-gray-700 {
    border-color: #374151;
}
.border-gray-200 {
    border-color: #e5e7eb;
}
.bg-gray-200 {
    background-color: #e5e7eb;
}
.bg-white {
    background-color: #ffffff;
}
.bg-red-100 {
    background-color: #fef2f2;
}
.bg-blue-100 {
    background-color: #dbeafe;
}
.bg-green-100 {
    background-color: #dcfce7;
}
.bg-purple-100 {
    background-color: #faf5ff;
}
.bg-blue-50 {
    background-color: #eff6ff;
}
.text-white {
    color: #ffffff;
}
.text-black {
    color: #000000;
}
.text-gray-500 {
    color: #6b7280;
}
.text-gray-900 {
    color: #111827;
}
.text-gray-400 {
    color: #9ca3af;
}
.text-red-600 {
    color: #dc2626;
}
.text-blue-600 {
    color: #2563eb;
}
.text-blue-500 {
    color: #3b82f6;
}
.text-blue-700 {
    color: #1d4ed8;
}
.text-green-700 {
    color: #047857;
}
.text-purple-700 {
    color: #7c3aed;
}
.font-bold {
    font-weight: 700;
}
.font-medium {
    font-weight: 500;
}
.uppercase {
    text-transform: uppercase;
}
.tracking-tight {
    letter-spacing: -0.025em;
}
.tracking-wider {
    letter-spacing: 0.05em;
}
.leading-none {
    line-height: 1;
}
.flex {
    display: flex;
}
.flex-col {
    flex-direction: column;
}
.items-center {
    align-items: center;
}
.items-start {
    align-items: flex-start;
}
.items-end {
    align-items: flex-end;
}
.justify-between {
    justify-content: space-between;
}
.justify-center {
    justify-content: center;
}
.flex-1 {
    flex: 1 1 0%;
}
.relative {
    position: relative;
}
.absolute {
    position: absolute;
}
.sticky {
    position: sticky;
}
.fixed {
    position: fixed;
}
.top-0 {
    top: 0;
}
.bottom-0 {
    bottom: 0;
}
.left-0 {
    left: 0;
}
.right-0 {
    right: 0;
}
.z-50 {
    z-index: 50;
}
.w-full {
    width: 100%;
}
.h-full {
    height: 100%;
}
.object-cover {
    object-fit: cover;
}
.overflow-hidden {
    overflow: hidden;
}
.overflow-x-auto {
    overflow-x: auto;
}
.whitespace-nowrap {
    white-space: nowrap;
}
.text-center {
    text-align: center;
}
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
.bg-gradient-to-t {
    background-image: linear-gradient(to top, var(--tw-gradient-stops));
}
.from-black\/60 {
    --tw-gradient-from: rgba(0, 0, 0, 0.6);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
}
.to-transparent {
    --tw-gradient-to: transparent;
}
.grid {
    display: grid;
}
.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}
.from-indigo-600 {
    --tw-gradient-from: #4f46e5;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(79, 70, 229, 0));
}
.to-purple-600 {
    --tw-gradient-to: #7c3aed;
}
.opacity-90 {
    opacity: 0.9;
}
.fill-current {
    fill: currentColor;
}
.-top-2 {
    top: -0.5rem;
}
.-right-2 {
    right: -0.5rem;
}
.focus\:ring-0:focus {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.border-none {
    border: none;
}
.rounded-l-md {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}
.rounded-r-md {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* ── Additional utilities ───────────────────────────────────────── */
.block        { display: block; }
.bg-transparent { background-color: transparent; }
.bg-red-50    { background-color: #fef2f2; }
.bg-red-500   { background-color: #ef4444; }
.border-red-100 { border-color: #fee2e2; }
.border-slate-50{ border-color: #f8fafc; }
.text-red-400 { color: #f87171; }
.text-red-500 { color: #ef4444; }
.cursor-pointer { cursor: pointer; }
.outline-none { outline: none; }
.mx-auto      { margin-left: auto; margin-right: auto; }
.mb-5         { margin-bottom: 1.25rem; }
.pb-1         { padding-bottom: 0.25rem; }
.px-6         { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-12        { padding-top: 3rem; padding-bottom: 3rem; }
.text-\[8px\] { font-size: 8px; }
/* focus:ring-1 — search input highlight ring */
.focus\:ring-1:focus { box-shadow: 0 0 0 1px var(--tw-ring-color, rgba(124,58,237,.4)); }
/* active states */
.active\:bg-slate-100:active { background-color: #f1f5f9; }
.active\:bg-slate-200:active { background-color: #e2e8f0; }

/* ── Shared page-shell utilities ────────────────────────────────── */
.ios-blur {
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}
/* Tailwind opacity-modifier equivalents */
.bg-white\/80  { background-color: rgba(255,255,255,.80); }
.bg-white\/90  { background-color: rgba(255,255,255,.90); }
.bg-white\/95  { background-color: rgba(255,255,255,.95); }
.safe-bottom   { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ── extended utilities (companiesAdmin + future pages) ─────────── */
/* Fractional padding */
.px-1     { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5  { padding-left: 0.375rem; padding-right: 0.375rem; }
.py-0\.5  { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1     { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5  { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2\.5  { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3\.5  { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.p-1\.5   { padding: 0.375rem; }
.p-2      { padding: 0.5rem; }
.p-2\.5   { padding: 0.625rem; }
.gap-1\.5 { gap: 0.375rem; }
/* Margin */
.mr-1     { margin-right: 0.25rem; }
.ml-1     { margin-left: 0.25rem; }
/* ── companiesAdmin utilities ───────────────────────────────────── */
.rounded-2xl  { border-radius: 1rem; }
.rounded-3xl  { border-radius: 1.5rem; }
.grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-0\.5     { gap: 0.125rem; }
.gap-3        { gap: 0.75rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.shadow-sm    { box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); }
.shadow-xl    { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04); }
.min-w-0      { min-width: 0; }
.flex-shrink-0{ flex-shrink: 0; }
.flex-none    { flex: none; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
/* Individual directional padding/margin */
.pt-2   { padding-top: 0.5rem; }
.pt-3   { padding-top: 0.75rem; }
.pt-4   { padding-top: 1rem; }
.pt-12  { padding-top: 3rem; }
.pb-3   { padding-bottom: 0.75rem; }
.pb-6   { padding-bottom: 1.5rem; }
.pb-28  { padding-bottom: 7rem; }
.pl-9   { padding-left: 2.25rem; }
.pr-4   { padding-right: 1rem; }
.mt-0\.5{ margin-top: 0.125rem; }
.mt-1\.5{ margin-top: 0.375rem; }
.mt-2   { margin-top: 0.5rem; }
.mb-0\.5{ margin-bottom: 0.125rem; }
.ml-0\.5{ margin-left: 0.125rem; }
/* Width / height */
.w-7    { width: 1.75rem; }
.w-8    { width: 2rem; }
.w-10   { width: 2.5rem; }
.w-11   { width: 2.75rem; }
.w-14   { width: 3.5rem; }
.h-1    { height: 0.25rem; }
.h-7    { height: 1.75rem; }
.h-8    { height: 2rem; }
.h-10   { height: 2.5rem; }
.h-11   { height: 2.75rem; }
.h-14   { height: 3.5rem; }
/* Positioning helpers */
.top-1\/2      { top: 50%; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.left-3        { left: 0.75rem; }
.right-4       { right: 1rem; }
.bottom-24     { bottom: 6rem; }
.z-9999        { z-index: 9999; }
.z-99999       { z-index: 99999; }
.z-200         { z-index: 200; }
/* Text sizes */
.text-base     { font-size: 1rem; }
.text-2xl      { font-size: 1.5rem; }
.text-\[9px\]  { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[12px\] { font-size: 12px; }
.text-xl       { font-size: 1.25rem; }
/* Slate color palette */
.bg-slate-50   { background-color: #f8fafc; }
.bg-slate-100  { background-color: #f1f5f9; }
.bg-slate-200  { background-color: #e2e8f0; }
.text-slate-400{ color: #94a3b8; }
.text-slate-500{ color: #64748b; }
.text-slate-700{ color: #334155; }
.text-slate-900{ color: #0f172a; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
/* Opacity / pointer */
.opacity-0     { opacity: 0; }
.opacity-50    { opacity: 0.5; }
.pointer-events-none { pointer-events: none; }
/* Transitions */
.transition-transform { transition-property: transform; transition-duration: 150ms; transition-timing-function: cubic-bezier(.4,0,.2,1); }
.transition    { transition-property: all; transition-duration: 150ms; transition-timing-function: cubic-bezier(.4,0,.2,1); }
/* Ring / focus */
.ring-4        { box-shadow: 0 0 0 4px var(--tw-ring-color, rgba(59,130,246,.5)); }
.ring-white    { --tw-ring-color: #fff; }
/* Active state scale */
.active\:scale-90:active { transform: scale(.9); }
.active\:opacity-80:active { opacity: .8; }
.active\:opacity-70:active { opacity: .7; }
.active\:bg-slate-200:active { background-color: #e2e8f0; }
/* Overflow */
.overflow-y-auto { overflow-y: auto; }
/* Max-height */
.max-h-\[90vh\] { max-height: 90vh; }
/* Alignment */
.align-middle { vertical-align: middle; }
/* Leading */
.leading-relaxed { line-height: 1.625; }
/* Letter spacing */
.tracking-tighter { letter-spacing: -.05em; }

/* ══════════════════════════════════════════════════════════════
   TEMPLATE SYSTEM — CSS-variable-based theming
   Applied to <body data-tpl="home-Tx"> on every page via header.js.
   Colors always come from CSS variables set by tenant.js applyTheme.
   Only layout/typography differs per-template.
   ══════════════════════════════════════════════════════════════ */

/* ── Shared product card base ── */
.ps-card { text-decoration:none; color:inherit; display:block; overflow:hidden; }
.ps-card-img { overflow:hidden; position:relative; background:var(--surf,#f9fafb); }
.ps-card-img img { width:100%; height:100%; object-fit:cover; display:block; }
.ps-card-body { padding:8px 10px; }

/* ── Universal: all template pages ── */
body[data-tpl^="home-T"] { background:var(--surf) !important; font-family:'Inter',sans-serif; }

/* Universal card colors — theme variables, no hardcoding */
body[data-tpl^="home-T"] #sr-grid .ps-card     { background:var(--card,#fff) !important; }
body[data-tpl^="home-T"] #sr-grid .ps-card-price{ color:var(--bp) !important; }
body[data-tpl^="home-T"] #sr-grid .ps-badge     { background:var(--ba) !important; color:var(--bat,#111) !important; }
body[data-tpl^="home-T"] :is(#pdp-browse-grid,#relatedGrid) .ps-card      { background:var(--card,#fff) !important; }
body[data-tpl^="home-T"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-price { color:var(--bp) !important; }
body[data-tpl^="home-T"] :is(#pdp-browse-grid,#relatedGrid) .ps-badge      { background:var(--ba) !important; color:var(--bat,#111) !important; }
body[data-tpl^="home-T"] #buyPrice              { color:var(--bp) !important; }

/* Universal theme-color helpers used in sub-pages */
.theme-bg-primary  { background-color: var(--bp) !important; color: var(--bpt) !important; }
.theme-bg-accent   { background-color: var(--ba) !important; color: var(--bat) !important; }
.theme-text-primary { color: var(--bp) !important; }
.theme-text-accent  { color: var(--ba) !important; }
.theme-border-primary { border-color: var(--bp) !important; }
.theme-border-accent  { border-color: var(--ba) !important; }

/* ── T1: Dense 4-col, square images, bold ── */
body[data-tpl="home-T1"] #sr-grid { grid-template-columns:repeat(4,1fr) !important; gap:10px !important; padding:10px !important; }
body[data-tpl="home-T1"] #sr-grid .ps-card { border-radius:10px !important; box-shadow:0 2px 8px rgba(0,0,0,.10) !important; border:1.5px solid rgba(0,0,0,.06) !important; }
body[data-tpl="home-T1"] #sr-grid .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T1"] #sr-grid .ps-card-body { padding:6px 8px 8px !important; }
body[data-tpl="home-T1"] #sr-grid .ps-card-name { font-size:11px !important; font-weight:600 !important; }
body[data-tpl="home-T1"] #sr-grid .ps-card-price { font-size:13px !important; font-weight:800 !important; }
body[data-tpl="home-T1"] #sr-grid .ps-badge { font-size:9px !important; font-weight:800 !important; border-radius:4px !important; }
body[data-tpl="home-T1"] :is(#pdp-browse-grid,#relatedGrid) .ps-card { border-radius:10px !important; border:1.5px solid rgba(0,0,0,.06) !important; }
body[data-tpl="home-T1"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T1"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-price { font-weight:800 !important; }
@media (max-width:639px) { body[data-tpl="home-T1"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:8px !important; } }

/* ── T2: 2-col portrait (2:3), editorial magazine ── */
body[data-tpl="home-T2"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:1px !important; background:#e5e7eb !important; padding:0 !important; }
body[data-tpl="home-T2"] #sr-grid .ps-card { border-radius:0 !important; box-shadow:none !important; border:none !important; }
body[data-tpl="home-T2"] #sr-grid .ps-card-img { aspect-ratio:2/3 !important; }
body[data-tpl="home-T2"] #sr-grid .ps-card-body { padding:10px 12px 14px !important; }
body[data-tpl="home-T2"] #sr-grid .ps-card-name { font-size:13px !important; font-weight:500 !important; letter-spacing:-0.01em !important; }
body[data-tpl="home-T2"] #sr-grid .ps-card-price { font-size:13px !important; font-weight:700 !important; }
body[data-tpl="home-T2"] #sr-grid .ps-badge { border-radius:2px !important; font-size:9px !important; }
body[data-tpl="home-T2"] :is(#pdp-browse-grid,#relatedGrid) .ps-card { border-radius:0 !important; box-shadow:none !important; border:1px solid #e5e7eb !important; }
body[data-tpl="home-T2"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:2/3 !important; }
body[data-tpl="home-T2"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-name { font-weight:500 !important; }
@media (min-width:640px) { body[data-tpl="home-T2"] #sr-grid { grid-template-columns:repeat(3,1fr) !important; } }
@media (min-width:1024px) { body[data-tpl="home-T2"] #sr-grid { grid-template-columns:repeat(4,1fr) !important; } }

/* ── T3: Minimal 2-col, centered text, uppercase names ── */
body[data-tpl="home-T3"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:16px !important; padding:16px !important; max-width:900px; margin-left:auto; margin-right:auto; }
body[data-tpl="home-T3"] #sr-grid .ps-card { border-radius:4px !important; box-shadow:none !important; border:1px solid rgba(0,0,0,.08) !important; transition:box-shadow .2s; }
body[data-tpl="home-T3"] #sr-grid .ps-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.08) !important; }
body[data-tpl="home-T3"] #sr-grid .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T3"] #sr-grid .ps-card-body { padding:12px 14px 16px !important; text-align:center !important; }
body[data-tpl="home-T3"] #sr-grid .ps-card-name { font-size:12px !important; font-weight:500 !important; letter-spacing:.02em !important; text-transform:uppercase !important; }
body[data-tpl="home-T3"] #sr-grid .ps-card-price { font-size:13px !important; font-weight:400 !important; }
body[data-tpl="home-T3"] #sr-grid .ps-badge { border-radius:0 !important; font-size:9px !important; letter-spacing:.05em !important; }
body[data-tpl="home-T3"] :is(#pdp-browse-grid,#relatedGrid) .ps-card { border:1px solid rgba(0,0,0,.08) !important; border-radius:4px !important; box-shadow:none !important; }
body[data-tpl="home-T3"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T3"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-body { text-align:center !important; }
body[data-tpl="home-T3"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-name { text-transform:uppercase !important; letter-spacing:.02em !important; }
body[data-tpl="home-T3"] #productName { letter-spacing:.04em; text-transform:uppercase; font-size:18px; font-weight:500; }
@media (min-width:640px) { body[data-tpl="home-T3"] #sr-grid { grid-template-columns:repeat(3,1fr) !important; } }

/* ── T4: Bold 4-col, portrait (3:4) ── */
body[data-tpl="home-T4"] #sr-grid { grid-template-columns:repeat(4,1fr) !important; gap:8px !important; padding:8px !important; }
body[data-tpl="home-T4"] #sr-grid .ps-card { border-radius:8px !important; box-shadow:0 1px 4px rgba(0,0,0,.10) !important; border:none !important; }
body[data-tpl="home-T4"] #sr-grid .ps-card-img { aspect-ratio:3/4 !important; }
body[data-tpl="home-T4"] #sr-grid .ps-card-body { padding:5px 7px 8px !important; }
body[data-tpl="home-T4"] #sr-grid .ps-card-name { font-size:10px !important; font-weight:500 !important; }
body[data-tpl="home-T4"] #sr-grid .ps-card-price { font-size:14px !important; font-weight:800 !important; }
body[data-tpl="home-T4"] #sr-grid .ps-badge { font-size:9px !important; font-weight:800 !important; border-radius:3px !important; padding:2px 5px !important; }
body[data-tpl="home-T4"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:3/4 !important; }
body[data-tpl="home-T4"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-price { font-weight:800 !important; font-size:14px !important; }
body[data-tpl="home-T4"] #productName { font-weight:700; }
@media (max-width:639px) { body[data-tpl="home-T4"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:6px !important; } }

/* ── T5: Clean 2-col, rounded cards, enterprise ── */
body[data-tpl="home-T5"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:12px !important; padding:12px !important; }
body[data-tpl="home-T5"] #sr-grid .ps-card { border-radius:8px !important; box-shadow:0 1px 4px rgba(0,0,0,.08) !important; border:1px solid #e8e8e8 !important; }
body[data-tpl="home-T5"] #sr-grid .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T5"] #sr-grid .ps-card-body { padding:8px 10px 10px !important; }
body[data-tpl="home-T5"] #sr-grid .ps-card-name { font-size:12px !important; font-weight:600 !important; }
body[data-tpl="home-T5"] #sr-grid .ps-card-price { font-size:14px !important; font-weight:700 !important; }
body[data-tpl="home-T5"] :is(#pdp-browse-grid,#relatedGrid) .ps-card { border-radius:8px !important; border:1px solid #e8e8e8 !important; }
body[data-tpl="home-T5"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:1/1 !important; }
@media (min-width:640px) { body[data-tpl="home-T5"] #sr-grid { grid-template-columns:repeat(3,1fr) !important; } }
@media (min-width:1024px) { body[data-tpl="home-T5"] #sr-grid { grid-template-columns:repeat(4,1fr) !important; } }

/* ── T6: Apple-style, 2-col, square, centered text ── */
body[data-tpl="home-T6"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:16px !important; padding:16px !important; }
body[data-tpl="home-T6"] #sr-grid .ps-card { border-radius:12px !important; box-shadow:0 2px 12px rgba(0,0,0,.08) !important; border:none !important; }
body[data-tpl="home-T6"] #sr-grid .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T6"] #sr-grid .ps-card-body { padding:10px !important; text-align:center !important; }
body[data-tpl="home-T6"] #sr-grid .ps-card-name { font-size:12px !important; font-weight:500 !important; }
body[data-tpl="home-T6"] #sr-grid .ps-card-price { font-size:14px !important; font-weight:600 !important; }
body[data-tpl="home-T6"] :is(#pdp-browse-grid,#relatedGrid) .ps-card { border-radius:12px !important; box-shadow:0 2px 12px rgba(0,0,0,.08) !important; }
body[data-tpl="home-T6"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T6"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-body { text-align:center !important; }
body[data-tpl="home-T6"] #productName { font-weight:600; letter-spacing:-0.02em; }
@media (min-width:640px) { body[data-tpl="home-T6"] #sr-grid { grid-template-columns:repeat(3,1fr) !important; } }
@media (min-width:1024px) { body[data-tpl="home-T6"] #sr-grid { grid-template-columns:repeat(4,1fr) !important; } }

/* ── T7: Decathlon — sporty, clean 4-col, rounded cards, blue price ── */
body[data-tpl="home-T7"] #sr-grid { grid-template-columns:repeat(4,1fr) !important; gap:12px !important; padding:12px !important; }
body[data-tpl="home-T7"] #sr-grid .ps-card { border-radius:12px !important; box-shadow:0 1px 4px rgba(0,0,0,.08) !important; border:1px solid #e6ebf0 !important; }
body[data-tpl="home-T7"] #sr-grid .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T7"] #sr-grid .ps-card-body { padding:8px 10px 10px !important; }
body[data-tpl="home-T7"] #sr-grid .ps-card-name { font-size:11px !important; font-weight:600 !important; }
body[data-tpl="home-T7"] #sr-grid .ps-card-price { font-size:14px !important; font-weight:700 !important; color:var(--bp,#0082c3) !important; }
body[data-tpl="home-T7"] #sr-grid .ps-badge { font-size:9px !important; font-weight:700 !important; border-radius:20px !important; padding:2px 7px !important; }
body[data-tpl="home-T7"] :is(#pdp-browse-grid,#relatedGrid) .ps-card { border-radius:12px !important; border:1px solid #e6ebf0 !important; }
body[data-tpl="home-T7"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:1/1 !important; }
body[data-tpl="home-T7"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-price { font-weight:700 !important; color:var(--bp,#0082c3) !important; }
@media (max-width:639px) { body[data-tpl="home-T7"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:8px !important; } }

/* ── T8: Megastore — dense 5-col, square hairline tiles, contain-fit shots, green price ──
   Deliberately squarer and tighter than every other skin: the department-store look is
   built on volume, so the tiles carry a 1px border instead of a shadow and the product
   photo sits CONTAINed on white rather than cropped to fill. ── */
body[data-tpl="home-T8"] #sr-grid { grid-template-columns:repeat(5,1fr) !important; gap:10px !important; padding:10px !important; }
body[data-tpl="home-T8"] #sr-grid .ps-card { border-radius:0 !important; box-shadow:none !important; border:1px solid #e1e1e1 !important; }
body[data-tpl="home-T8"] #sr-grid .ps-card:hover { border-color:var(--ba,#fcb800) !important; box-shadow:0 6px 20px rgba(0,0,0,.10) !important; }
body[data-tpl="home-T8"] #sr-grid .ps-card-img { aspect-ratio:1/1 !important; background:#fff !important; }
body[data-tpl="home-T8"] #sr-grid .ps-card-img img { object-fit:contain !important; }
body[data-tpl="home-T8"] #sr-grid .ps-card-body { padding:8px 10px 11px !important; }
body[data-tpl="home-T8"] #sr-grid .ps-card-name { font-size:12px !important; font-weight:500 !important; }
body[data-tpl="home-T8"] #sr-grid .ps-card-price { font-size:13px !important; font-weight:700 !important; color:#669900 !important; }
body[data-tpl="home-T8"] #sr-grid .ps-badge { font-size:9px !important; font-weight:700 !important; border-radius:0 !important; padding:2px 6px !important; }
body[data-tpl="home-T8"] :is(#pdp-browse-grid,#relatedGrid) .ps-card { border-radius:0 !important; border:1px solid #e1e1e1 !important; box-shadow:none !important; }
body[data-tpl="home-T8"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img { aspect-ratio:1/1 !important; background:#fff !important; }
body[data-tpl="home-T8"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-img img { object-fit:contain !important; }
body[data-tpl="home-T8"] :is(#pdp-browse-grid,#relatedGrid) .ps-card-price { font-weight:700 !important; color:#669900 !important; }
@media (max-width:1023px) { body[data-tpl="home-T8"] #sr-grid { grid-template-columns:repeat(3,1fr) !important; } }
@media (max-width:639px)  { body[data-tpl="home-T8"] #sr-grid { grid-template-columns:repeat(2,1fr) !important; gap:8px !important; } }

/* ── T8 footer skin ────────────────────────────────────────────────────────────────────
   aspl_footer.js already follows --primary/--accent for COLOUR. This adds the rest of the
   T8 look so the footer matches the rest of the skin rather than just sharing its hues:
   square corners (no 10px badge chips), the Work Sans face, amber column headings and
   hairline dividers. Applies on every T8 surface — data-tpl is stamped on all of them. */
/* T8 is a LIGHT skin (white bar + amber actions), so its footer is light too — not the
   dark --primary slab every other template uses. --footer-bg/--footer-fg exist exactly
   for this. The footer's own CSS assumes white-on-dark (hardcoded #fff text, rgba(255,
   255,255,…) fills), so each of those assumptions is inverted below; without that, a
   white background would render white text on white. */
body[data-tpl="home-T8"] { --footer-bg:#ffffff; --footer-fg:#4a4a4a; }
body[data-tpl="home-T8"] #aspl-footer { font-family:'Work Sans', Inter, sans-serif; border-top:1px solid #e1e1e1; }
body[data-tpl="home-T8"] #aspl-footer a { color:#4a4a4a !important; }
body[data-tpl="home-T8"] #aspl-footer a:hover { color:var(--accent, var(--ba,#fcb800)) !important; }
/* Trust strip: tinted band instead of a translucent-white overlay. */
body[data-tpl="home-T8"] #aspl-footer .af-trust { background:#fafafa !important; border-bottom:1px solid #e1e1e1 !important; }
body[data-tpl="home-T8"] #aspl-footer .af-badge-ic { border-radius:0 !important; background:#fff7e0 !important; color:#a97a00 !important; }
body[data-tpl="home-T8"] #aspl-footer .af-badge-lb { color:#111 !important; }
body[data-tpl="home-T8"] #aspl-footer .af-badge-sb { color:#878787 !important; opacity:1 !important; }
/* Column headings: uppercase, dark, with the amber rule used across T8 sections. */
body[data-tpl="home-T8"] #aspl-footer .af-h {
  color:#111 !important; text-transform:uppercase; letter-spacing:.4px; font-weight:700;
  border-bottom:2px solid var(--accent, var(--ba,#fcb800)); display:inline-block; padding-bottom:5px;
}
body[data-tpl="home-T8"] #aspl-footer :is(.af-text, .af-contact, .af-about) { color:#4a4a4a !important; }
body[data-tpl="home-T8"] #aspl-footer .af-contact b { color:#111 !important; }
body[data-tpl="home-T8"] #aspl-footer .af-brand { color:#111 !important; }
/* Social + payment chips: squared, hairline-bordered, dark glyphs on white. */
body[data-tpl="home-T8"] #aspl-footer :is(.af-soc, .af-pay-ic, input, button) { border-radius:0 !important; }
body[data-tpl="home-T8"] #aspl-footer .af-soc { background:#fff !important; border:1px solid #e1e1e1 !important; color:#4a4a4a !important; }
body[data-tpl="home-T8"] #aspl-footer .af-soc svg { fill:currentColor; }
body[data-tpl="home-T8"] #aspl-footer .af-soc:hover { background:var(--accent, var(--ba,#fcb800)) !important; border-color:var(--accent, var(--ba,#fcb800)) !important; color:#111 !important; }
body[data-tpl="home-T8"] #aspl-footer .af-pay-ic { background:#fff !important; border:1px solid #e1e1e1 !important; }
body[data-tpl="home-T8"] #aspl-footer .af-pay-h { color:#878787 !important; }
/* Bottom "Powered by · ©" bar. */
body[data-tpl="home-T8"] #aspl-footer .af-bar { background:#f5f5f5 !important; border-top:1px solid #e1e1e1 !important; color:#6b6b6b !important; }
body[data-tpl="home-T8"] #aspl-footer .af-pow b { color:#111 !important; }

/* ══ PDP column rhythm — shared by productDetails-T1…T8 ════════════════════════════════
   ONE vertical scale for every skin: 16px desktop / 12px mobile. Every column-level
   separator gets the SAME space above and below it, and a block that a theme (or a
   product) turns off leaves no gap behind.

   Why flex+gap instead of the `space-y-*` utility: space-y puts its margin on the
   FOLLOWING sibling (`> * + *`), so a display:none child still pushes the next one down.
   #sponsoredLabel (hidden unless the product is sponsored) was offsetting the whole info
   column 16px below the image on all 7 templates, and #giftOptionBlock did the same in
   the buy box whenever the WL has gift options switched off. Flex `gap` skips
   display:none items entirely, so the column renders identically whether an optional
   block is on or off — that is what makes the rhythm theme-independent. */
#pdInfo,
#pdBuy .sticky-sidebar{display:flex;flex-direction:column;gap:16px}

/* Kill both the space-y margins and the UA's own heading/paragraph/hr margins: flex does
   NOT collapse margins, so they would ADD to the gap (h1's 0.67em is itself 16px — the
   column-level spacing must come from `gap` alone, or nothing lines up). Skins can still
   override per element: their #id rules are later in the cascade. */
#pdInfo>*,
#pdBuy .sticky-sidebar>*{margin:0}

/* A block the JS leaves EMPTY (no variants, no brand) is invisible but still a flex item,
   so it keeps its gap — two of them stack into a 32px hole. Collapse them. `div:empty`
   only: <hr> is legitimately empty and IS the separator. */
#pdInfo>div:empty,
#pdBuy .sticky-sidebar>div:empty{display:none}

/* Separators, even on both sides. <hr> gets its spacing from `gap`; a row that draws its
   own underline (the rating row's `border-b`) needs padding-bottom to match that gap, or
   the line hugs its own text and floats away from what follows. */
#pdInfo>hr{border:0;border-top:1px solid var(--ps-rule,#e5e7eb)}
#pdInfo>.border-b,
#pdBuy .sticky-sidebar>.border-b{padding-bottom:16px}
#pdInfo>.border-t,
#pdBuy .sticky-sidebar>.border-t{padding-top:16px}

/* Gallery: the caption under the image sits on the same scale as everything else. */
#pdGallery .sticky>p{margin-top:16px;margin-bottom:0}   /* the UA/bootstrap 8px bottom margin would land under the caption only */

@media(max-width:767px){
  #pdInfo,
  #pdBuy .sticky-sidebar{gap:12px}
  #pdInfo>.border-b,
  #pdBuy .sticky-sidebar>.border-b{padding-bottom:12px}
  #pdInfo>.border-t,
  #pdBuy .sticky-sidebar>.border-t{padding-top:12px}
  #pdGallery .sticky>p{margin-top:12px}
}

/* ── T2 footer skin (Ajio) ─────────────────────────────────────────────────────────────
   T2 is a LIGHT editorial skin, and its --primary is a strong red — inherited as a footer
   background that reads as a solid red slab. Ajio's own footer is near-white with dark
   text, so the same white-on-dark inversion T8 needed applies here. */
body[data-tpl="home-T2"] { --footer-bg:#dcdcdc; --footer-fg:#3f3f3f; }
body[data-tpl="home-T2"] #aspl-footer { border-top:1px solid #c8c8c8; }
body[data-tpl="home-T2"] #aspl-footer a { color:#4a4a4a !important; }
body[data-tpl="home-T2"] #aspl-footer a:hover { color:var(--bp,#e63946) !important; }
body[data-tpl="home-T2"] #aspl-footer .af-trust { background:#e5e5e5 !important; border-bottom:1px solid #c8c8c8 !important; }
body[data-tpl="home-T2"] #aspl-footer .af-badge-ic { background:#fdeced !important; color:var(--bp,#e63946) !important; }
body[data-tpl="home-T2"] #aspl-footer .af-badge-lb { color:#1a1a1a !important; }
body[data-tpl="home-T2"] #aspl-footer .af-badge-sb { color:#8a8a8a !important; opacity:1 !important; }
body[data-tpl="home-T2"] #aspl-footer .af-h { color:#1a1a1a !important; text-transform:uppercase; letter-spacing:.8px; font-weight:700; }
body[data-tpl="home-T2"] #aspl-footer :is(.af-text,.af-contact,.af-about) { color:#4a4a4a !important; }
body[data-tpl="home-T2"] #aspl-footer :is(.af-contact b,.af-brand) { color:#1a1a1a !important; }
body[data-tpl="home-T2"] #aspl-footer .af-soc { background:#fff !important; border:1px solid #d8d8d8 !important; color:#4a4a4a !important; }
body[data-tpl="home-T2"] #aspl-footer .af-soc:hover { background:var(--bp,#e63946) !important; border-color:var(--bp,#e63946) !important; color:#fff !important; }
body[data-tpl="home-T2"] #aspl-footer .af-pay-ic { background:#fff !important; border:1px solid #d8d8d8 !important; }
body[data-tpl="home-T2"] #aspl-footer .af-pay-h { color:#8a8a8a !important; }
body[data-tpl="home-T2"] #aspl-footer .af-bar { background:#cfcfcf !important; border-top:1px solid #c0c0c0 !important; color:#4a4a4a !important; }
body[data-tpl="home-T2"] #aspl-footer .af-pow b { color:#1a1a1a !important; }

/* ── T5 footer skin (enterprise/utility) ───────────────────────────────────────────────
   T5 is a LIGHT skin whose --primary is a mid blue; inherited as the footer background it
   becomes a solid blue slab. The reference footer is a light grey utility band with dark
   text, so the same white-on-dark inversion T2/T8 needed applies. */
body[data-tpl="home-T5"] { --footer-bg:#f2f2f2; --footer-fg:#4a4a4a; }
body[data-tpl="home-T5"] #aspl-footer { border-top:1px solid #e3e3e3; }
body[data-tpl="home-T5"] #aspl-footer a { color:#4a4a4a !important; }
body[data-tpl="home-T5"] #aspl-footer a:hover { color:var(--bp,#0067b8) !important; text-decoration:underline; }
body[data-tpl="home-T5"] #aspl-footer .af-trust { background:#fff !important; border-bottom:1px solid #e3e3e3 !important; }
body[data-tpl="home-T5"] #aspl-footer .af-badge-ic { background:#eaf3fb !important; color:var(--bp,#0067b8) !important; border-radius:0 !important; }
body[data-tpl="home-T5"] #aspl-footer .af-badge-lb { color:#1b1b1b !important; }
body[data-tpl="home-T5"] #aspl-footer .af-badge-sb { color:#605e5c !important; opacity:1 !important; }
body[data-tpl="home-T5"] #aspl-footer .af-h { color:#1b1b1b !important; font-weight:600; }
body[data-tpl="home-T5"] #aspl-footer :is(.af-text,.af-contact,.af-about) { color:#4a4a4a !important; }
body[data-tpl="home-T5"] #aspl-footer :is(.af-contact b,.af-brand) { color:#1b1b1b !important; }
body[data-tpl="home-T5"] #aspl-footer :is(.af-soc,.af-pay-ic,input,button) { border-radius:0 !important; }
body[data-tpl="home-T5"] #aspl-footer .af-soc { background:#fff !important; border:1px solid #e3e3e3 !important; color:#4a4a4a !important; }
body[data-tpl="home-T5"] #aspl-footer .af-soc:hover { background:var(--bp,#0067b8) !important; border-color:var(--bp,#0067b8) !important; color:#fff !important; }
body[data-tpl="home-T5"] #aspl-footer .af-pay-ic { background:#fff !important; border:1px solid #e3e3e3 !important; }
body[data-tpl="home-T5"] #aspl-footer .af-pay-h { color:#605e5c !important; }
body[data-tpl="home-T5"] #aspl-footer .af-bar { background:#e6e6e6 !important; border-top:1px solid #d8d8d8 !important; color:#5a5a5a !important; }
body[data-tpl="home-T5"] #aspl-footer .af-pow b { color:#1b1b1b !important; }

/* ── T6 footer skin (minimalist premium) ───────────────────────────────────────────────
   T6 pairs a DARK slim bar with a LIGHT page, so --primary (#000) inherited as the footer
   background would give a black slab under a white page. The reference footer is a light
   grey band with small dark type — invert as per T2/T5/T8. */
body[data-tpl="home-T6"] { --footer-bg:#f5f5f7; --footer-fg:#515154; }
body[data-tpl="home-T6"] #aspl-footer { border-top:1px solid #d2d2d7; font-size:12px; }
body[data-tpl="home-T6"] #aspl-footer a { color:#515154 !important; }
body[data-tpl="home-T6"] #aspl-footer a:hover { color:var(--ba,#0071e3) !important; text-decoration:underline; }
body[data-tpl="home-T6"] #aspl-footer .af-trust { background:#fff !important; border-bottom:1px solid #d2d2d7 !important; }
body[data-tpl="home-T6"] #aspl-footer .af-badge-ic { background:#eef4fd !important; color:var(--ba,#0071e3) !important; }
body[data-tpl="home-T6"] #aspl-footer .af-badge-lb { color:#1d1d1f !important; }
body[data-tpl="home-T6"] #aspl-footer .af-badge-sb { color:#86868b !important; opacity:1 !important; }
body[data-tpl="home-T6"] #aspl-footer .af-h { color:#1d1d1f !important; font-weight:600; }
body[data-tpl="home-T6"] #aspl-footer :is(.af-text,.af-contact,.af-about) { color:#515154 !important; }
body[data-tpl="home-T6"] #aspl-footer :is(.af-contact b,.af-brand) { color:#1d1d1f !important; }
body[data-tpl="home-T6"] #aspl-footer .af-soc { background:#fff !important; border:1px solid #d2d2d7 !important; color:#515154 !important; }
body[data-tpl="home-T6"] #aspl-footer .af-soc:hover { background:var(--ba,#0071e3) !important; border-color:var(--ba,#0071e3) !important; color:#fff !important; }
body[data-tpl="home-T6"] #aspl-footer .af-pay-ic { background:#fff !important; border:1px solid #d2d2d7 !important; }
body[data-tpl="home-T6"] #aspl-footer .af-pay-h { color:#86868b !important; }
body[data-tpl="home-T6"] #aspl-footer .af-bar { background:#ececef !important; border-top:1px solid #d2d2d7 !important; color:#6e6e73 !important; }
body[data-tpl="home-T6"] #aspl-footer .af-pow b { color:#1d1d1f !important; }

/* ── T7 footer (sports superstore) ─────────────────────────────────────────────────────
   T7's --bp is a SATURATED blue: inherited as the footer background it becomes a vivid
   blue slab under the page. Its palette already carries a navy secondary, which is both
   on-brand and dark — so the footer stays dark and needs NO white-on-dark inversion
   (unlike T2/T5/T6/T8). One line rather than a full skin. */
body[data-tpl="home-T7"] { --footer-bg:var(--bs, #001e4c); }
body[data-tpl="home-T7"] #aspl-footer .af-badge-ic { color:var(--ba,#ffd100) !important; }

/* ── Admin: adopt the WhiteLabel brand, narrowly ────────────────────────────────────────
   Tokens are published by aspl_admin_header._adoptBrandTokens() (accent is contrast-
   guarded to >=3:1 on white; display font only). Defaults keep admin on its own indigo
   when a tenant has no theme, so nothing changes for an unbranded install.
   Body text, table surfaces, borders and semantic colours deliberately DO NOT follow the
   brand — admin is a dense work tool and must stay legible on every palette. */
:root { --adm-accent:#4f46e5; --adm-accent-ink:#ffffff; --adm-accent-raw:#4f46e5; }

/* Primary actions + active states */
.adm-btn-primary, .btn-primary-adm, button.adm-primary {
  background:var(--adm-accent) !important; color:var(--adm-accent-ink) !important; border-color:var(--adm-accent) !important;
}
.adm-tab.active, .adm-nav-item.active, .adm-link-active { color:var(--adm-accent) !important; }
.adm-tab.active { border-bottom-color:var(--adm-accent) !important; }
/* Focus ring — keyboard users get the brand colour, not a browser default */
.adm-focusable:focus-visible, .adm-input:focus, .adm-select:focus {
  outline:2px solid var(--adm-accent) !important; outline-offset:1px;
}
/* Selected/checked affordances */
.adm-check:checked, .adm-radio:checked { accent-color:var(--adm-accent); }
.adm-row-selected { box-shadow:inset 3px 0 0 var(--adm-accent); }
/* Headings + sidebar pick up the brand display face (body font stays fixed so numeric
   columns keep tabular figures). */
.adm-title, .adm-section-title, #adm-hdr-root .adm-brand {
  font-family:var(--adm-font-display, inherit);
}
/* Charts: series 1 may take the accent; 2..n stay on a fixed, distinguishable set. */
:root {
  --adm-chart-1:var(--adm-accent);
  --adm-chart-2:#0891b2; --adm-chart-3:#7c3aed; --adm-chart-4:#c2410c;
  --adm-chart-5:#15803d; --adm-chart-6:#a16207;
}

/* ── Admin dialogs / toasts: overflow containment ───────────────────────────────────────
   aspToast / aspConfirm / aspPrompt render caller-supplied strings — company names, SKUs,
   API error bodies, pasted URLs. They had no wrapping rule, so a single long token with no
   spaces pushed the panel wider than its container or spilled outside it. The shells are
   inline-styled, so aspl_admin_ui.js now tags them (.aspl-modal / .aspl-toast) for these
   rules to reach. 'overflow-wrap:anywhere' only breaks when there is no better opportunity,
   so ordinary prose still wraps at spaces. */
.aspl-modal { max-width:min(92vw, 520px); box-sizing:border-box; }
.aspl-modal *, .aspl-toast * { min-width:0; }
.aspl-modal div, .aspl-modal p, .aspl-modal label, .aspl-modal span,
.aspl-toast span { overflow-wrap:anywhere; word-break:break-word; }
/* A long default value must not stretch the prompt. */
.aspl-modal input, .aspl-modal textarea, .aspl-modal select { max-width:100%; box-sizing:border-box; }
/* Scroll a very long body (an API error or stack trace) instead of growing off-screen;
   the action row stays reachable. */
.aspl-modal > div:first-child { max-height:min(60vh, 440px); overflow-y:auto; }
/* Validation text sits under a field and is often the longest string on the form. */
.adm-error, .field-error, .asp-field-error, .invalid-feedback {
  overflow-wrap:anywhere; word-break:break-word; max-width:100%; display:block;
}
/* Data cells: long SKUs/emails/URLs truncate with a title tooltip rather than widening
   the table. Opt out per-cell with .adm-wrap where the full value must be visible. */
.adm-table td, .adm-table th { max-width:320px; overflow:hidden; text-overflow:ellipsis; }
.adm-table td.adm-wrap { white-space:normal; overflow-wrap:anywhere; text-overflow:clip; }
