/* =============================================
   OVERRIDES para zipp-ai.css no Shop
   (mesmo padrÃ£o do netzipp.youzipp.com)
   ============================================= */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100% !important;
    overflow: hidden !important;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: #f8fafc !important;
    color: #1e293b;
    padding-left: 0 !important;
    display: grid !important;
    grid-template-rows: auto 1fr auto;
    height: 100% !important;
    min-height: 100% !important;
}

/* Sidebar do zipp-ai.css: oculta por padrÃ£o */
.sidebar {
    transform: translateX(-100%) !important;
    visibility: hidden !important;
    border-right: none !important;
    top: 60px !important;
    height: calc(100vh - 60px) !important;
    z-index: 1000 !important;
}

.sidebar.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1) !important;
}

/* Header fixo no topo */
header {
    position: sticky !important;
    top: 0;
    z-index: 1005 !important;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* BotÃ£o hamburger sempre visÃ­vel */
.menu-btn {
    display: inline-flex !important;
}

.sidebar-overlay {
    display: none;
    z-index: 999 !important;
}

/* =============================================
   LAYOUT DO SHOP
   ============================================= */

.shop-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px 60px 20px;
    /* adjusted bottom padding to remove excess space */
}

@media (max-width: 960px) {
    .shop-container {
        padding-bottom: 60px; /* Base padding since chat is no longer at bottom */
        display: flex;
        flex-direction: column;
    }
}

.shop-scroll-area {
    width: 100%;
    padding: 10px 0 20px 0;
}

.shop-scroll-area:hover {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* =============================================
   BARRA DE CATEGORIAS AZUL (ESTILO AMAZON)
   ============================================= */

.shop-category-bar {
    width: 100%;
    background-color: #232f3e; /* Amazon dark blue style */
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #131921;
}

.shop-category-bar-inner {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 20px;
    gap: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: center;
}

.shop-category-bar-inner::-webkit-scrollbar {
    display: none;
}

.shop-category-bar-inner a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: border-color 0.2s;
}

.shop-category-bar-inner a:hover {
    border-color: #ffffff;
}

.shop-sidebar {
    width: 220px;
    background: white;
    padding: 20px;
    border-right: 1px solid #ddd;
}

.content {
    flex: 1;
    padding: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 18px;
    row-gap: 10px;
    padding: 0 0 20px 0;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px 0;
    }
}

@media (max-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

.placeholder {
    color: #777;
}

/* =============================================
   CHAT (centralizado, estilo youzipp.com)
   ============================================= */

.chat-greeting {
    text-align: center;
    color: #6b7280;
    font-size: 15px;
    margin: 0 0 10px 0;
}

body.chat-started .chat-greeting {
    display: none;
}

.chat-input-wrapper {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 40px 20px 30px 20px;
    background: linear-gradient(to top, #f8fafc 80%, rgba(248, 250, 252, 0));
    z-index: 999;
}

.chat-input {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
    flex: 1;
}

.chat-input input {
    flex: 1;
    border: none;
    padding: 8px 0;
    font-size: 15px;
    outline: none;
    background: transparent;
}

.chat-action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.chat-send-btn {
    height: 34px;
    border-radius: 999px;
    background: #f97316;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.chat-send-btn:hover {
    background: #ea580c;
}

.chat-input-row {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.chat-nova-busca-btn {
    background: #fde8d0;
    color: #b45309;
    border: none;
    padding: 0 16px;
    height: 34px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s;
}

.chat-nova-busca-btn:hover {
    background: #fcd9b6;
}

@media (max-width: 960px) {
    .shop-category-bar {
        display: none !important;
    }

    .chat-input-wrapper {
        position: relative;
        bottom: auto !important;
        left: auto;
        padding: 10px 10px 0 10px;
        background: transparent;
        margin-bottom: 0;
        z-index: 10;
        transform: none;
        order: -1; /* Move above products when flex container is column */
    }

    .chat-input-row {
        flex-direction: column;
        gap: 8px;
    }

    .chat-action-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
   FILTROS E PRODUTOS
   ============================================= */

#activeFilters {
    margin: 0 !important;
    padding: 15px 0 !important;
    display: block !important;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background: #e3e6eb;
    padding: 8px 16px;
    margin-right: 10px;
    margin-bottom: 8px;
    border-radius: 20px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    line-height: 1;
}

.clear-btn {
    display: inline-flex;
    align-items: center;
    background: #fde8d0;
    color: #b45309;
    padding: 8px 16px;
    margin-bottom: 8px;
    border: none;
    cursor: pointer;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
    line-height: 1;
}

.clear-btn:hover {
    background: #fcd9b6;
}

.results-count-inline {
    font-size: 13px;
    color: #374151;
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
}

.redirect-block {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.redirect-block h2 {
    margin-top: 0;
}

.btn-primary {
    display: inline-block;
    background: #ff9800;
    color: #fff;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 6px;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.product-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 8px;
}

.product-title {
    font-size: 13px;
    line-height: 1.3;
    height: 34px;
    overflow: hidden;
    word-wrap: break-word;
}

.product-price {
    font-weight: 800;
    font-size: 17px;
    margin-top: 8px;
    color: #1e293b;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: -0.02em;
}

.product-desc {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-store {
    font-size: 11px;
    color: #888;
    margin-top: 8px;
    margin-bottom: 12px;
}

.product-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #ff9800;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.2s;
}

.product-link:hover {
    background: #e68a00;
}

.search-bar input {
    padding: 8px;
    width: 300px;
}

.search-bar button {
    padding: 8px 12px;
    background: #F2994A;
    border: none;
    color: white;
    cursor: pointer;
}

/* =============================================
   PAGINAÃ‡ÃƒO E ORDENAÃ‡ÃƒO
   ============================================= */

.load-more-btn {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.load-more-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sort-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 30px !important;
    background-color: white;
    color: #1e293b;
    font-family: inherit;
}

.sort-select:focus {
    outline: none;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}

@media (max-width: 600px) {
    .sort-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-select {
        flex: 1;
        max-width: 200px;
    }
}

/* =============================================
   CARROSSEL DE LOGOS (Infinito)
   ============================================= */

.logos-carousel {
  width: 100%;
  overflow: hidden;
  background: transparent;
  padding: 25px 0;
  margin-top: 40px;
}

.logos-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: scrollLogos 25s linear infinite;
}

.logos-track img {
  height: 38px;
  width: auto;
  margin: 0 25px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  mix-blend-mode: multiply;
}

.logos-track img:hover {
  opacity: 1;
}

@keyframes scrollLogos {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Ajuste para celular */
@media (max-width: 768px) {
  .chat-input {
    padding: 15px 16px !important; /* Aumenta a altura da caixa de chat no mobile */
  }
  .chat-input input {
    font-size: 16px !important;
  }
  .logos-carousel {
    padding: 15px 0;
    margin-top: 10px; /* Sit right below the phrase */
  }
  .logos-track img {
    height: 45px;
    margin: 0 15px;
  }
}

/* =============================================
   PÃGINA DE DETALHES DO PRODUTO (HARMONIZADA)
   ============================================= */

/* Container principal ajustado */
.product-page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

/* Link de voltar discreto e elegante */
.product-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.product-back-link:hover {
    color: #0f172a;
    transform: translateX(-3px);
}

/* Grid de duas colunas balanceado */
.product-grid {
    display: grid;
    grid-template-columns: 450px 1fr; /* Image column fixed and reasonable */
    gap: 50px;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    align-items: start; /* Align to top */
}

/* Box da imagem controlado */
.product-image-box {
    background: #fdfdfd;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 450px; /* Fixed width to prevent zooming */
    height: 450px; /* Fixed height to keep it consistent */
    overflow: hidden;
}

.product-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Important: prevents cropping/zooming */
    transition: transform 0.3s ease;
}

/* Info do produto no lado direito */
.product-info {
    display: flex;
    flex-direction: column;
}

.product-info h1 {
    font-size: 28px;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 15px 0;
    font-weight: 700;
}

/* Estilo para o preÃ§o na pÃ¡gina de detalhes */
.product-page .product-price {
    font-size: 36px;
    color: #F2994A;
    font-weight: 800;
    margin-bottom: 20px;
    background: transparent;
    padding: 0;
    display: block;
    letter-spacing: -0.5px;
    border-radius: 0;
}

/* Estilo para o bloco da loja */
.product-page .product-store {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #64748b;
}

.product-store span {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.product-store strong {
    display: block;
    font-size: 18px;
    color: #0f172a;
    margin-top: 5px;
    font-weight: 600;
}

/* BotÃ£o de aÃ§Ã£o premium */
.product-actions .btn-primary {
    display: block;
    text-align: center;
    background: #F2994A;
    color: #ffffff;
    padding: 18px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(255,102,0,0.2);
}

.product-actions .btn-primary:hover {
    background: #e65c00;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255,102,0,0.3);
}

.safe-note {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    margin-top: 15px;
}

/* SeÃ§Ã£o de descriÃ§Ã£o separada embaixo */
.product-description {
    margin-top: 30px;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.product-description h2 {
    font-size: 22px;
    color: #0f172a;
    margin-bottom: 20px;
    font-weight: 600;
}

.product-description-content {
    color: #475569;
    line-height: 1.8;
    font-size: 16px;
}

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .product-image-box {
        width: 100%;
        max-width: 500px;
        height: auto;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 15px;
        margin: 10px auto;
    }
    
    .product-grid, .product-description {
        padding: 25px;
    }
    
    .product-info h1 {
        font-size: 24px;
    }

    .product-page .product-price {
        font-size: 30px;
    }
}
/* Sub-headline do Hero */
.shop-hero-description {
    font-size: 16px;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto 25px auto;
    line-height: 1.6;
    font-weight: 400;
}

@media (max-width: 768px) {
    .shop-hero-description {
        font-size: 14px;
        margin-bottom: 20px;
        padding: 0 15px;
        line-height: 1.5;
    }
}

/* Favoritos */
.btn-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
    z-index: 10;
    font-size: 18px;
    color: #cbd5e1;
    padding: 0;
    line-height: 1;
}

.btn-favorite:hover {
    transform: scale(1.1);
    background: white;
}

.btn-favorite.active {
    color: #F2994A;
}

.product-card { position: relative; } /* Ensure absolute works */

/* Botão favorito na página de detalhes */
.product-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.product-page .btn-favorite-large {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-page .btn-favorite-large:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.product-page .btn-favorite-large.active {
    color: #F2994A;
    border-color: #ffe4d3;
    background: #fffaf7;
}

/* Ajuste de cor de favorito solicitado pelo usuario (laranja youzipp) */
.btn-favorite.active { color: #F2994A !important; }
.btn-favorite.active svg { fill: #F2994A !important; stroke: #F2994A !important; }
.btn-favorite-large.active { color: #F2994A !important; border-color: #ffe4d3 !important; background: #fffaf7 !important; }
.btn-favorite-large.active svg { fill: #F2994A !important; stroke: #F2994A !important; }
.btn-favorite-large.active .heart-icon { color: #F2994A !important; }

/* Garantir rolagem no wrapper do shop */
#shopMainWrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

#shopScrollArea {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

/* Menu Dropdown do Hamburger (Global) */
.header-nav-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: transparent; z-index: 1003;
}
.header-nav-menu {
    display: none; position: fixed; top: 60px; left: 10px;
    background: white; border: 1px solid #e5e7eb; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 220px;
    z-index: 1004; overflow-y: auto; max-height: 80vh;
}
.header-nav-menu.open { display: block !important; }
.header-nav-item {
    display: block; padding: 12px 16px; color: #1f2937;
    text-decoration: none; font-size: 14px; transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}
.header-nav-item:last-child { border-bottom: none; }
.header-nav-item:hover { background-color: #f9fafb; }
.header-nav-submenu {
    display: none; padding-left: 15px; border-left: 2px solid #f3f4f6;
    margin-left: 15px; margin-bottom: 5px;
}
.header-nav-sub-item {
    display: block; padding: 8px 10px; color: #1f2937;
    text-decoration: none; font-size: 13px; transition: background-color 0.2s;
}
.header-nav-sub-item:hover { background-color: #f9fafb; }
.header-nav-divider {
    height: 1px;
    background-color: #f3f4f6;
    margin: 8px 16px;
}

@media (max-width: 768px) {
    .header-nav-menu.open { display: block !important; }
    .header-nav-item {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}
