/* ============================================================
   CARTERS HOMEPAGE — minimal fixes only
   Original CSS already works. This only fixes:
   1. Broken slick carousels (JS doesn't hydrate)
   2. Product grid at bottom
   3. Mobile banner spacing
   ============================================================ */

/* --- Slick prev/next arrows never had position:absolute (that comes
   from the slick-carousel base stylesheet, which isn't loaded here), so
   they sat inert in normal document flow instead of overlaying the
   banner. Position + wire them up (see header-interactions.js). --- */
.dHbrUe .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    cursor: pointer;
    width: 34px;
    height: 34px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
@media (max-width: 600px) {
    .dHbrUe .slick-arrow {
        width: 28px;
        height: 28px;
        padding: 5px;
    }
}

/* --- Hamburger menu button (header) --- */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #444;
    border-radius: 1px;
}

/* --- Mobile drawer (opened by the hamburger button) --- */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}
.mobile-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 82vw;
    height: 100%;
    background: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}
.mobile-drawer.is-open {
    transform: translateX(0);
}
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #ebebeb;
}
.mobile-drawer-title {
    font-family: Poppins, sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #444;
}
.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #444;
    cursor: pointer;
    padding: 0;
}
.mobile-drawer-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.mobile-drawer-list a {
    display: block;
    padding: 12px 20px;
    color: #444;
    text-decoration: none;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 500;
}
.mobile-drawer-list a:hover {
    background: #f7f8f9;
    color: #00A8E2;
}
.mobile-drawer-divider {
    height: 1px;
    background: #ebebeb;
    margin: 4px 20px;
}
.mobile-drawer-list--secondary a {
    color: #6C6C6C;
    font-weight: 400;
    font-size: 13px;
}
body.drawer-open {
    overflow: hidden;
}

/* --- The slick carousels don't hydrate, convert to CSS scroll --- */
.slick-list {
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.slick-list::-webkit-scrollbar { display: none !important; }
.slick-track {
    display: flex !important;
    width: max-content !important;
    transform: none !important;
}
.slick-slide {
    display: block !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
}
.slick-slide.slick-cloned { display: none !important; }

/* Hero: each slide = viewport width */
.dHbrUe .slick-list {
    overflow: hidden !important;
}
.dHbrUe .slick-track {
    left: 0 !important;
    display: block !important;
    width: 100% !important;
    transform: none !important;
    will-change: auto;
    transition: none !important;
}
.dHbrUe .slick-slide {
    display: none !important;
    width: 100% !important;
    max-width: 100% !important;
}
.dHbrUe .slick-slide:not(.slick-cloned) {
    width: 100% !important;
    max-width: 100% !important;
}
.dHbrUe .slick-slide.slick-active,
.dHbrUe .slick-slide.slick-current {
    display: block !important;
}

/* Hide the broken Next.js product carousels (Novidades/Ofertas) */
section.styles__Wrapper-sc-1mqpx4b-1.czLHUa {
    display: none !important;
}

/* "Compre por idade" — show 6 items in a row */
.styles__Wrapper-sc-1kpvgej-0 .slick-track {
    display: flex !important;
    width: 100% !important;
    transform: none !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.styles__Wrapper-sc-1kpvgej-0 .slick-slide {
    width: auto !important;
}
.styles__Wrapper-sc-1kpvgej-0 .slick-slide:not([data-index="0"]):not([data-index="1"]):not([data-index="2"]):not([data-index="3"]):not([data-index="4"]):not([data-index="5"]) {
    display: none !important;
}

/* =============================================
   HORIZONTAL CAROUSEL (Novidades / Ofertas)
   CSS scroll-snap replacement
   ============================================= */
.home-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 0 0 20px;
}
.home-carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 20px 12px;
}
.home-carousel-track::-webkit-scrollbar { display: none; }

.home-carousel-card {
    flex: 0 0 calc(25% - 9px);
    scroll-snap-align: start;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: transform 0.22s, box-shadow 0.22s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    display: block;
}
.home-carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.11);
}

