/* ==========================================================================
   Home Templates — design system
   Escopo: body.home-store-template (não afeta layout legado)
   ========================================================================== */

body.home-store-template {
    --home-surface: #ffffff;
    --home-border: #e8ecf1;
    --home-border-soft: #f1f5f9;
    --home-text: #1e293b;
    --home-text-muted: #64748b;
    --home-radius: 12px;
    --home-radius-lg: 18px;
    --home-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --home-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    --home-nav-height: 52px;
}

/* ---- Root & promo bar ---- */
.home-template-root {
    background: var(--home-bg, #f8f9fa);
}

.home-top-bar {
    font-size: 12px;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-promo-strip__inner {
    text-align: center;
    padding: 9px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

body.home-store-template .home-top-bar a {
    text-decoration: none;
    transition: opacity 0.2s;
}

body.home-store-template .home-top-bar a:hover {
    opacity: 0.85;
}

/* Faixa promocional — banner estreito 150px */
.home-promo-strip--banner {
    padding: 0;
    border-bottom: none;
    background: transparent;
    line-height: 0;
}

.home-promo-strip--banner .home-promo-strip__inner--banner {
    padding: 0;
    max-width: 100%;
}

.home-promo-strip__banner-link,
.home-promo-strip__banner-wrap {
    display: block;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.home-promo-strip--banner img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 767px) {
    .home-promo-strip__banner-link,
    .home-promo-strip__banner-wrap,
    .home-promo-strip--banner img {
        height: 100px;
    }
}

/* ---- Trust strip ---- */
.home-trust-strip {
    background: var(--home-surface);
    border-bottom: 1px solid var(--home-border);
    margin-bottom: 0;
}

.home-trust-pills__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px 20px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.home-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--home-text-muted);
    white-space: nowrap;
}

.home-trust-pill i {
    color: var(--home-primary, #ff9800);
    font-size: 13px;
}

/* ---- Department navigation (horizontal) ---- */
body.home-store-template .home-dept-nav {
    background: var(--home-surface);
    border-bottom: 1px solid var(--home-border);
    box-shadow: var(--home-shadow-sm);
    position: sticky;
    top: var(--home-nav-sticky-top, 0);
    z-index: 9998;
    min-height: auto;
    padding: 0;
    margin-bottom: 0;
    overflow: visible;
}

body.home-store-template .horizontal-nav.home-dept-nav .container.home-dept-nav__viewport {
    display: block;
    max-width: var(--home-store-max-width, 1280px);
    margin: 0 auto;
    padding: 0 clamp(12px, 2vw, 20px);
    overflow: visible;
}

body.home-store-template .home-dept-nav__track {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    align-content: flex-start;
    gap: 4px 2px;
    width: 100%;
    padding: 6px 0;
    justify-content: flex-start;
    overflow: visible;
}

body.home-store-template .home-dept-item {
    flex: 0 0 auto;
    position: relative;
}

body.home-store-template .home-dept-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    min-height: var(--home-nav-height, 44px);
    max-width: none;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    transform: none !important;
}

body.home-store-template .home-dept-link:hover,
body.home-store-template .home-dept-link:focus-visible,
body.home-store-template .home-dept-item:hover .home-dept-link,
body.home-store-template .home-dept-item.is-open .home-dept-link,
body.home-store-template .home-dept-item.is-active .home-dept-link {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 8%, transparent) !important;
    border-bottom-color: var(--home-primary, #ff9800);
    box-shadow: none !important;
    transform: none !important;
}

body.home-store-template .home-dept-link:active {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 12%, transparent) !important;
    transform: none !important;
}

body.home-store-template .home-dept-link:visited .home-dept-name {
    color: var(--home-text) !important;
}

body.home-store-template .home-dept-name,
body.home-store-template .drop-down__name.home-dept-name {
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--home-text) !important;
    font-family: 'Roboto', sans-serif;
    line-height: 1.25;
    margin-right: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: 11rem;
}

body.home-store-template .home-dept-link .home-dept-icon,
body.home-store-template .home-dept-link .cat-icon--tint,
body.home-store-template .home-dept-link .cat-icon--emoji,
body.home-store-template .home-dept-link .cat-icon--img {
    flex-shrink: 0;
}

