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; } }