/* ======================================================
   STYLE.CSS - MULT-LAR UTILIDADES (ATACADO - AZUL/LARANJA INVERTIDO)
   ====================================================== */

:root {
    --primary-orange: #ff8500;
    --primary-blue: #0033a0; 
    --product-title-blue: #002277; /* Novo tom escuro pro título não sumir no fundo branco */
    --bg-white: #ffffff;
    --text-blue: #002277; 
    --gray-text: #8898aa;
    --card-bg-gray: #f4f4f4;
    --border-gray: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-white);
    padding: 20px 24px 100px 24px;
    overflow-x: hidden;
}

/* --- CABEÇALHO --- */
.top-header {
    margin-bottom: 20px;
    margin-top: 10px;
}

#greeting-text {
    color: var(--primary-blue); /* Era laranja */
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

#current-date {
    color: #99c2ff; /* Azul clarinho (era laranja clarinho) */
    font-size: 0.9rem;
    font-weight: 400;
}

/* --- BANNER ESTÁTICO RESPONSIVO --- */
.static-banner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto 30px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(255, 133, 0, 0.2); /* Sombra alaranjada */
    background-color: var(--primary-orange); /* Era azul */
    aspect-ratio: 1920 / 430;
    position: relative;
}

.static-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* --- CATEGORIAS --- */
.section-title {
    color: var(--primary-orange); /* Era azul */
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.cat-card {
    background-color: var(--primary-blue); /* Era laranja */
    border-radius: 18px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 51, 160, 0.2); /* Sombra azulada */
    transition: transform 0.2s;
    padding: 5px;
    text-align: center;
}

.cat-card:active {
    transform: scale(0.95);
}

.cat-card i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #99c2ff; /* Azul clarinho */
}

.cat-card span {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
}

.hidden-cat { display: none; }

.ver-mais-wrapper {
    position: relative;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-ver-mais {
    background-color: #ffe6cc; /* Laranja pastel */
    color: var(--primary-orange); /* Era azul */
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-ver-mais:active {
    background-color: #ffcc99;
}

/* --- LISTA DE PRODUTOS --- */
.produto-zerado {
    filter: grayscale(100%);
    opacity: 0.65;
    transition: all 0.3s ease;
}

.produto-zerado:hover {
    opacity: 0.85;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary-blue); /* Era laranja */
}

#products-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    width: 100%;
}