@media (max-width: 1024px) {
    .home-carousel-card { flex: 0 0 calc(33.33% - 8px); }
}
@media (max-width: 768px) {
    .home-carousel-card { flex: 0 0 calc(50% - 6px); }
    .home-carousel-track { padding: 0 12px 10px; gap: 10px; }
}
@media (max-width: 480px) {
    .home-carousel-card { flex: 0 0 47%; }
    .home-carousel-track { padding: 0 8px 8px; gap: 8px; }
}

.home-carousel-card .hcc-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7f7f7;
}
.home-carousel-card .hcc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.home-carousel-card:hover .hcc-img img { transform: scale(1.04); }

.home-carousel-card .hcc-body { padding: 10px 12px 14px; }
.home-carousel-card .hcc-name {
    font-size: 13px;
    font-weight: 400;
    color: #444;
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 37px;
    font-family: Poppins, sans-serif;
}
.home-carousel-card .hcc-price-row { display: flex; align-items: center; gap: 6px; }
.home-carousel-card .hcc-price { font-size: 15px; font-weight: 700; color: #222; font-family: Poppins, sans-serif; margin: 0; }
.home-carousel-card .hcc-list-price { font-size: 11px; color: #999; text-decoration: line-through; font-family: Poppins, sans-serif; }
.home-carousel-card .hcc-discount { font-size: 10px; font-weight: 600; color: #fff; background: #e53935; padding: 2px 5px; border-radius: 4px; }

/* "Ver todos" button */
.ver-todos-wrap { display: flex; justify-content: center; padding: 4px 0 20px; }
.ver-todos-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #00A8E2;
    text-decoration: none;
    border: 1.5px solid #00A8E2;
    border-radius: 50px;
    padding: 7px 22px;
    transition: background 0.18s, color 0.18s;
    font-family: Poppins, sans-serif;
}
.ver-todos-btn:hover { background: #00A8E2; color: #fff; }

/* =============================================
   HEADER — logo / search / cart row
   The "Entre ou Cadastre-se" column never receives
   its label (no JS hydration to inject the text), so
   it sits empty and leaves a huge blank gap next to a
   tiny search box. Hide it and give the search field
   a sensible, centered width instead.
   ============================================= */
.eaFxD {
    display: none !important;
}
.lkHJnU {
    justify-content: center !important;
}
.cVSjIE {
    flex-basis: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
}
@media (max-width: 960px) {
    .cVSjIE { max-width: 400px !important; }
}
@media (max-width: 600px) {
    .cVSjIE { max-width: 100% !important; }
}

/* Logo — the SVG has a hardcoded intrinsic width (113px) and its
   grid column shrinks below that on narrow phones (~360px), so it
   was overflowing past the left edge of the screen and getting
   clipped. Let it scale down instead of overflowing. */
.gQVePD {
    min-width: 0 !important;
}
.djpfFS {
    min-width: 0 !important;
    width: 100%;
}
.leYKZN {
    width: 100% !important;
    max-width: 113px;
    height: auto !important;
}

/* =============================================
   PRODUCT GRID (static products at bottom)
   ============================================= */
.static-products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    padding: 0 20px 30px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}
.static-products-grid > div {
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    padding: 0 !important;
    text-align: left !important;
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.static-products-grid > div:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.11) !important;
}
.static-products-grid > div > a {
    text-decoration: none !important;
    color: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.static-products-grid > div > a > div {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    background: #f7f7f7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.static-products-grid > div > a > div > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
    display: block !important;
}
.static-products-grid > div:hover > a > div > img { transform: scale(1.04); }
.static-products-grid > div > a > h3 {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #444 !important;
    margin: 0 !important;
    padding: 10px 12px 4px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 37px !important;
    font-family: Poppins, sans-serif !important;
}
.static-products-grid > div > a > p {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #222 !important;
    margin: 0 !important;
    padding: 4px 12px 14px !important;
    font-family: Poppins, sans-serif !important;
}

@media (max-width: 1024px) { .static-products-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 768px) { .static-products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; padding: 0 12px 20px !important; } }
@media (max-width: 400px) { .static-products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; padding: 0 8px 16px !important; } }
