/* ============================================================
   Daman — Flattened multi-vendor homepage (eMarket / Etro / TopDeal structure)
   Indigo + gold palette. RTL-first. "td-" namespace.
   Styles the new flattened sections AND harmonizes the reused mp-* components.
   ============================================================ */

:root {
    --td-primary: #4f46e5;
    --td-primary-rgb: 79, 70, 229;
    --td-primary-dark: #3730b8;
    --td-violet: #7c6cf0;
    --td-accent: #f0a020;          /* gold */
    --td-accent-rgb: 240, 160, 32;
    --td-accent-dark: #c97e0c;
    --td-danger: #e23744;
    --td-danger-rgb: 226, 55, 68;
    --td-success: #0f9d6c;
    --td-ink: #15131f;
    --td-ink-rgb: 21, 19, 31;
    --td-text: #1c1a29;
    --td-muted: #5b586b;
    --td-soft: #9491a3;
    --td-border: #e9e7f2;
    --td-bg: #f4f3fa;
    --td-surface: #ffffff;
    --td-surface-2: #f1eefb;

    --td-grad-brand: linear-gradient(135deg, #5b51ec 0%, #4f46e5 45%, #6d5cf0 100%);
    --td-grad-accent: linear-gradient(90deg, var(--td-primary), var(--td-accent));

    --td-radius: 12px;
    --td-radius-lg: 16px;
    --td-radius-xl: 22px;
    --td-pill: 999px;
    --td-shadow-sm: 0 1px 3px rgba(var(--td-ink-rgb), .06), 0 1px 2px rgba(var(--td-ink-rgb), .04);
    --td-shadow: 0 8px 20px -10px rgba(var(--td-ink-rgb), .14), 0 2px 6px -2px rgba(var(--td-ink-rgb), .06);
    --td-shadow-hover: 0 22px 44px -16px rgba(var(--td-primary-rgb), .26), 0 8px 18px -10px rgba(var(--td-ink-rgb), .12);
    --td-shadow-brand: 0 12px 26px -10px rgba(var(--td-primary-rgb), .5);
    --td-ease: cubic-bezier(.33, 1, .68, 1);
    --td-dur: .24s;
}

body.td-home { background: var(--td-bg); }

.td-home-page .page-body {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 14px 0;
}

/* Section rhythm + shared heading */
.td-home-page > .page-body > section,
.td-home-page > .page-body > .block,
.td-home-page .td-section { margin-bottom: 30px; }

.td-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.td-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--td-text);
    margin: 0;
    position: relative;
    padding-inline-start: 14px;
}
.td-section-title::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 1.05em;
    border-radius: var(--td-pill);
    background: var(--td-grad-accent);
}

/* Reveal on scroll */
.td-home-page .td-reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--td-ease), transform .55s var(--td-ease); }
.td-home-page .td-reveal.td-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .td-home-page .td-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   1. HERO — main slider + tall side promo
   ============================================================ */
.td-hero {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 14px;
    margin-bottom: 22px;
    min-height: 380px;
}
.td-hero-main {
    position: relative;
    border-radius: var(--td-radius-xl);
    overflow: hidden;
    box-shadow: var(--td-shadow);
    min-width: 0;
}

/* Slider */
.td-slider { position: relative; height: 100%; }
.td-slider-track { position: relative; height: 100%; min-height: 380px; }
.td-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 clamp(28px, 5vw, 64px);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.03);
    transition: opacity .6s var(--td-ease), transform .9s var(--td-ease), visibility .6s;
    overflow: hidden;
    isolation: isolate;
}
.td-slide.active { opacity: 1; visibility: visible; transform: none; }

