/* =============================================
   VITRINE - Frontend Shortcodes
   ============================================= */

/* --- Botoes da Loja --- */
.inbwp-loja-botoes {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.inbwp-loja-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
}

.inbwp-loja-btn svg {
    flex-shrink: 0;
}

.inbwp-btn-entrar {
    background: #1d2327;
    color: #fff;
}

.inbwp-btn-entrar:hover {
    background: #3c434a;
}

.inbwp-btn-carrinho {
    background: #2271b1;
    color: #fff;
    position: relative;
}

.inbwp-btn-carrinho:hover {
    background: #135e96;
}

.inbwp-cart-badge {
    background: #d63638;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

/* --- Campo de Busca --- */
.inbwp-busca-container {
    width: 100%;
    margin: 0;
}

.inbwp-busca-form {
    width: 100%;
}

.inbwp-busca-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #c3c4c7;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.inbwp-busca-wrapper:focus-within {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.inbwp-busca-icon {
    margin-left: 14px;
    color: #8c8f94;
    flex-shrink: 0;
}

.inbwp-busca-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 12px 14px;
    font-size: 16px;
    background: transparent;
    box-shadow: none !important;
    font-family: inherit;
}

.inbwp-busca-input::placeholder {
    color: #a7aaad;
}

.inbwp-busca-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.inbwp-busca-btn:hover {
    background: #135e96;
}

/* --- Vitrine de Produtos (Carrossel) --- */
.inbwp-vitrine {
    margin: 20px 0;
}

.inbwp-vitrine-titulo {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 15px 0;
}

.inbwp-vitrine-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.inbwp-vitrine-nav {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #c3c4c7;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #1d2327;
    padding: 0;
    z-index: 2;
}

.inbwp-vitrine-nav:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.inbwp-vitrine-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
    flex: 1;
}

.inbwp-vitrine-track::-webkit-scrollbar {
    display: none;
}

/* --- Cards dos Produtos --- */
.inbwp-vitrine-card {
    flex: 0 0 200px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.inbwp-vitrine-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.inbwp-vitrine-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f6f7f7;
}

.inbwp-vitrine-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inbwp-vitrine-card-info {
    padding: 12px 14px 16px;
}

.inbwp-vitrine-card-nome {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inbwp-vitrine-card-preco {
    font-size: 16px;
    font-weight: 700;
    color: #2271b1;
}

.inbwp-vitrine-vazia {
    color: #646970;
    text-align: center;
    padding: 30px;
    font-style: italic;
}

/* --- Modal do Produto --- */
.inbwp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.inbwp-modal-overlay.aberto {
    display: flex;
}

.inbwp-modal-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: inbwpFadeIn 0.2s ease;
}

@keyframes inbwpFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.inbwp-modal-fechar {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #646970;
    transition: all 0.15s ease;
    z-index: 2;
    line-height: 1;
}

.inbwp-modal-fechar:hover {
    background: rgba(0,0,0,0.12);
    color: #1d2327;
}

.inbwp-modal-img {
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #f6f7f7;
}

.inbwp-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inbwp-modal-corpo {
    padding: 20px 24px 24px;
}

.inbwp-modal-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.inbwp-modal-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: #f0f0f1;
    color: #646970;
}

.inbwp-modal-tag.tag-tipo {
    background: #dbeafe;
    color: #1e40af;
}

.inbwp-modal-tag.tag-cat {
    background: #dcfce7;
    color: #166534;
}

.inbwp-modal-nome {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.inbwp-modal-desc {
    font-size: 14px;
    color: #646970;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.inbwp-modal-preco {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 20px;
}

.inbwp-modal-acoes {
    display: flex;
    gap: 10px;
}

.inbwp-modal-acoes button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.inbwp-modal-btn-add {
    background: #f0f0f1;
    color: #1d2327;
}

.inbwp-modal-btn-add:hover {
    background: #e0e0e1;
}

.inbwp-modal-btn-contratar {
    background: #2271b1;
    color: #fff;
}

.inbwp-modal-btn-contratar:hover {
    background: #135e96;
}

/* --- Modal do Carrinho --- */
.inbwp-carrinho-lista {
    max-height: 320px;
    overflow-y: auto;
    padding: 0 24px;
}

.inbwp-carrinho-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f1;
}

.inbwp-carrinho-item:last-child {
    border-bottom: none;
}

.inbwp-carrinho-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f6f7f7;
}

.inbwp-carrinho-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inbwp-carrinho-item-info {
    flex: 1;
    min-width: 0;
}

.inbwp-carrinho-item-nome {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbwp-carrinho-item-preco {
    font-size: 13px;
    color: #2271b1;
    font-weight: 600;
}

.inbwp-carrinho-remover {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #fcf0f1;
    color: #d63638;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.15s ease;
    line-height: 1;
}

.inbwp-carrinho-remover:hover {
    background: #d63638;
    color: #fff;
}

.inbwp-carrinho-vazio {
    text-align: center;
    padding: 30px 24px;
    color: #a7aaad;
    font-size: 15px;
}

.inbwp-carrinho-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #e5e7eb;
}

.inbwp-carrinho-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

.inbwp-carrinho-total span:last-child {
    color: #2271b1;
    font-size: 20px;
}

.inbwp-carrinho-btn-contratar {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #2271b1;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.inbwp-carrinho-btn-contratar:hover {
    background: #135e96;
}

.inbwp-carrinho-btn-contratar:disabled {
    background: #c3c4c7;
    cursor: not-allowed;
}

/* --- Modal Login --- */
.inbwp-login-form {
    padding: 24px;
}

.inbwp-login-form h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 20px 0;
    text-align: center;
}

.inbwp-login-campo {
    margin-bottom: 14px;
}

.inbwp-login-campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 4px;
}

.inbwp-login-campo input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #c3c4c7;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.inbwp-login-campo input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.inbwp-login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #1d2327;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s ease;
    font-family: inherit;
}

.inbwp-login-btn:hover {
    background: #3c434a;
}

.inbwp-login-erro {
    color: #d63638;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* --- Resultados da Busca --- */
.inbwp-busca-resultados {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 0;
}

.inbwp-busca-resultados .inbwp-vitrine-card {
    flex: 0 0 calc(25% - 12px);
}

.inbwp-busca-titulo {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 5px 0;
}

.inbwp-busca-subtitulo {
    font-size: 14px;
    color: #646970;
    margin: 0 0 20px 0;
}

.inbwp-busca-loading {
    text-align: center;
    padding: 40px;
    color: #646970;
}

/* --- Responsivo --- */
@media (max-width: 900px) {
    .inbwp-busca-resultados .inbwp-vitrine-card {
        flex: 0 0 calc(33.333% - 11px);
    }
}

@media (max-width: 600px) {
    .inbwp-loja-botoes {
        width: 100%;
    }
    
    .inbwp-loja-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .inbwp-vitrine-card {
        flex: 0 0 160px;
    }
    
    .inbwp-vitrine-card-img {
        height: 140px;
    }
    
    .inbwp-busca-resultados .inbwp-vitrine-card {
        flex: 0 0 calc(50% - 8px);
    }
    
    .inbwp-modal-box {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .inbwp-modal-img {
        height: 200px;
    }
    
    .inbwp-modal-acoes {
        flex-direction: column;
    }
}
