@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;700&display=swap');

:root {
    --petz-blue: #0006B4;
    --petz-yellow: #FFD700;
    --bg-gray: #F8F9FA;
    --text-main: #333333;
    --text-muted: #666666;
    --card-shadow-hover: 0 12px 30px rgba(0,0,0,0.08);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #fcfcfc;
}

/* Header */
.navbar { background: #fff; border-bottom: 1px solid #f0f0f0; padding: 15px 0; }
.search-pill { border-radius: 100px !important; border: 1px solid #e0e0e0; padding: 12px 25px; background: #f5f5f5; transition: all 0.3s; }
.search-pill:focus { border-color: var(--petz-blue); background: #fff; box-shadow: none; }

/* Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--petz-blue) 0%, #0012ff 100%);
    border-radius: 0;
    color: #fff;
    min-height: 350px;
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
}

/* Categorias */
.cat-circle {
    width: 90px;
    height: 90px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 1px solid #eee;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.cat-item:hover .cat-circle { transform: translateY(-5px); border-color: var(--petz-blue); box-shadow: 0 8px 20px rgba(0,6,180,0.1); }
.cat-circle i { font-size: 1.8rem; color: var(--petz-blue); }
.cat-name { font-weight: 600; font-size: 0.8rem; color: #444; text-transform: uppercase; text-align: center; }

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--card-shadow-hover); border-color: transparent; }

.product-card img { height: 180px; width: 100%; object-fit: contain; margin-bottom: 15px; }
.product-title { font-size: 0.95rem; font-weight: 500; color: #555; height: 45px; overflow: hidden; line-height: 1.4; margin-bottom: 10px; }
.product-price { font-size: 1.4rem; font-weight: 800; color: var(--petz-blue); }
.price-old { font-size: 0.8rem; text-decoration: line-through; color: #bbb; }

/* Controles de Quantidade */
.quantity-controls {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 8px;
    border: 1px solid #eee;
}
.btn-qty {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 8px;
    font-weight: bold;
    color: var(--petz-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.qty-input-minimal {
    width: 65px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}
.btn-buy-now {
    background: var(--petz-blue);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.2s;
}
.btn-buy-now:hover { background: #00048a; transform: scale(1.05); }

/* Busca Sugestões */
.search-suggestions-box { position: absolute; top: 100%; left: 0; right: 0; background: #fff; z-index: 1050; border-radius: 15px; margin-top: 10px; max-height: 450px; overflow-y: auto; display: none; }
.suggestion-item { display: flex; align-items: center; padding: 15px 25px; cursor: pointer; border-bottom: 1px solid #f8f9fa; }
.suggestion-item:hover { background: #f4f6ff; }
.suggestion-item img { border-radius: 6px; margin-right: 15px; }

/* Categorias Pillar */
.cat-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.cat-pillar i { font-size: 2rem; margin-bottom: 12px; transition: transform 0.3s; }
.cat-pillar span { font-weight: 700; font-size: 0.9rem; color: #333; }
.cat-pillar:hover { transform: translateY(-8px); border-color: rgba(0,0,0,0.05); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.cat-pillar:hover i { transform: scale(1.2); }

.bg-blue-soft { background-color: #eef2ff; color: #4338ca; }
.bg-purple-soft { background-color: #f5f3ff; color: #6d28d9; }
.bg-yellow-soft { background-color: #fffbeb; color: #b45309; }
.bg-cyan-soft { background-color: #ecfeff; color: #0e7490; }
.bg-green-soft { background-color: #f0fdf4; color: #15803d; }
.bg-orange-soft { background-color: #fff7ed; color: #c2410c; }

/* Vitrines Horizontais (Netflix Style) */
.carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: 50px;
}

.vitrine-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}
.vitrine-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0006B4;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.vitrine-line {
    flex-grow: 1;
    height: 2px;
    background: #eee;
}
.vitrine-link {
    font-size: 0.9rem;
    color: #667085;
    text-decoration: none;
    font-weight: 600;
}

.product-carousel {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 2px 25px 2px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory; /* Faz o scroll 'grudar' no item */
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}
.product-carousel::-webkit-scrollbar { display: none; }
.product-carousel .product-card {
    flex: 0 0 calc(20% - 12px); /* 5 itens por linha (100% / 5 - gap) */
    scroll-snap-align: start; /* Alinha o card ao início ao scrollar */
    min-width: 240px;
}

@media (max-width: 1200px) {
    .product-carousel .product-card { flex: 0 0 calc(33.333% - 10px); }
}
@media (max-width: 768px) {
    .product-carousel .product-card { 
        flex: 0 0 calc(50% - 10px); 
        min-width: 160px;
    }
    .product-card { 
        padding: 10px !important;
        min-width: auto !important;
        width: 100% !important;
    }
    .product-card img { height: 120px !important; }
    .product-name, .product-title { font-size: 0.75rem !important; }
    .product-price { font-size: 1rem !important; }
    .quantity-controls { 
        padding: 4px !important; 
        gap: 2px !important;
    }
    .btn-qty { 
        width: 24px !important; 
        height: 24px !important; 
        font-size: 0.7rem;
    }
    .qty-input-minimal { 
        width: 35px !important; 
        font-size: 0.8rem !important; 
    }
    .btn-buy-now { 
        width: 32px !important; 
        height: 32px !important; 
        min-width: 32px;
        padding: 0 !important;
    }
}

/* Botões de Navegação do Carousel */
.btn-scroll-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 1.5rem;
    transition: all 0.3s;
    opacity: 0.8;
}
.btn-scroll-nav:hover { opacity: 1; color: var(--petz-blue); border-color: var(--petz-blue); box-shadow: 0 10px 30px rgba(0,6,180,0.15); }
.btn-scroll-nav.left { left: -25px; }
.btn-scroll-nav.right { right: -25px; }

@media (max-width: 768px) {
    .btn-scroll-nav { display: none; } /* Mobile usa swipe natural */
}

/* Novo Badge Oferta */
.badge-promo-fixed {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff3b30;
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 10;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Carousel Custom Controls */
.carousel-indicators {
    bottom: 20px;
}
.carousel-indicators [data-bs-target] {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: #fff;
    opacity: 0.4;
    border: 2px solid rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-indicators .active { 
    opacity: 1; 
    transform: scale(1.3); 
    background-color: var(--petz-yellow); 
    border-color: #fff;
}

.carousel-control-custom-prev, .carousel-control-custom-next {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s;
}
.carousel-control-prev:hover .carousel-control-custom-prev,
.carousel-control-next:hover .carousel-control-custom-next {
    background: #fff;
    color: var(--petz-blue);
    transform: scale(1.1);
}

/* WhatsApp */
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #25d366; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 10px 25px rgba(37,211,102,0.3); z-index: 1000; text-decoration: none; transition: all 0.3s; }
.whatsapp-float:hover { transform: scale(1.1) rotate(10deg); color: #fff; }

/* Efeito de voo do produto para o carrinho */
.flying-item {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    opacity: 0.8;
    object-fit: contain;
}

/* ====================================================
   STORE SELECTOR - Sistema Multi-Loja por CEP
   ==================================================== */

/* Barra indicadora de loja selecionada */
.store-indicator-bar {
    background: linear-gradient(135deg, #0006B4 0%, #000490 50%, #1a0fbf 100%);
    color: #fff;
    padding: 6px 0;
    font-size: 0.78rem;
    position: relative;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 6, 180, 0.2);
}

.store-indicator-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 50px,
        rgba(255,255,255,0.02) 50px,
        rgba(255,255,255,0.02) 100px
    );
    pointer-events: none;
}

/* Modal Overlay */
.store-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-selector-overlay.active {
    background: rgba(0, 3, 80, 0.7);
    backdrop-filter: blur(12px);
    pointer-events: all;
    opacity: 1;
}

/* Conteúdo do Modal */
.store-selector-content {
    background: #fff;
    border-radius: 24px;
    padding: 32px 28px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.1);
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.store-selector-content.animate-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Scrollbar customizada */
.store-selector-content::-webkit-scrollbar {
    width: 4px;
}
.store-selector-content::-webkit-scrollbar-track {
    background: transparent;
}
.store-selector-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Botão fechar */
.store-selector-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}
.store-selector-close:hover {
    background: #e2e8f0;
    color: #334155;
    transform: rotate(90deg);
}

/* Spinner de loading */
.store-selector-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #0006B4;
    border-radius: 50%;
    animation: store-spin 0.8s linear infinite;
}

@keyframes store-spin {
    to { transform: rotate(360deg); }
}

/* Animação slide-up para resultados */
.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade Mobile */
@media (max-width: 640px) {
    .store-selector-content {
        padding: 24px 16px;
        border-radius: 20px;
        max-height: 95vh;
    }
    
    .store-selector-overlay {
        padding: 10px;
        align-items: flex-end;
    }
    
    .store-selector-content.animate-in {
        animation: slideUpMobile 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }
    
    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .store-indicator-bar {
        font-size: 0.7rem;
        padding: 5px 0;
    }
}

/* iPad / Tablet / Desktop */
@media (min-width: 641px) {
    .store-selector-content {
        max-width: 820px !important;
        width: 95% !important;
    }
}

/* Custom Scrollbar for Store Result Area */
#cepResultArea::-webkit-scrollbar {
    width: 6px;
}
#cepResultArea::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}
#cepResultArea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
#cepResultArea::-webkit-scrollbar-thumb:hover {
    background: #0006B4;
}

.loja-card {
    box-sizing: border-box;
    cursor: pointer;
}
.loja-card:hover {
    transform: translateY(-2px);
}