/* Gradient backdrop — the base layer (and the fallback when a slide has no image). */
.hg-1 { background: radial-gradient(120% 140% at 100% 0%, #6d5cf0, #4f46e5 55%, #2c2785); }
.hg-2 { background: radial-gradient(120% 140% at 0% 0%, #2a2740, #15131f 70%); }
.hg-3 { background: linear-gradient(120deg, #f0a020, #ea580c 80%); }
.hg-4 { background: linear-gradient(120deg, #0ea5a0, #0f766e 80%); }

/* Product image fills the whole slide (cover) — turns a random photo into a real
   hero banner instead of a small picture floating on a dark box. */
.td-slide-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 7s var(--td-ease);
}
.td-slide.active .td-slide-img { transform: scale(1); }

/* Readability scrim — darkest on the text (inline-start) side, fading to reveal the image. */
.td-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(21,19,31,.9) 0%, rgba(21,19,31,.62) 36%, rgba(21,19,31,.18) 70%, rgba(21,19,31,.4) 100%);
}
[dir="rtl"] .td-slide::after {
    background: linear-gradient(270deg, rgba(21,19,31,.9) 0%, rgba(21,19,31,.62) 36%, rgba(21,19,31,.18) 70%, rgba(21,19,31,.4) 100%);
}

.td-slide-copy { position: relative; z-index: 2; max-width: 62%; color: #fff; }
.td-slide-badge {
    display: inline-flex;
    align-items: center;
    background: var(--td-danger);
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    padding: 5px 14px;
    border-radius: var(--td-pill);
    margin-bottom: 14px;
    box-shadow: 0 6px 16px -6px rgba(var(--td-danger-rgb), .7);
}
.td-slide-eyebrow {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--td-accent);
    margin-bottom: 10px;
}
.td-slide-title {
    font-size: clamp(1.55rem, 2.8vw, 2.6rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.025em;
    margin: 0 0 16px;
    text-shadow: 0 2px 24px rgba(0,0,0,.4);
}
.td-slide-sub { font-size: clamp(.95rem, 1.4vw, 1.15rem); line-height: 1.45; opacity: .92; margin: 0 0 20px; max-width: 92%; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.td-slide-copy--custom { display: flex; flex-direction: column; align-items: flex-start; }
.td-slide-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.td-slide-price del { opacity: .65; font-size: 1rem; }
.td-slide-price strong { font-size: 1.7rem; font-weight: 900; }
.td-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--td-primary-dark);
    font-weight: 800;
    font-size: .95rem;
    padding: 12px 28px;
    border-radius: var(--td-pill);
    box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
    transition: transform var(--td-dur) var(--td-ease), box-shadow var(--td-dur) var(--td-ease);
}
.td-slide:hover .td-slide-cta { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(0,0,0,.55); }
.td-slide-cta .fa { transition: transform var(--td-dur) var(--td-ease); }
[dir="rtl"] .td-slide-cta .fa { transform: scaleX(-1); }
.td-slide:hover .td-slide-cta .fa { transform: translateX(-3px); }
[dir="rtl"] .td-slide:hover .td-slide-cta .fa { transform: scaleX(-1) translateX(3px); }

/* Slider nav + dots */
.td-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(8px);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transition: opacity var(--td-dur) var(--td-ease), background var(--td-dur) var(--td-ease);
}
.td-hero-main:hover .td-slider-nav { opacity: 1; }
.td-slider-nav:hover { background: rgba(255,255,255,.32); }
.td-slider-prev { inset-inline-start: 16px; }
.td-slider-next { inset-inline-end: 16px; }
.td-slider-dots {
    position: absolute;
    bottom: 16px;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
    z-index: 3;
}
.td-dot {
    width: 8px; height: 8px;
    border-radius: var(--td-pill);
    background: rgba(255,255,255,.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--td-dur) var(--td-ease);
}
.td-dot.active { background: #fff; width: 26px; }

/* Tall side promo (eMarket yellow card) */
.td-hero-side {
    display: flex;
    flex-direction: column;
    border-radius: var(--td-radius-xl);
    overflow: hidden;
    background: linear-gradient(160deg, var(--td-accent), var(--td-accent-dark));
    box-shadow: var(--td-shadow);
    text-decoration: none;
    color: var(--td-ink);
    transition: transform var(--td-dur) var(--td-ease), box-shadow var(--td-dur) var(--td-ease);
    position: relative;
}
.td-hero-side:hover { transform: translateY(-3px); box-shadow: var(--td-shadow-hover); color: var(--td-ink); text-decoration: none; }
.td-hero-side-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 6px;
}
.td-hero-side-off {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
    color: var(--td-ink);
}
.td-hero-side-off small { font-size: .7rem; font-weight: 700; margin-inline-start: 4px; }
.td-hero-side-kicker {
    background: rgba(0,0,0,.14);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--td-pill);
}
.td-hero-side-img {
    flex: 1 1 auto;
    width: 100%;
    object-fit: contain;
    padding: 8px 18px;
    min-height: 0;
    mix-blend-mode: multiply;
}
.td-hero-side-foot {
    background: rgba(255,255,255,.92);
    padding: 12px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.td-hero-side-foot strong { font-size: .9rem; font-weight: 700; color: var(--td-ink); line-height: 1.3; }
.td-hero-side-price { font-size: 1.15rem; font-weight: 900; color: var(--td-danger); }

/* ============================================================
   2. SERVICE / BENEFIT ICON STRIP
   ============================================================ */
.td-services {
    background: var(--td-surface);
    border: 1px solid var(--td-border);
    border-radius: var(--td-radius-lg);
    box-shadow: var(--td-shadow-sm);
    padding: 16px 8px;
}
.td-services-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}
.td-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--td-text);
    border-radius: var(--td-radius);
    transition: background var(--td-dur) var(--td-ease), transform var(--td-dur) var(--td-ease);
}
.td-service:hover { background: var(--td-surface-2); transform: translateY(-2px); text-decoration: none; color: var(--td-primary); }
.td-service-ic {
    width: 52px; height: 52px;
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 8px 16px -8px rgba(var(--td-ink-rgb), .4);
}
.td-service-label { font-size: .76rem; font-weight: 600; text-align: center; line-height: 1.25; }
/* 8 distinct gradient chips */
.si-1 .td-service-ic { background: linear-gradient(135deg, #6d5cf0, #4f46e5); }
.si-2 .td-service-ic { background: linear-gradient(135deg, #f0a020, #ea580c); }
.si-3 .td-service-ic { background: linear-gradient(135deg, #ec4899, #be185d); }
.si-4 .td-service-ic { background: linear-gradient(135deg, #0ea5a0, #0f766e); }
.si-5 .td-service-ic { background: linear-gradient(135deg, #22c55e, #15803d); }
.si-6 .td-service-ic { background: linear-gradient(135deg, #f59e0b, #d97706); }
.si-7 .td-service-ic { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.si-8 .td-service-ic { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

/* ============================================================
   3. PROMO BANNER ROW (3 gradient ads)
   ============================================================ */
.td-adrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.td-ad {
    position: relative;
    min-height: 130px;
    border-radius: var(--td-radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    box-shadow: var(--td-shadow);
    transition: transform var(--td-dur) var(--td-ease), box-shadow var(--td-dur) var(--td-ease);
}
.td-ad:hover { transform: translateY(-3px); box-shadow: var(--td-shadow-hover); color: #fff; text-decoration: none; }
.td-ad::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.22), transparent 55%); }
.td-ad-body { position: relative; z-index: 1; padding: 20px 24px; }
.td-ad--violet { background: linear-gradient(135deg, #6d5cf0, #4f46e5); }
.td-ad--amber  { background: linear-gradient(135deg, #f0a020, #ea580c); }
.td-ad--rose   { background: linear-gradient(135deg, #ec4899, #be185d); }
.td-ad-kicker { display: block; font-size: .75rem; font-weight: 700; opacity: .92; margin-bottom: 5px; }
.td-ad-title { display: block; font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.td-ad-desc { display: block; font-size: .85rem; opacity: .92; margin-top: 3px; }
.td-ad-btn { display: inline-block; margin-top: 12px; background: rgba(255,255,255,.95); color: var(--td-ink); font-weight: 700; font-size: .8rem; padding: 6px 16px; border-radius: var(--td-pill); transition: transform var(--td-dur) var(--td-ease); }
.td-ad:hover .td-ad-btn { transform: translateX(-3px); }

/* ============================================================
   4. PROMOTIONAL BANNER MOSAIC
   ============================================================ */
.td-mosaic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 175px;
    gap: 14px;
}
.td-tile {
    position: relative;
    border-radius: var(--td-radius-lg);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--td-shadow-sm);
    transition: transform var(--td-dur) var(--td-ease), box-shadow var(--td-dur) var(--td-ease);
    background: var(--td-ink);
}
.td-tile:hover { transform: translateY(-3px); box-shadow: var(--td-shadow-hover); text-decoration: none; }
.td-tile--wide { grid-column: span 2; }
.td-tile--tall { grid-row: span 2; }
.td-tile-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s var(--td-ease);
}
.td-tile:hover .td-tile-img { transform: scale(1.06); }
.td-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(var(--td-ink-rgb), .82) 0%, rgba(var(--td-ink-rgb), .35) 55%, transparent 100%);
}
[dir="rtl"] .td-tile-overlay { background: linear-gradient(270deg, rgba(var(--td-ink-rgb), .82) 0%, rgba(var(--td-ink-rgb), .35) 55%, transparent 100%); }
.td-tile-body {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 22px;
    color: #fff;
    max-width: 78%;
}
.td-tile-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--td-accent); }
.td-tile-title { font-size: 1.1rem; font-weight: 800; line-height: 1.15; }
.td-tile--wide .td-tile-title { font-size: 1.4rem; }
.td-tile-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 700;
    margin-top: 6px;
    opacity: .92;
}
.td-tile-cta .fa { transition: transform var(--td-dur) var(--td-ease); }
.td-tile:hover .td-tile-cta .fa { transform: translateX(-3px); }
[dir="rtl"] .td-tile-cta .fa { transform: scaleX(-1); }
[dir="rtl"] .td-tile:hover .td-tile-cta .fa { transform: scaleX(-1) translateX(3px); }

/* ============================================================
   4b. FLATTENED PRODUCT ROW SECTIONS (former tabs → standalone)
   ============================================================ */
.td-prow {
    background: var(--td-surface);
    border: 1px solid var(--td-border);
    border-radius: var(--td-radius-xl);
    box-shadow: var(--td-shadow-sm);
    padding: 18px 18px 10px;
}
.td-prow .td-section-head { margin-bottom: 14px; }
.td-viewall {
    color: var(--td-primary);
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.td-viewall:hover { color: var(--td-primary-dark); text-decoration: none; }
.td-viewall .fa { transition: transform var(--td-dur) var(--td-ease); }
[dir="rtl"] .td-viewall .fa { transform: scaleX(-1); }
[dir="rtl"] .td-viewall:hover .fa { transform: scaleX(-1) translateX(3px); }

/* ============================================================
   5. NEWSLETTER STRIP
   ============================================================ */
.td-newsletter {
    background: var(--td-grad-brand);
    border-radius: var(--td-radius-xl);
    padding: 26px 30px;
    box-shadow: var(--td-shadow-brand);
}
.td-newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; color: #fff; }
.td-newsletter-text strong { display: block; font-size: 1.25rem; font-weight: 800; }
.td-newsletter-text span { display: block; opacity: .9; font-size: .9rem; margin-top: 2px; }
.td-newsletter input[type="email"] { border-radius: var(--td-pill) 0 0 var(--td-pill); border: none; min-height: 46px; }
.td-newsletter .btn { border-radius: 0 var(--td-pill) var(--td-pill) 0; background: var(--td-ink); border-color: var(--td-ink); font-weight: 700; }

/* ============================================================
   6. HARMONIZE REUSED mp-* COMPONENTS ON THIS PAGE
   ============================================================ */
.td-home-page .mp-section-title {
    font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em;
    color: var(--td-text); position: relative; padding-inline-start: 14px; margin: 0;
}
.td-home-page .mp-section-title::after {
    content: ''; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%);
    width: 5px; height: 1.05em; border-radius: var(--td-pill); background: var(--td-grad-accent);
}
.td-home-page .mp-flash-deals .mp-section-title { padding-inline-start: 0; }
.td-home-page .mp-flash-deals .mp-section-title::after { display: none; }
.td-home-page .mp-section-viewall { color: var(--td-primary); font-weight: 600; }
.td-home-page .mp-trending-tab.active,
.td-home-page .mp-tab.active {
    background: var(--td-grad-brand); border-color: transparent; color: #fff; box-shadow: var(--td-shadow-brand);
}
.td-home-page .mp-category-section,
.td-home-page .mp-flash-deals,
.td-home-page .mp-trust-bar { border-radius: var(--td-radius-xl); box-shadow: var(--td-shadow-sm); }
.td-home-page .mp-category-icon-circle { box-shadow: var(--td-shadow-sm); }

/* Flash deals: on desktop, stretch the columns to fill the row so there's no
   trailing empty space (the fixed 200px tracks left a gap in RTL when items
   were few). minmax keeps a sensible min width and still scrolls if it overflows. */
@media (min-width: 769px) {
    .td-home-page .mp-flash-deals .artlist-grid {
        grid-auto-columns: minmax(200px, 1fr) !important;
    }
}

/* ============================================================
   RESPONSIVE — tablet
   ============================================================ */
@media (max-width: 1100px) {
    .td-hero { grid-template-columns: 1fr 250px; }
    .td-services-row { grid-template-columns: repeat(8, 1fr); }
    .td-mosaic-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .td-hero { grid-template-columns: 1fr; min-height: auto; }
    .td-hero-side { flex-direction: row; align-items: center; min-height: 120px; }
    .td-hero-side-top { flex-direction: column; align-items: flex-start; padding: 14px; }
    .td-hero-side-img { max-height: 120px; }
    .td-hero-side-foot { background: transparent; }
    .td-adrow { grid-template-columns: 1fr; }
    .td-mosaic-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
    .td-tile--wide { grid-column: span 2; }
    .td-tile--tall { grid-row: span 1; }
    /* keep the full-bleed cover image on mobile; just give the copy more room */
    .td-slide-copy { max-width: 88%; }
}

/* ============================================================
   RESPONSIVE — phone (native-app feel)
   Carousels with snap + momentum, app-shortcut grids, big tap targets.
   ============================================================ */
@media (max-width: 768px) {
    .td-home-page .page-body { padding: 10px 0 0; }
    /* Edge-to-edge sections, but keep inner padding where it reads better */
    .td-home-page > .page-body > section,
    .td-home-page > .page-body > .block,
    .td-home-page .td-section { margin-bottom: 18px; }

    /* Section headers get a side gutter when the section itself is edge-to-edge */
    .td-section-head,
    .td-home-page .mp-section-header { padding-inline: 12px; }
    .td-section-title, .td-home-page .mp-section-title { font-size: 1.12rem; }

    /* ── HERO: full-bleed swipe banner ── */
    .td-hero { gap: 10px; margin: 0 0 16px; }
    .td-hero-main { border-radius: 0; }
    .td-slider-track { min-height: 200px; }
    .td-slide { padding: 0 22px; }
    .td-slide-title { font-size: 1.25rem; }
    .td-slide-price strong { font-size: 1.25rem; }
    .td-slide-cta { padding: 9px 20px; font-size: .85rem; }
    .td-slider-nav { display: none; }            /* swipe instead of arrows */
    .td-hero-side { margin-inline: 12px; border-radius: var(--td-radius-lg); }

    /* ── SERVICE STRIP: app shortcut grid (all 8, 2 rows) ── */
    .td-services { margin-inline: 12px; border-radius: var(--td-radius-lg); padding: 12px 4px; }
    .td-services-row { grid-template-columns: repeat(4, 1fr); gap: 4px; }
    .td-service { padding: 8px 2px; }
    .td-service-ic { width: 46px; height: 46px; font-size: 1.1rem; border-radius: 14px; }
    .td-service-label { font-size: .68rem; }

    /* ── 3 PROMO ADS: horizontal swipe row ── */
    .td-adrow {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-inline: 12px;
    }
    .td-adrow::-webkit-scrollbar { display: none; }
    .td-ad { flex: 0 0 82%; scroll-snap-align: start; min-height: 120px; }

    /* ── PRODUCT GRIDS: clean 2-per-row on mobile (rows + category sections) ── */
    .td-prow { border-radius: 0; border-inline: none; padding: 14px 0 6px; }
    .td-prow .td-section-head { padding-inline: 12px; }

    .td-home-page .td-prow .artlist.artlist-grid,
    .td-home-page .mp-category-section-products .artlist.artlist-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;   /* 2 equal cols; minmax(0,..) stops blowout */
        grid-auto-flow: row !important;
        gap: 10px;
        padding: 4px 12px 6px;
        margin: 0 !important;
        align-items: stretch;
    }
    /* CRITICAL: the .artlist container carries clearfix ::before/::after pseudo-elements.
       Under display:grid those become grid ITEMS — ::before steals the first cell and
       ::after the last cell, which is the phantom "one empty cell in the first & last row".
       Remove them so only the product cards occupy cells. */
    .td-home-page .td-prow .artlist.artlist-grid::before,
    .td-home-page .td-prow .artlist.artlist-grid::after,
    .td-home-page .mp-category-section-products .artlist.artlist-grid::before,
    .td-home-page .mp-category-section-products .artlist.artlist-grid::after {
        content: none !important;
        display: none !important;
    }
    .td-home-page .td-prow .artlist.artlist-grid > .art,
    .td-home-page .mp-category-section-products .artlist.artlist-grid > .art {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        flex: none !important;
    }
    /* The category section drops its side banner on mobile so products use full width */
    .td-home-page .mp-category-section-products { padding: 6px 0 2px; }

    /* ── MOSAIC: 2-col compact ── */
    .td-promomosaic { padding-inline: 12px; }
    .td-mosaic-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 128px; gap: 10px; }
    .td-tile--wide { grid-column: span 2; }
    .td-tile--tall { grid-row: span 1; }
    .td-tile-title { font-size: 1rem; }
    .td-tile--wide .td-tile-title { font-size: 1.15rem; }

    /* ── NEWSLETTER ── */
    .td-newsletter { margin-inline: 12px; border-radius: var(--td-radius-lg); padding: 20px; }
    .td-newsletter-inner { flex-direction: column; align-items: stretch; gap: 14px; }

    /* Bigger tap targets + press feedback on cards/buttons */
    .td-home-page .art .add-to-cart-button,
    .td-home-page .btn { min-height: 40px; }
    .td-home-page .art:active,
    .td-tile:active,
    .td-ad:active,
    .td-service:active { transform: scale(.985); }

    /* Reused mp-* carousels already scroll; just tighten gutters */
    .td-home-page .mp-category-icons,
    .td-home-page .mp-vendors-section,
    .td-home-page .mp-brands-section,
    .td-home-page .mp-trending-section { padding-inline: 12px; }
    .td-home-page .mp-flash-deals { margin-inline: 12px; border-radius: var(--td-radius-lg); }
}

@media (max-width: 480px) {
    .td-slider-track { min-height: 170px; }
    .td-slide-title { font-size: 1.1rem; }
    .td-prow .artlist.artlist-grid > .art {
        flex-basis: 46% !important;
        width: 46% !important;
        max-width: 46% !important;
    }
    .td-services-row { grid-template-columns: repeat(4, 1fr); }
    .td-ad { flex-basis: 86%; }
    .td-mosaic-grid { grid-auto-rows: 112px; }
}

/* ============================================================
   Owner-authored banner / side-banner / custom sections
   (added via the on-page homepage editor). Visitor-facing.
   ============================================================ */
.hp-banner {
    position: relative;
    display: flex;
    align-items: flex-end;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 240px;
}
.hp-banner--full { min-height: 280px; }
.hp-banner--side { min-height: 180px; }
.hp-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .55) 100%);
    pointer-events: none;
}
.hp-banner-inner {
    position: relative;
    z-index: 1;
    padding: 22px 26px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 70%;
}
.hp-banner-title { font-size: 1.7rem; font-weight: 800; line-height: 1.15; }
.hp-banner-sub { font-size: 1rem; opacity: .92; }
.hp-banner-btn {
    align-self: flex-start;
    margin-top: 8px;
    padding: 9px 20px;
    border-radius: 999px;
    background: var(--td-accent, #f0a020);
    color: #1f2937;
    font-weight: 700;
    font-size: .9rem;
}
.hp-banner-link { position: absolute; inset: 0; z-index: 2; }

.hp-custom { width: 100%; }

@media (max-width: 768px) {
    .hp-banner { border-radius: 0; min-height: 200px; }
    .hp-banner-inner { max-width: 100%; padding: 18px 16px; }
    .hp-banner-title { font-size: 1.3rem; }
}

/* ============================================================
   Promoted Professionals row (rendered client-side from the
   Daman.Professionalist module). Visitor-facing.
   ============================================================ */
.hp-pros-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.hp-pro-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 16px 10px;
    border: 1px solid var(--border-color, #e7e9ef);
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hp-pro-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(79, 70, 229, .14); border-color: var(--td-primary, #4f46e5); }
.hp-pro-avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.hp-pro-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hp-pro-ph { color: var(--td-primary, #4f46e5); font-size: 30px; }
.hp-pro-name { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.hp-pro-rating { font-size: .8rem; color: #f0a020; font-weight: 700; }

@media (max-width: 1100px) { .hp-pros-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .hp-pros-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (max-width: 480px) { .hp-pros-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   Recently-viewed: optional localized heading from the editor.
   When set, render our heading and hide the stock block title;
   if the strip ends up empty (cookie-based), drop the heading too.
   ============================================================ */
.hp-hide-inner-title .block-title { display: none; }
.hp-recently:not(:has(.recently-viewed-product-grid)) .td-section-head { display: none; }