.product-card {
    background: var(--bg-white);
    border-radius: 30px;
    padding: 12px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prod-image-container {
    background-color: var(--card-bg-gray);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 250px; 
    margin-bottom: 0px;
}

.prod-image-container img {
    width: 100%;
    height: 100%;
    max-height: 200px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.availability-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

/* Inverti as cores de sucesso para tons de laranja */
.badge-ok { background-color: #fff0e6; color: var(--primary-orange); border: 1px solid #ffcc99; }
.badge-out { background-color: #fee; color: #d93025; border: 1px solid #fcc; }

.info-badges-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: -15px; 
    margin-bottom: 15px;
    position: relative;
    z-index: 5;
}

.info-badge {
    background-color: var(--primary-blue); /* Era laranja */
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    letter-spacing: 0.5px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prod-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 5px;
}

.cod-badge {
    border: 1px solid var(--border-gray);
    color: var(--gray-text);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.barcode-section {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue); /* Era laranja */
    font-size: 0.8rem;
    font-weight: 600;
}

.prod-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--product-title-blue); /* Tom escuro de azul */
    line-height: 1.3;
    margin-bottom: auto;
    padding: 0 5px 20px 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-banner {
    background-color: var(--primary-orange); /* Era azul */
    border-radius: 15px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-top: 10px;
}
.price-label { font-weight: 700; font-size: 0.9rem; text-transform: uppercase; }
.price-value { font-weight: 800; font-size: 1.3rem; }

/* --- BARRA INFERIOR --- */
.bottom-bar-container {
    position: fixed; bottom: 20px; left: 0; width: 100%; padding: 0 20px; z-index: 100; pointer-events: none;
}
.bottom-bar {
    background: white; border-radius: 50px; padding: 8px 10px; display: flex; align-items: center; gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); pointer-events: auto; max-width: 500px; margin: 0 auto;
}
.nav-btn {
    width: 42px; height: 42px; background-color: var(--primary-blue); /* Era laranja */
    color: white; border: none; border-radius: 50%; font-size: 1.1rem; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.search-box {
    flex-grow: 1; 
    background-color: #e6f0ff; /* Azulzinho bem claro pra contrastar */
    height: 42px; border-radius: 25px; display: flex; align-items: center; padding: 0 20px; gap: 10px;
}
.search-box i { color: var(--primary-blue); font-size: 0.9rem;}
.search-box input {
    border: none; background: transparent; width: 100%; outline: none; 
    color: var(--primary-blue); font-weight: 500; font-size: 0.9rem;
}
.search-box input::placeholder { color: #88aacc; font-weight: 400; }

/* Botão do Scanner */
.btn-scan {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-scan:active {
    transform: scale(0.9);
}

/* Modal do Scanner */
.scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.scanner-container {
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 25px;
    padding: 20px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scanner-header h3 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-close-scanner {
    background: #f0f4f8;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-scanner:hover {
    background: var(--primary-blue);
    color: white;
}

#reader {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

#reader video {
    border-radius: 15px;
}

.scanner-tip {
    text-align: center;
    margin-top: 15px;
    color: var(--gray-text);
    font-size: 0.85rem;
}

/* Ajustes no Banner de Instalação */
.btn-close-install {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    margin-left: 10px;
}

/* --- BANNER DE INSTALAÇÃO PWA --- */
.install-banner {
    position: fixed;
    bottom: 80px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background-color: var(--primary-orange); /* Era azul */
    color: white;
    border-radius: 15px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(255, 133, 0, 0.4); /* Sombra alaranjada */
    z-index: 99;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
}

.install-banner.hidden {
    bottom: -100px;
    opacity: 0;
    pointer-events: none;
}

.install-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.install-content i {
    font-size: 1.8rem;
    color: var(--primary-blue); /* Era laranja */
}

.install-text {
    display: flex;
    flex-direction: column;
}

.install-text strong {
    font-size: 0.95rem;
    line-height: 1.1;
}

.install-text span {
    font-size: 0.75rem;
    color: #ffe6cc; /* Laranja clarinho */
}

.btn-install {
    background-color: var(--primary-blue); /* Era laranja */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 51, 160, 0.3); /* Sombra azulada */
}

.btn-install:active {
    transform: scale(0.95);
}

.btn-close-install {
    background: none;
    border: none;
    color: #ffe6cc; /* Laranja clarinho */
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 5px;
    padding: 5px;
}

/* --- NOVA GALERIA COM SETAS --- */
.prod-image-container {
    position: relative;
}

.prod-main-img {
    width: 100%;
    height: 100%;
    max-height: 250px; 
    object-fit: contain;
    mix-blend-mode: multiply;
    display: block;
    transition: opacity 0.2s ease; 
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8); 
    color: var(--primary-orange); /* Era azul */
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    opacity: 0; 
}

.prod-image-container:hover .gallery-nav-btn {
    opacity: 1;
}

.gallery-nav-btn:hover {
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    transform: translateY(-50%) scale(1.1); 
}

.gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.95); 
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-nav-btn.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.gallery-badge {
    position: absolute;
    top: 15px;  
    left: 15px; 
    background-color: rgba(255, 133, 0, 0.85); /* Laranja do tema com transparência */
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(2px);
}

.gallery-badge i {
    font-size: 0.8rem;
}

/* --- LÓGICA DOS SLIDES DO BANNER --- */
.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0; 
    transition: opacity 0.5s ease-in-out; 
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1; 
    pointer-events: auto;
}

/* --- BOTÕES DE NAVEGAÇÃO DO BANNER --- */
.banner-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--primary-orange); /* Era azul */
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    opacity: 0; 
}

.static-banner:hover .banner-nav-btn {
    opacity: 1;
}

.banner-nav-btn:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.banner-prev { left: 15px; }
.banner-next { right: 15px; }

@media (max-width: 768px) {
    .static-banner {
        aspect-ratio: auto; 
        height: 160px; 
        border-radius: 15px; 
    }
    .banner-nav-btn {
        opacity: 0.8;
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* --- RESPONSIVIDADE --- */
@media (min-width: 700px) {
    #products-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    #products-list { grid-template-columns: repeat(3, 1fr); }
    #main-content { max-width: 1200px; margin: 0 auto; }
}

/* --- ANIMAÇÕES --- */
.view-section {
    opacity: 1; transform: translateY(0); transition: opacity 0.3s ease, transform 0.3s ease;
}
.hidden { display: none !important; }
.fade-out { opacity: 0; transform: translateY(-20px); pointer-events: none; }
.fade-in-start { opacity: 0; transform: translateY(20px); }

.loading-container {
    text-align: center; padding: 60px 20px; color: var(--gray-text); grid-column: 1 / -1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; animation: pulse 1.5s infinite;
}
.loading-container i { font-size: 2rem; margin-bottom: 15px; color: var(--primary-orange); /* Era azul */ }
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }