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

* {
    box-sizing: border-box;
}

html,
body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: #f8fafc !important;
    color: #1e293b;
    padding-left: 0 !important;
    display: flex !important;
    flex-direction: column !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);
}

/* 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 180px 20px;
    /* added bottom padding for the fixed chat bar */
}

@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
   ============================================= */

.active-filters {
    margin-top: 0;
    margin-bottom: 2px;
}

.filter-tag {
    display: inline-block;
    background: #e3e6eb;
    padding: 6px 14px;
    margin-right: 8px;
    border-radius: 20px;
    font-size: 14px;
    color: #374151;
}

.clear-btn {
    margin-left: 4px;
    background: #fde8d0;
    color: #b45309;
    padding: 6px 14px;
    border: none;
    cursor: pointer;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

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

.results-count-inline {
    font-size: 14px;
    color: #374151;
    display: inline-block;
    vertical-align: middle;
}

.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;
    }
}