
/* Theme 3 category grid: same geometry in storefront and builder canvas. */
.t3-category-section { container: t3-home-section / inline-size; padding: var(--t3-space-48, 48px) 0; background: var(--t3-home-surface, #fff); }
.t3-content-shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.t3-section-title { display: flex; align-items: center; gap: var(--t3-space-12, 12px); margin: 0 0 var(--t3-space-24, 24px); font-size: 24px; line-height: 29px; font-weight: 700; color: var(--t3-section-text, #212121); overflow-wrap: anywhere; min-width: 0; }
/* Shared title owner, loaded by the storefront and the builder. */
.storefront-home .t3-benefits-heading { display: none; }
.storefront-home .t3-section-title { font-size: 24px; line-height: 29px; font-weight: 700; text-transform: none; }
.storefront-home :is(.t2-product-section__heading, .t2-brands__heading, .t2-home-banners__heading) .t3-section-title { margin: 0; }
.storefront-home :is(.t2-product-section__header, .t2-brands__header):not(:has(h2, p, button:not([disabled]))) { display: none; }
.t3-section-title::before { content: ''; width: 6px; height: 28px; border-radius: 3px; background: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); flex-shrink: 0; }
.t3-category-grid { display: grid; gap: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.t3-category-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.t3-category-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.t3-category-card { display: flex; flex-direction: column; border: 1px solid var(--t3-section-border, #e0e0e0); border-radius: 8px; overflow: hidden; color: var(--t3-section-text, #212121); background: var(--t3-home-surface, #fff); text-decoration: none; min-width: 0; }
.t3-category-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.t3-category-card span { padding: 16px; text-align: center; font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
/* Without an image the card keeps the same media slot, so every card in a row
   shares one composition: media on top, label below. */
.t3-category-card__placeholder { display: flex; align-items: center; justify-content: center; height: 160px; background: var(--t3-section-muted, #f5f5f5); color: var(--t3-section-icon, #9e9e9e); }
.t3-category-card__placeholder svg { width: 32px; height: 32px; }
@container t3-home-section (max-width: 767.98px) {
    .t3-content-shell { width: calc(100% - 32px); }

    .t3-category-grid, .t3-category-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .t3-category-card img, .t3-category-card__placeholder { height: 128px; }
    .t3-section-title { font-size: 20px; line-height: 26px; margin-bottom: 16px; }
    .t3-section-title::before { width: 4px; height: 20px; border-radius: 2px; }
}

/* Interaction states, shared by the store and the builder preview. Hover only
   where the device can hover; keyboard focus gets an equivalent cue. Same
   language as the product card: accent border and a soft shadow, no lift and
   no image zoom, so nothing in the row moves. */
.t3-category-card { transition: border-color .18s ease, box-shadow .18s ease; }
.t3-category-card span { transition: color .18s ease; }
.t3-category-card:focus-visible { outline: 2px solid var(--t3-color-focus, var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b)))); outline-offset: 2px; border-color: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); }
.t3-category-card:focus-visible span { color: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); }
@media (hover: hover) {
    .t3-category-card:hover { border-color: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); box-shadow: 0 8px 8px rgb(0 0 0 / .05); }
    .t3-category-card:hover span { color: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); }
}

.t3-store-visit { container: t3-visit-section / inline-size; padding: var(--t3-space-48, 48px) 0; background: var(--t3-visit-bg, #f5f5f5); color: var(--t3-section-text, #212121); }
.t3-store-visit__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 40px; }
.t3-store-visit__image { display: block; width: 100%; height: 320px; object-fit: cover; border-radius: 12px; }
.t3-store-visit__grid:not(:has(> .t3-store-visit__image)) { grid-template-columns: minmax(0, 1fr); }
.t3-store-visit__content { display: flex; flex-direction: column; gap: var(--t3-space-24, 24px); min-width: 0; }
.t3-store-visit .t3-section-title { margin: 0; }
.t3-store-visit__details { display: flex; flex-direction: column; gap: 16px; }
.t3-store-visit__details p { display: flex; align-items: flex-start; gap: 12px; margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.t3-store-visit__details a { color: inherit; text-decoration: none; }
.t3-store-visit svg { width: 18px; height: 18px; flex-shrink: 0; }
.t3-store-visit__details svg { color: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); }
.t3-store-visit__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.t3-store-visit__actions a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 6px; color: white; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; }
.t3-store-visit__directions { background: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); }
.t3-store-visit__whatsapp { background: #14804a; }
.t3-store-visit__actions a { transition: background-color .18s ease, box-shadow .18s ease; }
.t3-store-visit__actions a:focus-visible { outline: 2px solid var(--t3-section-text, #212121); outline-offset: 2px; }
@media (hover: hover) {
    .t3-store-visit__actions a:hover { color: #fff; box-shadow: 0 6px 14px rgb(0 0 0 / .16); }
    .t3-store-visit__directions:hover { background: var(--t3-section-accent-hover, var(--t3-color-primary-hover, #b51717)); }
    .t3-store-visit__whatsapp:hover { background: #0f6b3d; }
}
@container t3-visit-section (max-width: 767.98px) {
    .t3-store-visit__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .t3-store-visit__image { height: 240px; }
    .t3-store-visit__actions a { padding: 12px 16px; border-radius: 4px; }
}

@media (max-width: 991.98px) {
  .storefront-home .t3-benefits-heading { display: flex; }
  .storefront-home :is(.t2-product-section__header, .t2-brands__header):not(:has(h2, p)) { display: none; }
  .storefront-home .t3-section-title { font-size: 20px; line-height: 26px; }
  .storefront-home .t3-section-title::before { width: 4px; height: 20px; border-radius: 2px; }
  .storefront-home :is(.t3-category-section, .t3-store-visit) { padding-block: var(--t3-space-24, 24px); }
  .storefront-home :is(.t3-category-section, .t2-home-banners, .t2-brands, .t2-benefits) .t3-section-title { margin-bottom: var(--t3-space-16, 16px); }
  .storefront-home :is(.t2-brands__heading, .t2-home-banners__heading) .t3-section-title { margin: 0; }
  .storefront-home :is(.t2-brands__header, .t2-home-banners__header) { margin-bottom: var(--t3-space-16, 16px); }
  .storefront-home .t3-store-visit__content { gap: var(--t3-space-16, 16px); }
}
.dashboard-builder-preview--tema3[data-preview-device="mobile"] :is(.t3-category-section, .t3-store-visit) { padding-block: 24px; }
.dashboard-builder-preview--tema3[data-preview-device="mobile"] .t3-section-title { font-size: 20px; line-height: 26px; margin-bottom: 16px; }
.dashboard-builder-preview--tema3[data-preview-device="mobile"] .t3-section-title::before { width: 4px; height: 20px; border-radius: 2px; }
.dashboard-builder-preview--tema3[data-preview-device="mobile"] .t3-store-visit__content { gap: 16px; }

/* Optional eyebrow + title header (benefits, category grid, store visit): the same
   rhythm as the product and brand headers, owned once for the store and the builder. */
.t3-section-heading { display: flex; flex-direction: column; align-items: flex-start; gap: var(--t3-space-4, 4px); min-width: 0; margin: 0 0 var(--t3-space-24, 24px); }
.t3-section-eyebrow { margin: 0; color: var(--t3-section-accent, var(--t3-color-primary, var(--db-t3-primary, #cc1b1b))); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; overflow-wrap: anywhere; }
:is(.storefront-home, .dashboard-builder-preview--tema3) .t3-section-heading .t3-section-title { margin: 0; }
.t3-store-visit__content > .t3-section-heading { margin: 0; }
@media (max-width: 991.98px) {
  .t3-section-heading { margin-bottom: var(--t3-space-16, 16px); }
  .t3-section-eyebrow { font-size: 11px; line-height: 14px; }
}
/* The tablet canvas is 1024px wide, which the store renders with the desktop rhythm. */
.dashboard-builder-preview--tema3[data-preview-device="mobile"] .t3-section-heading { margin-bottom: 16px; }
.dashboard-builder-preview--tema3[data-preview-device="mobile"] .t3-section-eyebrow { font-size: 11px; line-height: 14px; }
.dashboard-builder-preview--tema3 .t3-store-visit__content > .t3-section-heading { margin: 0; }

/* Benefits bar dividers. Only an explicit choice carries data-benefits-lines;
   legacy stores keep the theme's own presentation (no lines in Tema 3). */
.t2-benefits[data-benefits-lines] { border-top: 0; border-bottom: 0; }
.t2-benefits:is([data-benefits-lines="top"], [data-benefits-lines="both"]) { border-top: 1px solid var(--t3-benefits-line-color, var(--t3-color-border, var(--db-t3-border, #e0e0e0))); }
.t2-benefits:is([data-benefits-lines="bottom"], [data-benefits-lines="both"]) { border-bottom: 1px solid var(--t3-benefits-line-color, var(--t3-color-border, var(--db-t3-border, #e0e0e0))); }

/* Newsletter markup is shared by the tenant storefront and its builder preview. */
.t3-newsletter { container: t3-newsletter / inline-size; padding: 36px 0; background: var(--t3-color-primary, var(--db-t3-primary, #cc1b1b)); color: #fff; }
.t3-newsletter .t2-footer__newsletter { display: flex; align-items: center; gap: 24px; max-width: none; margin: 0; text-align: left; }
.t3-newsletter .t2-footer__newsletter-copy { flex: 1; min-width: 0; }
.t3-newsletter .newsletter-title { color: #fff; font-size: 20px; line-height: 24px; font-weight: 700; margin: 0 0 4px; }
.t3-newsletter .newsletter-subtitle { color: #fff; font-size: 12px; line-height: 16px; margin: 0; }
.t3-newsletter .t2-footer__newsletter-form { position: relative; flex: 0 1 651px; min-width: 0; margin: 0; max-width: none; }
.t3-newsletter .t2-footer__newsletter-form-row { display: flex; gap: 12px; }
.t3-newsletter .form-control { height: 44px; min-height: 44px; min-width: 0; border: 0; border-radius: 6px; padding: 0 16px; font-size: 14px; background: #fff; color: #212121; }
.t3-newsletter input[name=customer_name] { flex: 0 1 220px; width: 220px; }
.t3-newsletter input[name=customer_email] { flex: 1 1 260px; width: 260px; }
.t3-newsletter .t2-footer__newsletter-submit { height: 44px; min-height: 44px; width: auto; border: 0; border-radius: 6px; padding: 0 24px; font-size: 14px; font-weight: 700; white-space: nowrap; background: #fff; color: var(--t3-color-primary, var(--db-t3-primary, #cc1b1b)); }
/* The container is the primary color, so the hover never fills the button with
   it: a darker text on a light neutral keeps the button legible on any tenant
   color (#212121 on #f5f5f5 is 15.4:1). */
.t3-newsletter .t2-footer__newsletter-submit { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.t3-newsletter .t2-footer__newsletter-submit:is(:focus, :active) { background: #f5f5f5; color: #212121; }
.t3-newsletter .t2-footer__newsletter-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: none; }
@media (hover: hover) {
    .t3-newsletter .t2-footer__newsletter-submit:hover { background: #f5f5f5; color: #212121; box-shadow: 0 4px 12px rgb(0 0 0 / .18); }
}
.t3-newsletter .t2-footer__newsletter-disclaimer { position: absolute; top: 100%; margin: 8px 0 0; color: #fff; font-size: 10px; line-height: 14px; }
.t3-newsletter .t2-footer__newsletter-disclaimer a { color: inherit; }
@container t3-newsletter (max-width: 1023.98px) {
    .t3-newsletter .t3-content-shell { width: calc(100% - 48px); }
    .t3-newsletter .form-control, .t3-newsletter .t2-footer__newsletter-submit { height: 40px; min-height: 40px; }
    .t3-newsletter .t2-footer__newsletter { flex-direction: column; align-items: stretch; gap: 16px; }
    .t3-newsletter .t2-footer__newsletter-copy { flex: none; }
    .t3-newsletter .t2-footer__newsletter-form { flex: none; width: 100%; }
    .t3-newsletter .t2-footer__newsletter-form-row { flex-direction: column; gap: 8px; }
    .t3-newsletter .form-control, .t3-newsletter input[name=customer_name], .t3-newsletter input[name=customer_email] { flex: none; width: 100%; }
    .t3-newsletter .t2-footer__newsletter-disclaimer { position: static; }
}
@container t3-newsletter (max-width: 767.98px) {
    .t3-newsletter .form-control,
    .t3-newsletter .t2-footer__newsletter-submit { border-radius: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .t3-category-card, .t3-category-card span, .t3-store-visit__actions a, .t3-newsletter .t2-footer__newsletter-submit { transition: none; }
    .t3-store-visit__actions a:hover { transform: none; }
}

/* Dark custom/page backgrounds set --benefits-title-color and --benefits-text-color.
   Mobile cards stay on white, so their copy keeps the theme ink. */
.storefront-home .t2-benefits .t2-benefits__title,
.storefront-home .t2-benefits :is(.t3-benefits-heading, .t3-section-title) {
  color: var(--benefits-title-color, var(--t2-color-text, #212121));
}
.storefront-home .t2-benefits .t2-benefits__text {
  color: var(--benefits-text-color, var(--t3-color-text-secondary, #757575));
}
@media (max-width: 991.98px) {
  .storefront-home .t2-benefits .t2-benefits__item .t2-benefits__title {
    color: var(--t3-color-text, #212121);
  }
  .storefront-home .t2-benefits .t2-benefits__item .t2-benefits__text {
    color: var(--t3-color-text-secondary, #757575);
  }
}