body.home-store-template .home-dept-item.is-active .home-dept-name {
    color: var(--home-primary, #ff9800) !important;
    font-weight: 700;
}

body.home-store-template .home-dept-icon {
    flex-shrink: 0;
    --cat-icon-size: 22px;
    filter: none !important;
}

body.home-store-template .home-dept-icon--fallback {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--home-border-soft);
    border-radius: 8px;
    color: var(--home-primary, #ff9800);
    font-size: 11px;
}

body.home-store-template .home-dept-chevron {
    font-size: 9px;
    color: var(--home-text-muted);
    margin-left: 2px;
    transition: transform 0.2s;
}

body.home-store-template .home-dept-item:hover .home-dept-chevron,
body.home-store-template .home-dept-item.is-open .home-dept-chevron {
    transform: rotate(180deg);
    color: var(--home-primary, #ff9800);
}

/* Dropdown panel */
body.home-store-template .home-dept-panel {
    position: absolute;
    left: 0;
    top: 100%;
    transform: translateY(4px);
    min-width: min(300px, 90vw);
    max-width: 360px;
    max-height: min(420px, 70vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    box-shadow: var(--home-shadow);
    padding: 0;
    margin-top: 0;
    z-index: 10050;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

body.home-store-template .home-dept-panel.is-fixed {
    position: fixed;
    top: auto;
    left: auto;
}

body.home-store-template .home-dept-panel::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

body.home-store-template .home-dept-item:hover .home-dept-panel,
body.home-store-template .home-dept-item.is-open .home-dept-panel,
body.home-store-template .home-dept-item:focus-within .home-dept-panel {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
    transform: translateY(0);
}

body.home-store-template .home-dept-panel.is-fixed {
    transform: none;
}

body.home-store-template .drop-down:hover .drop-down__menu-box.home-dept-panel {
    transform: translateY(0);
}

body.home-store-template .home-dept-panel__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.home-store-template .home-dept-panel__sublist .drop-down__item a {
    padding-left: 28px !important;
    font-size: 12px;
    color: var(--home-text-muted, #64748b);
}

/* Neutraliza regras legadas do style.css no template da loja */
body.home-store-template .horizontal-nav .drop-down__button {
    min-height: var(--home-nav-height, 48px);
    height: auto;
    border-radius: 0;
}

body.home-store-template .horizontal-nav .container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
}

body.home-store-template .home-dept-panel:before,
body.home-store-template .drop-down__menu-box:before {
    display: none;
}

body.home-store-template .home-dept-panel__header {
    padding: 14px 16px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--home-text-muted);
    border-bottom: 1px solid var(--home-border-soft);
    background: #fafbfc;
}

body.home-store-template .home-dept-panel__list {
    overflow-y: auto;
    flex: 1;
    padding: 8px 0 !important;
    margin: 0;
}

body.home-store-template .home-dept-panel__all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--home-primary, #ff9800);
    text-decoration: none;
    border-top: 1px solid var(--home-border-soft);
    background: #fafbfc;
    transition: background 0.2s;
}

body.home-store-template .home-dept-panel__all:hover {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 10%, #fff);
}

body.home-store-template .drop-down__item {
    font-size: 13px;
    padding: 9px 16px;
    padding-right: 16px;
    text-transform: none;
    font-weight: 500;
    color: var(--home-text);
    border-bottom: none;
}

body.home-store-template .drop-down__item:hover {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 8%, transparent);
    color: var(--home-primary, #ff9800);
}

body.home-store-template .drop-down__item:before {
    display: none !important;
}

body.home-store-template .drop-down__item a {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.home-store-template .drop-down__item-label {
    flex: 1;
    min-width: 0;
}

body.home-store-template .drop-down__item-icon,
body.home-store-template .drop-down__item-icon--fallback {
    position: static;
    transform: none;
    flex-shrink: 0;
}

/* ---- Section headers ---- */
.home-section-header {
    margin-bottom: 1.25rem;
}

.home-section-header--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.home-section-title {
    font-weight: 800;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin: 0;
    color: var(--home-secondary, #2c3e50);
    letter-spacing: -0.02em;
}

.home-section-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--home-text-muted);
}

.home-section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--home-primary, #ff9800);
    text-decoration: none;
    white-space: nowrap;
    transition: gap 0.2s;
}

.home-section-link:hover {
    gap: 10px;
    color: var(--home-primary, #ff9800);
}

/* ---- Banners ---- */
.home-banner-section {
    padding: 20px 0;
}

.home-banner-main {
    padding-top: 24px;
    padding-bottom: 8px;
}

.home-banner-middle {
    padding: 12px 0;
}

.home-banner-carousel .carousel-inner {
    border-radius: var(--home-radius-lg);
    overflow: hidden;
    box-shadow: var(--home-shadow);
    background: var(--home-border-soft);
    height: 100%;
}

.home-banner-carousel .carousel-item {
    height: 100%;
}

.home-banner-main .carousel-inner {
    min-height: 280px;
    aspect-ratio: 21 / 7;
}

.home-banner-middle .carousel-inner {
    min-height: 100px;
    aspect-ratio: 21 / 3;
}

.home-banner-link {
    display: block;
    line-height: 0;
    height: 100%;
}

.home-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-banner-img--mobile {
    display: block;
}

.home-banner-img--desktop {
    display: none;
}

@media (min-width: 768px) {
    .home-banner-img--mobile {
        display: none;
    }

    .home-banner-img--desktop {
        display: block;
    }
}

body.home-store-template .home-banner-carousel .carousel-control-prev,
body.home-store-template .home-banner-carousel .carousel-control-next {
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transition: opacity 0.25s;
    margin: 0 12px;
}

body.home-store-template .home-banner-carousel:hover .carousel-control-prev,
body.home-store-template .home-banner-carousel:hover .carousel-control-next {
    opacity: 1;
}

body.home-store-template .home-banner-carousel .carousel-control-prev-icon,
body.home-store-template .home-banner-carousel .carousel-control-next-icon {
    filter: invert(1) brightness(0.3);
    width: 18px;
    height: 18px;
}

/* ---- Category cards ---- */
.home-categories-section {
    padding: 28px 0 36px;
}

.home-category-card-inner {
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    box-shadow: var(--home-shadow-sm);
}

.home-category-card-cover {
    height: 110px;
    overflow: hidden;
    background: var(--home-border-soft);
    flex-shrink: 0;
}

.home-category-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.home-category-card:hover .home-category-card-cover img {
    transform: scale(1.05);
}

.home-category-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.home-category-card-icon--sm {
    --cat-icon-size: 24px;
}

.home-category-card:hover .home-category-card-inner {
    transform: translateY(-4px);
    box-shadow: var(--home-shadow);
    border-color: color-mix(in srgb, var(--home-primary, #ff9800) 35%, var(--home-border));
}

.home-category-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.home-category-card-icon {
    flex-shrink: 0;
    --cat-icon-size: 32px;
}

.home-category-card-icon-placeholder {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--home-primary, #ff9800) 12%, #fff);
    border-radius: 10px;
    color: var(--home-primary, #ff9800);
    flex-shrink: 0;
}

.home-category-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--home-text);
    line-height: 1.35;
    margin: 0;
}

.home-category-subs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-category-sub-pill {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    background: var(--home-border-soft);
    border-radius: 999px;
    color: var(--home-text-muted);
    line-height: 1.3;
}

.home-category-sub-pill--more {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 15%, #fff);
    color: var(--home-primary, #ff9800);
    font-weight: 700;
}

.home-category-card-empty {
    font-size: 12px;
    color: var(--home-text-muted);
    font-style: italic;
}

.home-category-card-cta {
    margin-top: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--home-primary, #ff9800);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.home-category-card:hover .home-category-card-cta {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Product vitrine ---- */
.home-vitrine-section {
    padding: 28px 0 36px;
}

body.home-store-template .home-vitrine-section .product-grid {
    gap: 16px;
}

body.home-store-template .home-vitrine-section .product-card {
    border-radius: var(--home-radius-lg);
    border: 1px solid var(--home-border);
    overflow: hidden;
    box-shadow: var(--home-shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s;
}

body.home-store-template .home-vitrine-section .product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--home-shadow);
}

body.home-store-template .home-vitrine-section .section-title {
    display: none;
}

/* ---- Scroll chips (menu horizontal em chips) ---- */
.home-categories-scroll {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    align-content: flex-start;
    gap: 8px;
    overflow: visible;
    padding-bottom: 2px;
}

.home-categories-scroll--wrap {
    width: 100%;
}

.home-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--home-surface, #fff);
    border: 1px solid var(--home-border, #e8ecf1);
    border-radius: 999px;
    text-decoration: none;
    color: var(--home-text, #1e293b);
    box-shadow: var(--home-shadow-sm, 0 2px 8px rgba(15, 23, 42, 0.04));
    flex: 0 1 auto;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s;
    max-width: 100%;
}

.home-category-chip__label {
    line-height: 1.25;
    white-space: normal;
}

.home-category-chip-icon,
.home-category-chip-icon--fallback {
    flex-shrink: 0;
    --cat-icon-size: 20px;
}

.home-category-chip-icon--fallback {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--home-border-soft);
    border-radius: 8px;
    color: var(--home-primary, #ff9800);
    font-size: 11px;
}

.home-category-chip:hover {
    border-color: var(--home-primary, #ff9800);
    color: var(--home-primary, #ff9800);
}

.home-product-carousel-item {
    min-width: 220px;
    flex: 0 0 auto;
}

/* ---- Preview badge ---- */
.home-preview-badge {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1c1e;
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    z-index: 9999;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ---- Vertical + horizontal layout shell ---- */
body.home-store-template .home-layout-vertical {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 20px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px clamp(12px, 2vw, 28px) 32px;
    align-items: start;
    box-sizing: border-box;
}

body.home-store-template .home-sidebar {
    position: sticky;
    top: calc(var(--home-nav-sticky-top, 132px) + 8px);
    max-height: calc(100vh - var(--home-nav-sticky-top, 132px) - 24px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.home-store-template .home-sidebar:has(.home-sidebar-pro) {
    overflow: visible;
}

body.home-store-template .home-main-content {
    min-width: 0;
}

body.home-store-template .home-mobile-dept {
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    overflow: hidden;
    background: var(--home-surface);
}

body.home-store-template .home-mobile-dept .home-dept-nav {
    position: relative;
    top: auto;
}

body.home-store-template .home-vertical-menu {
    background: var(--home-surface);
    border-radius: var(--home-radius-lg);
    border: 1px solid var(--home-border);
    box-shadow: var(--home-shadow-sm);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--home-nav-sticky-top, 132px) - 24px);
    overflow: hidden;
}

body.home-store-template .home-vertical-menu.home-sidebar-pro {
    overflow: visible;
}

.home-sidebar-panel__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--home-border-soft);
    background: linear-gradient(180deg, color-mix(in srgb, var(--home-primary, #ff9800) 8%, #fff), var(--home-surface));
    flex-shrink: 0;
}

.home-sidebar-panel__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--home-primary, #ff9800) 15%, #fff);
    color: var(--home-primary, #ff9800);
    font-size: 16px;
}

.home-sidebar-panel__titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-sidebar-panel__titles strong {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--home-text);
}

.home-sidebar-panel__titles span {
    font-size: 12px;
    color: var(--home-text-muted);
}

.home-sidebar-panel__nav {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 8px 0;
}

.home-sidebar-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-sidebar-dept__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    color: var(--home-text, #1e293b);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    border-bottom: 1px solid var(--home-border-soft, #f1f5f9);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.home-sidebar-pro .home-sidebar-dept__link:hover {
    padding-left: 20px;
    transform: translateX(3px);
}

.home-sidebar-dept__link--sub {
    font-size: 12px;
    font-weight: 500;
    padding-top: 10px;
    padding-bottom: 10px;
    background: #fafbfc;
}

.home-sidebar-dept__link:hover {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 8%, transparent);
    color: var(--home-primary, #ff9800);
}

.home-sidebar-pro .home-sidebar-dept__link:hover {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 8%, transparent);
    color: var(--home-primary, #ff9800);
}

.home-sidebar-dept__icon {
    flex-shrink: 0;
    --cat-icon-size: 24px;
}

.home-sidebar-dept__icon--fallback {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--home-border-soft);
    color: var(--home-primary, #ff9800);
    font-size: 12px;
}

.home-sidebar-dept__label {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.home-sidebar-dept__count {
    flex-shrink: 0;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--home-border-soft);
    color: var(--home-text-muted);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-sidebar-dept__subs {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 220px;
    max-width: 300px;
    background: var(--home-surface, #fff);
    border: 1px solid var(--home-border, #e8ecf1);
    border-radius: 0 var(--home-radius-lg, 12px) var(--home-radius-lg, 12px) 0;
    box-shadow: var(--home-shadow-md, 0 8px 24px rgba(0,0,0,.12));
    z-index: 100;
    padding: 6px 0;
    list-style: none;
    margin: 0;
}

.home-sidebar-dept {
    position: relative;
}

.home-sidebar-dept.has-submenu:hover > .home-sidebar-dept__subs {
    display: block;
}

.home-sidebar-dept__subs .home-sidebar-dept {
    border-bottom: 1px solid var(--home-border-soft, #f1f5f9);
}

.home-sidebar-dept__subs .home-sidebar-dept:last-child {
    border-bottom: none;
}

.home-sidebar-dept__subs .home-sidebar-dept__link {
    font-size: 12px;
    font-weight: 500;
    padding: 10px 16px;
    background: transparent;
    gap: 8px;
}

.home-sidebar-dept__subs .home-sidebar-dept__link:hover {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 8%, transparent);
    color: var(--home-primary, #ff9800);
}

.home-sidebar-panel__footer {
    border-top: 1px solid var(--home-border);
    margin-top: 4px;
}

.home-sidebar-panel__all {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--home-primary, #ff9800) !important;
    background: color-mix(in srgb, var(--home-primary, #ff9800) 6%, #fff) !important;
}

body.home-store-template .home-vertical-menu .vertical-menu-btn {
    flex-shrink: 0;
    border-radius: var(--home-radius-lg) var(--home-radius-lg) 0 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--home-primary, #ff9800) 10%, #fff);
    border: none;
    color: var(--home-text);
}

body.home-store-template .home-vertical-menu .vertical-menu {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: none;
}

body.home-store-template .home-vertical-menu .vertical-menu ul {
    padding: 8px 0;
}

body.home-store-template .home-vertical-menu .vertical-menu a {
    font-size: 13px;
    padding: 10px 16px;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

body.home-store-template .home-vertical-menu .vertical-menu a:hover {
    background: color-mix(in srgb, var(--home-primary, #ff9800) 8%, transparent);
    color: var(--home-primary, #ff9800);
}

/* Submenus are now flyout — see .home-sidebar-dept__subs rules above */

body.home-menu-vertical .home-dept-nav,
body.home-tpl-side_market .home-dept-nav {
    display: none;
}

body.home-menu-vertical .home-layout-vertical,
body.home-tpl-side_market .home-layout-vertical {
    display: grid;
}

.home-nav-shell {
    background: transparent;
}

.home-category-banner {
    width: 100%;
    max-width: 900px;
    height: 150px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--home-radius);
    box-shadow: var(--home-shadow-sm);
}

.home-category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Global header tweaks when template active ---- */
body.home-store-template .top-strip {
    display: none;
}

body.home-cab-compacto .main-header {
    padding: 8px 0;
}

body.home-cab-compacto .main-header .action-item div {
    display: none;
}

body.home-cab-destaque_busca .main-header .search-bar {
    flex: 2;
    max-width: none;
}

body.home-cab-minimalista .main-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

body.home-cab-minimalista .main-header .logo {
    justify-self: center;
    order: 2;
}

body.home-cab-minimalista .main-header .search-bar {
    order: 3;
    grid-column: 1 / -1;
}

body.home-cab-tecnico .main-header {
    background: #081a45;
    color: #fff;
}

body.home-cab-tecnico .main-header a,
body.home-cab-tecnico .main-header .action-item {
    color: #fff;
}

body.home-cab-tecnico .search-bar {
    border-color: rgba(255, 255, 255, 0.2);
}

body.home-cab-confianca .top-bar {
    background: #ecfeff;
    color: #155e75;
}

body.home-cab-hero_glass .top-bar {
    display: none;
}

/* bottom nav padding — ver home-templates-themes.css */

/* ---- Template-specific accents ---- */
.home-template-ofertas {
    --home-accent-bg: linear-gradient(180deg, #fffbf5 0%, var(--home-bg, #f8f9fa) 120px);
}

.home-template-ofertas.home-template-root {
    background: var(--home-accent-bg);
}

.home-template-ofertas .home-flash-section {
    background: linear-gradient(180deg, #fff7ed, #fff);
}

.home-template-marketplace .home-banner-main {
    margin-top: 0;
}

.home-template-tecnico .home-section-title {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.1rem;
}

body.home-tpl-tecnico .home-dept-nav {
    background: #081a45;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.home-tpl-tecnico .home-dept-name {
    color: #e2e8f0 !important;
}

body.home-tpl-tecnico .home-dept-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-bottom-color: #60a5fa;
}

.home-template-minimalista .product-card {
    box-shadow: none;
    border: 1px solid var(--home-border);
}

.home-template-premium {
    background: #111;
    color: #eee;
}

.home-template-premium .product-card {
    background: #1a1a1a;
    border-color: #333;
}

.home-template-premium .home-category-card-inner {
    background: #1a1a1a;
    border-color: #333;
    color: #e2e8f0;
}

.home-template-mobile .home-categories-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.home-template-mobile .btn-buy,
.home-template-mobile .btn-details {
    min-height: 44px;
}

/* ---- Mega menu (model 02) ---- */
.home-secondary-nav {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 0 0 var(--home-radius-lg) var(--home-radius-lg);
    margin-bottom: 12px;
}

.home-secondary-nav__inner {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 11px 0;
    overflow-x: auto;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.home-secondary-nav__inner a {
    color: inherit;
    text-decoration: none;
    opacity: 0.88;
}

.home-secondary-nav__inner a:hover {
    color: var(--home-primary, #ff9800);
    opacity: 1;
}

.home-menu-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    padding: 9px 13px;
    background: var(--home-surface);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

.home-menu-chip--dark {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.home-mega-nav {
    margin-bottom: 12px;
}

.home-mega-nav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-weight: 700;
    font-size: 14px;
}

.home-mega-dept__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    padding: 6px 4px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.home-mega-dept__link:hover {
    color: var(--home-primary, #ff9800);
}

.home-mega-dept__icon,
.home-mega-dept__icon--fallback {
    flex-shrink: 0;
    --cat-icon-size: 18px;
}

.home-mega-dept__icon--fallback {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--home-border-soft, #f1f5f9);
    border-radius: 6px;
    color: var(--home-primary, #ff9800);
    font-size: 10px;
}

.home-mega-title__icon,
.home-mega-title__icon--fallback {
    flex-shrink: 0;
}

.home-mega-nav__item {
    position: relative;
}

.home-mega-nav__item.has-mega:hover .home-mega-panel {
    display: grid;
}

.home-mega-panel {
    display: none;
    position: absolute;
    left: 0;
    top: 52px;
    width: min(920px, 96vw);
    padding: 22px;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 22px;
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    box-shadow: var(--home-shadow);
    z-index: 30;
}

.home-mega-title {
    font-weight: 900;
    margin-bottom: 11px;
}

.home-mega-links {
    display: grid;
    gap: 9px;
    font-size: 14px;
}

.home-mega-links a {
    color: #374151;
    text-decoration: none;
}

.home-mega-links a:hover {
    color: var(--home-primary, #ff9800);
}

.home-mega-link--depth-1 { padding-left: 12px; font-size: 13px; }
.home-mega-link--depth-2 { padding-left: 24px; font-size: 12px; }
.home-mega-link--depth-3 { padding-left: 36px; font-size: 12px; }

.home-mega-card {
    background: linear-gradient(135deg, #111827, #374151);
    color: #fff;
    border-radius: 14px;
    padding: 18px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-mega-card__cta {
    display: inline-block;
    border-radius: 999px;
    background: #ffe600;
    color: #111;
    padding: 9px 13px;
    font-weight: 900;
    text-decoration: none;
    width: fit-content;
}

/* Quick nav (supermercado) */
.home-quick-nav {
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius-lg);
    overflow: hidden;
    background: var(--home-surface);
    margin-bottom: 12px;
}

.home-quick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}

.home-quick-link {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-right: 1px solid var(--home-border);
    font-size: 12px;
    font-weight: 900;
    color: #475569;
    text-decoration: none;
}

.home-quick-link:last-child {
    border-right: 0;
}

.home-quick-link strong {
    font-size: 20px;
    line-height: 1;
}

.home-quick-link:hover {
    background: #f8fafc;
    color: var(--home-primary, #ff9800);
}

/* Bottom nav — ver home-templates-themes.css */

/* Hero glass */
.home-hero-glass-wrap {
    position: relative;
    margin-top: -20px;
}

.home-template-premium .home-banner-main {
    margin-top: 0;
    border-radius: 22px;
    overflow: hidden;
}

.home-template-premium .home-banner-main .carousel-inner {
    min-height: 280px !important;
}

/* Dark theme */
body[data-theme="dark"] .home-vertical-menu,
body[data-theme="dark"] .home-category-card-inner {
    background: #1a1c1e;
    color: #e9ecef;
    border-color: #2c3034;
}

body[data-theme="dark"] .home-category-chip {
    background: #1a1c1e;
    color: #e9ecef;
    border-color: #2c3034;
}

body[data-theme="dark"] .home-template-root {
    color: var(--text-color, #e9ecef);
}

body[data-theme="dark"].home-store-template .home-dept-nav {
    background: #1a1c1e;
    border-bottom-color: #2c3034;
}

body[data-theme="dark"].home-store-template .home-dept-name {
    color: #e9ecef !important;
}

/* Responsive */
@media (max-width: 991px) {
    body.home-store-template .home-dept-nav {
        position: relative;
        top: auto;
    }

    body.home-store-template .home-layout-vertical {
        grid-template-columns: 1fr;
        padding: 12px 12px 24px;
        gap: 16px;
    }

    body.home-store-template .home-sidebar {
        position: relative;
        top: auto;
        max-height: none;
    }

    .home-banner-main .carousel-inner {
        min-height: 200px;
        aspect-ratio: 16 / 9;
    }

    .home-categories-section,
    .home-vitrine-section {
        padding: 20px 0 28px;
    }
}

@media (max-width: 920px) {
    .home-mega-panel {
        grid-template-columns: 1fr 1fr;
        width: 96vw;
    }

    .home-quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    body.home-cab-minimalista .main-header .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Storefront pages — sidebar lateral ampla */
body.home-store-template .store-page-with-sidebar,
body.home-store-template .store-category-page .store-page-with-sidebar {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

body.home-store-template .store-front-sidebar {
    width: 320px;
    max-width: 320px;
    min-width: 320px;
    overflow: visible;
}

body.store-product-page .product-title {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

body.store-product-page h1.product-title {
    height: auto;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
    line-height: 1.25;
}

body.home-store-template .store-product-page .store-page-with-sidebar,
body.store-product-page .store-page-with-sidebar {
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    gap: 18px;
}

body.home-store-template .store-product-page .store-front-sidebar,
body.store-product-page .store-front-sidebar {
    width: auto;
    max-width: 260px;
    min-width: 200px;
}

body.home-store-template .store-page-main,
body.home-store-template .store-category-page .store-page-main {
    min-width: 0;
}

body.home-store-template .store-front-sidebar .home-sidebar-pro,
body.home-store-template .store-category-page .home-sidebar-pro {
    position: sticky;
    top: calc(var(--home-nav-sticky-top, 132px) + 8px);
    max-height: calc(100vh - var(--home-nav-sticky-top, 132px) - 24px);
}

@media (max-width: 991px) {
    body.home-store-template .store-page-with-sidebar,
    body.home-store-template .store-category-page .store-page-with-sidebar {
        grid-template-columns: 1fr;
    }

    body.home-store-template .store-front-sidebar .home-sidebar-pro,
    body.home-store-template .store-category-page .home-sidebar-pro {
        position: relative;
        top: auto;
        max-height: none;
    }
}

body.store-product-page .product-detail-container {
    padding-top: 24px;
    padding-bottom: 48px;
}

body.store-product-page .store-page-with-sidebar {
    display: grid;
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

body.store-product-page .store-front-sidebar {
    width: auto;
    max-width: 260px;
    min-width: 200px;
    overflow: visible;
}

body.store-product-page .store-front-sidebar .home-sidebar-panel {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 108px);
}

body.store-product-page .home-sidebar-panel__head {
    padding: 12px 14px;
}

body.store-product-page .home-sidebar-panel__titles strong {
    font-size: 13px;
}

body.store-product-page .home-sidebar-dept__link {
    padding: 8px 12px;
    font-size: 12px;
    gap: 8px;
}

body.store-product-page .home-sidebar-dept__label {
    font-size: 12px;
    line-height: 1.25;
}

body.store-product-page .home-sidebar-dept__icon,
body.store-product-page .home-sidebar-dept__icon--fallback {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 12px;
}

body.store-product-page .store-page-main {
    min-width: 0;
    padding-right: 4px;
}

body.store-product-page .product-detail-grid {
    gap: 22px;
}

body.store-product-page .store-page-with-sidebar .product-detail-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
}

@media (max-width: 1200px) {
    body.store-product-page .store-page-with-sidebar .product-detail-grid {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
    }
}

/* Sidebar: subcategorias colapsadas (classe .home-sidebar-pro) — ver home-templates-themes.css */

body.store-product-page .store-front-nav-mobile .home-menu-scroll {
    border-bottom: 1px solid var(--home-border, #e8ecf1);
    background: var(--home-bg, #f8f9fa);
}

@media (min-width: 992px) {
    body.store-product-page .store-front-nav-mobile {
        display: none !important;
    }
}

@media (max-width: 991px) {
    body.store-product-page .store-page-with-sidebar {
        grid-template-columns: 1fr;
    }

    body.store-product-page .store-front-sidebar .home-sidebar-panel {
        position: relative;
        top: auto;
        max-height: none;
    }
}

/* Fallback legado — só quando template da home não está ativo */
body:not(.home-store-template) .store-page-with-sidebar {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

body:not(.home-store-template) .store-front-sidebar .home-sidebar-panel,
body:not(.home-store-template) .store-page-with-sidebar .home-sidebar-panel {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 120px);
}

.store-front-nav .home-menu-scroll,
.store-front-nav .home-quick-nav,
.store-front-nav .home-mega-nav {
    margin-bottom: 0;
}

@media (max-width: 991px) {
    body:not(.home-store-template) .store-page-with-sidebar {
        grid-template-columns: 1fr;
    }

    body:not(.home-store-template) .store-front-sidebar .home-sidebar-panel,
    body:not(.home-store-template) .store-page-with-sidebar .home-sidebar-panel {
        position: relative;
        top: auto;
        max-height: none;
    }
}

@media (max-width: 560px) {
    .home-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body.home-store-template .home-dept-name {
        font-size: 12px;
    }

    body.home-store-template .home-dept-link {
        padding: 12px 12px;
    }

    .home-category-card-cta {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================
   HORIZONTAL CATEGORY NAVIGATION BAR
   ============================================================ */
.main-banner-area {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.nav-hero-wrapper {
    background-color: transparent;
    padding-top: 20px;
    padding-bottom: 16px;
}

.main-banner-area .carousel-inner,
.main-banner-area .carousel-item {
    height: 100%;
}

.main-banner-area .carousel-item img {
    height: 100%;
    object-fit: cover;
}

.home-category-nav-bar {
    background: var(--home-surface, #fff);
    border-top: 1px solid var(--home-border, #e8ecf1);
    border-bottom: 1px solid var(--home-border, #e8ecf1);
    padding: 0;
    margin-bottom: 24px;
}

.category-nav-bar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav-bar__list::-webkit-scrollbar {
    display: none;
}

.category-nav-bar__item {
    flex-shrink: 0;
}

.category-nav-bar__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    color: var(--home-text, #1e293b);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
    border-radius: 6px;
    position: relative;
}

.category-nav-bar__link:hover {
    color: var(--home-primary, #ff9800);
    background: color-mix(in srgb, var(--home-primary, #ff9800) 6%, transparent);
}

.category-nav-bar__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 3px;
    background: var(--home-primary, #ff9800);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.2s;
}

.category-nav-bar__link:hover::after {
    transform: scaleX(1);
}

.category-nav-bar__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.category-nav-bar__icon--fallback {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--home-primary, #ff9800);
    flex-shrink: 0;
}

.category-nav-bar__label {
    line-height: 1.2;
}

/* Responsive: scroll horizontally on mobile */
@media (max-width: 991px) {
    .category-nav-bar__link {
        padding: 12px 14px;
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .category-nav-bar__list {
        gap: 0;
    }
    
    .category-nav-bar__link {
        padding: 10px 12px;
        font-size: 10px;
    }
    
    .category-nav-bar__icon,
    .category-nav-bar__icon--fallback {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
}
