/**
 * Confiabonos Mayorista Pro - Frontend Styles
 * Version: 2.9.0
 * Diseño basado en mockups Confiabonos
 */

/* ===== Variables CSS ===== */
:root {
    --cfb-primary: #0E6E3A;
    --cfb-primary-light: #128C4A;
    --cfb-primary-dark: #0a5a2e;
    --cfb-primary-bg: #E8F5EE;
    --cfb-accent: #FFC72C;
    --cfb-accent-light: #FFF4D4;
    --cfb-accent-dark: #e6b025;
    --cfb-success: #22c55e;
    --cfb-danger: #ef4444;
    --cfb-gray-50: #f9fafb;
    --cfb-gray-100: #f3f4f6;
    --cfb-gray-200: #e5e7eb;
    --cfb-gray-300: #d1d5db;
    --cfb-gray-400: #9ca3af;
    --cfb-gray-500: #6b7280;
    --cfb-gray-600: #4b5563;
    --cfb-gray-700: #374151;
    --cfb-gray-800: #1f2937;
    --cfb-gray-900: #111827;
    --cfb-white: #ffffff;
    --cfb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --cfb-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --cfb-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --cfb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --cfb-radius: 8px;
    --cfb-radius-lg: 16px;
    --cfb-radius-xl: 20px;
    --cfb-transition: all 0.2s ease;
}

/* ===== Sección Completa ===== */
.cfb-complete-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
}

/* ===== Badge Compra Mínima (Amarillo arriba) ===== */
.cfb-min-badge-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--cfb-accent);
    border-radius: var(--cfb-radius);
    font-size: 15px;
    font-weight: 600;
    color: var(--cfb-gray-800);
}

.cfb-min-badge-icon {
    font-size: 20px;
}

/* ===== Tabla de Precios ===== */
.cfb-price-table-wrapper {
    background: var(--cfb-white);
    border-radius: var(--cfb-radius-lg);
    overflow: hidden;
    overflow-x: auto;
    /* Fix for cut-off content */
    box-shadow: var(--cfb-shadow-md);
    border: 1px solid var(--cfb-gray-200);
}

.cfb-price-table-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--cfb-primary);
    color: var(--cfb-white);
}

.cfb-table-icon {
    font-size: 20px;
}

.cfb-table-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

.cfb-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.cfb-price-table thead {
    background: var(--cfb-gray-50);
    border-bottom: 1px solid var(--cfb-gray-200);
}

.cfb-price-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--cfb-gray-600);
    font-size: 13px;
}

.cfb-price-table th.cfb-col-public,
.cfb-price-table th.cfb-col-wholesale,
.cfb-price-table th.cfb-col-min {
    text-align: center;
}

.cfb-price-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--cfb-gray-100);
    vertical-align: middle;
}

.cfb-price-row {
    cursor: pointer;
    transition: var(--cfb-transition);
}

.cfb-price-row:hover {
    background: var(--cfb-gray-50);
}

.cfb-price-row:last-child td {
    border-bottom: none;
}

.cfb-price-row.cfb-row-selected {
    background: var(--cfb-primary-bg);
}

.cfb-price-row.cfb-row-selected td:first-child {
    border-left: 4px solid var(--cfb-primary);
}

.cfb-price-row.cfb-row-popular {
    background: var(--cfb-accent-light);
}

.cfb-price-row.cfb-row-popular.cfb-row-selected {
    background: var(--cfb-accent-light);
}

.cfb-price-row.cfb-row-out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Radio buttons estilizados */
.cfb-col-select {
    width: 50px;
    text-align: center;
    padding-left: 16px !important;
}

.cfb-variation-radio {
    width: 20px;
    height: 20px;
    accent-color: var(--cfb-primary);
    cursor: pointer;
    margin: 0;
}

/* Columnas */
.cfb-col-presentation {
    min-width: 140px;
}

.cfb-presentation-name {
    font-weight: 600;
    color: var(--cfb-gray-800);
    font-size: 15px;
}

.cfb-badge-popular {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    background: var(--cfb-accent);
    color: var(--cfb-gray-800);
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.cfb-badge-out {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    background: var(--cfb-danger);
    color: var(--cfb-white);
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
}

.cfb-col-public {
    text-align: center;
}

.cfb-price-public {
    color: var(--cfb-gray-400);
    text-decoration: line-through;
    font-size: 14px;
}

.cfb-col-wholesale {
    text-align: center;
}

.cfb-price-wholesale {
    color: var(--cfb-primary);
    font-weight: 700;
    font-size: 17px;
}

.cfb-col-min {
    text-align: center;
}

.cfb-min-qty {
    color: var(--cfb-gray-500);
    font-size: 14px;
}

/* ===== Badge de Ahorro (Verde con icono $) ===== */
.cfb-savings-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--cfb-primary-bg);
    color: var(--cfb-primary);
    border-radius: var(--cfb-radius);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(14, 110, 58, 0.2);
}

.cfb-savings-badge svg {
    flex-shrink: 0;
    color: var(--cfb-primary);
}

/* ===== Precio Unitario Seleccionado (Barra verde) ===== */
.cfb-selected-price-bar {
    background: var(--cfb-primary);
    border-radius: var(--cfb-radius);
    padding: 20px 24px;
    color: var(--cfb-white);
}

.cfb-selected-price-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.cfb-selected-price-value {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.cfb-selected-price-current {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.cfb-selected-price-original {
    font-size: 18px;
    text-decoration: line-through;
    opacity: 0.7;
}

/* ===== Calculadora ===== */
.cfb-calculator {
    background: var(--cfb-white);
    border-radius: var(--cfb-radius-lg);
    padding: 28px;
    box-shadow: var(--cfb-shadow-md);
    border: 1px solid var(--cfb-gray-200);
}

.cfb-calculator-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--cfb-gray-700);
    margin-bottom: 20px;
    text-align: center;
}

.cfb-calculator-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    background: var(--cfb-gray-50);
    border-radius: var(--cfb-radius);
    padding: 8px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.cfb-qty-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cfb-white);
    color: var(--cfb-primary);
    border: 2px solid var(--cfb-primary);
    border-radius: 50%;
    /* Circular buttons */
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--cfb-transition);
    user-select: none;
    line-height: 1;
    box-shadow: var(--cfb-shadow-sm);
}

.cfb-qty-btn span {
    margin-top: -2px;
}

.cfb-qty-btn:hover {
    background: var(--cfb-primary);
    color: var(--cfb-white);
    transform: translateY(-2px);
    box-shadow: var(--cfb-shadow-md);
}

.cfb-qty-btn:active {
    transform: scale(0.95);
}

.cfb-qty-btn:disabled {
    background: var(--cfb-gray-300);
    cursor: not-allowed;
    transform: none;
}

.cfb-qty-input {
    width: 120px;
    height: 52px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--cfb-gray-800);
    border: none;
    background: transparent;
    -moz-appearance: textfield;
}

.cfb-qty-input::-webkit-outer-spin-button,
.cfb-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cfb-qty-input:focus {
    outline: none;
}

.cfb-calculator-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--cfb-gray-200);
}

.cfb-total-label {
    font-size: 14px;
    color: var(--cfb-gray-500);
}

.cfb-total-value {
    font-size: 38px;
    font-weight: 800;
    color: var(--cfb-primary);
    line-height: 1;
}

/* ===== Botones de Acción ===== */
.cfb-action-buttons {
    display: flex !important;
    gap: 16px !important;
    margin-top: 8px !important;
}

.cfb-buttons-horizontal {
    flex-direction: row !important;
}

.cfb-buttons-vertical,
.cfb-buttons-stacked {
    flex-direction: column !important;
}

/* Base button styles */
.cfb-btn,
.cfb-complete-section .cfb-btn,
.cfb-action-buttons .cfb-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 16px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    flex: 1 !important;
    letter-spacing: 0.3px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.cfb-btn svg,
.cfb-btn .cfb-icon {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
}

/* ===== Botón REALIZAR PEDIDO - Verde Sólido ===== */
.cfb-btn-primary,
.cfb-btn-order,
.cfb-complete-section .cfb-btn-primary,
.cfb-complete-section .cfb-btn-order,
.cfb-action-buttons .cfb-btn-primary,
.cfb-action-buttons .cfb-btn-order,
button.cfb-btn-order,
a.cfb-btn-order {
    background: #0E6E3A !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(14, 110, 58, 0.3) !important;
}

.cfb-btn-primary:hover,
.cfb-btn-order:hover,
.cfb-complete-section .cfb-btn-primary:hover,
.cfb-complete-section .cfb-btn-order:hover,
.cfb-action-buttons .cfb-btn-primary:hover,
.cfb-action-buttons .cfb-btn-order:hover,
button.cfb-btn-order:hover,
a.cfb-btn-order:hover {
    background: #0a5a2e !important;
    background-image: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(14, 110, 58, 0.4) !important;
    color: #ffffff !important;
}

.cfb-btn-primary svg,
.cfb-btn-order svg {
    color: #ffffff !important;
    fill: currentColor !important;
}

/* ===== Botón WHATSAPP - Blanco con borde VERDE (como imagen 4) ===== */
.cfb-btn-whatsapp,
.cfb-complete-section .cfb-btn-whatsapp,
.cfb-action-buttons .cfb-btn-whatsapp,
button.cfb-btn-whatsapp,
a.cfb-btn-whatsapp {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #0E6E3A !important;
    border: 2px solid #0E6E3A !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.cfb-btn-whatsapp:hover,
.cfb-complete-section .cfb-btn-whatsapp:hover,
.cfb-action-buttons .cfb-btn-whatsapp:hover,
button.cfb-btn-whatsapp:hover,
a.cfb-btn-whatsapp:hover {
    background: #E8F5EE !important;
    background-color: #E8F5EE !important;
    background-image: none !important;
    border-color: #0a5a2e !important;
    transform: translateY(-2px) !important;
    color: #0E6E3A !important;
    box-shadow: 0 4px 12px rgba(14, 110, 58, 0.15) !important;
}

/* WhatsApp icon - Naranja/Amarillo circular */
.cfb-btn-whatsapp svg,
.cfb-btn-whatsapp .cfb-icon,
.cfb-btn-whatsapp .cfb-whatsapp-icon {
    color: #FFA726 !important;

/* Icono circular naranja para WhatsApp (como imagen 4) */
.cfb-whatsapp-icon-circle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background: #FFA726 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

.cfb-whatsapp-icon-circle svg {
    width: 16px !important;
    height: 16px !important;
    color: #ffffff !important;
    fill: #ffffff !important;
}
    fill: #FFA726 !important;
}

/* ===== Botón Secundario ===== */
.cfb-btn-secondary {
    background: #f3f4f6 !important;
    background-image: none !important;
    color: #374151 !important;
    border: 2px solid #d1d5db !important;
    box-shadow: none !important;
}

.cfb-btn-secondary:hover {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
}

/* ===== Modal ===== */
.cfb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    animation: cfb-fadeIn 0.3s ease;
}

@keyframes cfb-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cfb-modal {
    background: var(--cfb-white);
    border-radius: var(--cfb-radius-xl);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: cfb-slideUp 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@keyframes cfb-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cfb-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cfb-gray-100);
    border: none;
    color: var(--cfb-gray-500);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--cfb-transition);
}

.cfb-modal-close:hover {
    background: var(--cfb-gray-200);
    color: var(--cfb-gray-700);
}

.cfb-modal-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.cfb-modal-icon svg {
    filter: drop-shadow(0 4px 12px rgba(34, 197, 94, 0.4));
}

.cfb-modal-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--cfb-gray-800);
    margin: 0 0 28px 0;
}

.cfb-modal-summary {
    background: var(--cfb-gray-50);
    border-radius: var(--cfb-radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.cfb-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.cfb-modal-row:not(:last-child) {
    border-bottom: 1px solid var(--cfb-gray-200);
}

.cfb-modal-label {
    color: var(--cfb-gray-500);
    font-size: 14px;
}

.cfb-modal-value {
    font-weight: 600;
    color: var(--cfb-gray-800);
    font-size: 15px;
    text-align: right;
}

.cfb-modal-row-total {
    margin-top: 4px;
    padding-top: 14px !important;
}

.cfb-modal-row-total .cfb-modal-value {
    color: var(--cfb-primary);
    font-size: 20px;
    font-weight: 700;
}

.cfb-modal-instructions {
    background: var(--cfb-primary-bg);
    border-radius: var(--cfb-radius);
    padding: 18px 20px;
    margin-bottom: 28px;
}

.cfb-modal-instructions strong {
    display: block;
    color: var(--cfb-primary);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.cfb-modal-instructions p {
    margin: 0;
    font-size: 14px;
    color: var(--cfb-gray-600);
    line-height: 1.6;
}

.cfb-modal-actions {
    display: flex !important;
    gap: 12px !important;
}

.cfb-modal-actions .cfb-btn {
    flex: 1 !important;
    padding: 16px 24px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

/* Modal - Botón Volver (gris claro como imagen 6) */
.cfb-modal-back,
.cfb-modal-actions .cfb-modal-back {
    background: #f9fafb !important;
    background-image: none !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
}

.cfb-modal-back:hover,
.cfb-modal-actions .cfb-modal-back:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
}

/* Modal - Botón Confirmar WhatsApp (VERDE sólido como imagen 6) */
.cfb-modal-confirm,
.cfb-modal-actions .cfb-modal-confirm {
    background: #0E6E3A !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(14, 110, 58, 0.25) !important;
}

.cfb-modal-confirm:hover,
.cfb-modal-actions .cfb-modal-confirm:hover {
    background: #0a5a2e !important;
    box-shadow: 0 6px 16px rgba(14, 110, 58, 0.35) !important;
    color: #ffffff !important;
}

.cfb-modal-confirm svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* ===== Carousel ===== */
.cfb-carousel-section {
    padding: 60px 20px;
    background: var(--cfb-gray-50);
}

.cfb-carousel-header {
    text-align: center;
    margin-bottom: 40px;
}

.cfb-carousel-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--cfb-gray-800);
    margin: 0 0 12px 0;
}

.cfb-carousel-subtitle {
    font-size: 16px;
    color: var(--cfb-gray-500);
    margin: 0;
}

.cfb-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cfb-carousel-nav {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cfb-white);
    border: 2px solid var(--cfb-gray-200);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--cfb-transition);
    box-shadow: var(--cfb-shadow-md);
    color: var(--cfb-gray-600);
}

.cfb-carousel-nav:hover {
    background: var(--cfb-primary);
    color: var(--cfb-white);
    border-color: var(--cfb-primary);
    transform: scale(1.05);
}

.cfb-carousel-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.cfb-carousel-track-wrapper {
    flex: 1;
    overflow: hidden;
}

.cfb-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cfb-carousel-slide {
    flex: 0 0 calc(33.333% - 16px);
    padding: 0 12px;
    box-sizing: border-box;
}

/* Product Card del Carousel */
.cfb-product-card {
    background: var(--cfb-white);
    border-radius: var(--cfb-radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--cfb-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cfb-gray-100);
}

.cfb-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.cfb-product-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cfb-product-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--cfb-gray-100);
}

.cfb-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cfb-product-card:hover .cfb-product-image img {
    transform: scale(1.08);
}

.cfb-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cfb-gray-300);
    background: var(--cfb-gray-100);
}

.cfb-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cfb-product-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--cfb-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.cfb-product-presentations {
    font-size: 13px;
    color: var(--cfb-gray-500);
    margin: 0 0 8px 0;
}

.cfb-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--cfb-primary);
    margin: 0 0 12px 0;
}

.cfb-product-min {
    margin-top: auto;
}

.cfb-min-badge {
    display: inline-block;
    padding: 8px 14px;
    background: var(--cfb-accent-light);
    color: var(--cfb-gray-700);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--cfb-radius);
    border: 1px solid rgba(255, 199, 44, 0.3);
}

.cfb-product-actions {
    padding: 0 20px 20px;
}

.cfb-btn-view {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--cfb-primary);
    color: var(--cfb-white);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--cfb-radius);
    transition: var(--cfb-transition);
}

.cfb-btn-view:hover {
    background: var(--cfb-primary-dark);
    color: var(--cfb-white);
}

/* Carousel Dots */
.cfb-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.cfb-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cfb-gray-300);
    border: none;
    cursor: pointer;
    transition: var(--cfb-transition);
    padding: 0;
}

.cfb-carousel-dot:hover {
    background: var(--cfb-gray-400);
}

.cfb-carousel-dot.active {
    background: var(--cfb-primary);
    width: 32px;
    border-radius: 6px;
}

/* ===== WhatsApp Button ===== */
.cfb-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--cfb-radius);
    transition: var(--cfb-transition);
}

.cfb-whatsapp-primary {
    background: #25d366;
    color: var(--cfb-white);
}

.cfb-whatsapp-primary:hover {
    background: #1fb855;
    color: var(--cfb-white);
    transform: translateY(-2px);
}

.cfb-whatsapp-secondary {
    background: var(--cfb-white);
    color: #25d366;
    border: 2px solid #25d366;
}

.cfb-whatsapp-secondary:hover {
    background: #25d366;
    color: var(--cfb-white);
}

.cfb-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    border-radius: 50px;
    box-shadow: var(--cfb-shadow-lg);
    animation: cfb-pulse 2s infinite;
}

@keyframes cfb-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .cfb-carousel-slide {
        flex: 0 0 calc(50% - 16px);
    }

    .cfb-carousel-nav {
        width: 44px;
        height: 44px;
    }

    .cfb-carousel-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .cfb-price-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cfb-price-table {
        min-width: 480px;
    }

    .cfb-action-buttons {
        flex-direction: column;
    }

    .cfb-modal {
        padding: 28px 24px;
        margin: 16px;
        border-radius: var(--cfb-radius-lg);
    }

    .cfb-modal-title {
        font-size: 20px;
    }

    .cfb-modal-actions {
        flex-direction: column;
    }

    .cfb-carousel-section {
        padding: 40px 16px;
    }

    .cfb-carousel-slide {
        flex: 0 0 calc(100% - 16px);
    }

    .cfb-carousel-nav {
        display: none;
    }

    .cfb-carousel-title {
        font-size: 24px;
    }

    .cfb-carousel-subtitle {
        font-size: 14px;
    }

    .cfb-total-value {
        font-size: 32px;
    }

    .cfb-selected-price-current {
        font-size: 28px;
    }

    .cfb-selected-price-bar {
        padding: 16px 20px;
    }

    .cfb-whatsapp-float span {
        display: none;
    }

    .cfb-whatsapp-float {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .cfb-min-badge-wrapper {
        font-size: 13px;
        padding: 10px 14px;
        width: 100%;
        justify-content: center;
    }

    .cfb-calculator {
        padding: 20px 16px;
    }

    .cfb-calculator-controls {
        max-width: 100%;
    }

    .cfb-qty-btn {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .cfb-qty-input {
        width: 100px;
        height: 48px;
        font-size: 24px;
    }

    .cfb-btn {
        padding: 16px 20px;
        font-size: 15px;
    }

    .cfb-total-value {
        font-size: 28px;
    }

    .cfb-selected-price-current {
        font-size: 24px;
    }

    .cfb-selected-price-original {
        font-size: 14px;
    }

    .cfb-product-card {
        border-radius: var(--cfb-radius-lg);
    }

    .cfb-product-name {
        font-size: 15px;
    }

    .cfb-product-price {
        font-size: 16px;
    }
}

/* ===== Grid de Productos (Archive/Tienda) ===== */
.cfb-product-grid-section {
    padding: 40px 0;
}

.cfb-grid-header {
    text-align: center;
    margin-bottom: 40px;
}

.cfb-grid-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--cfb-gray-800);
    margin: 0 0 12px 0;
}

.cfb-grid-subtitle {
    font-size: 16px;
    color: var(--cfb-gray-500);
    margin: 0 0 16px 0;
}

.cfb-grid-count {
    display: inline-block;
    padding: 6px 16px;
    background: var(--cfb-primary-bg);
    color: var(--cfb-primary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Grid Layout */
.cfb-product-grid {
    display: grid;
    gap: 24px;
}

.cfb-grid-cols-1 { grid-template-columns: 1fr; }
.cfb-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cfb-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cfb-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.cfb-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.cfb-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Grid Item */
.cfb-grid-item {
    display: flex;
}

.cfb-grid-item.cfb-out-of-stock .cfb-product-card {
    opacity: 0.7;
}

/* Product Card en Grid */
.cfb-product-grid .cfb-product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--cfb-white);
    border-radius: var(--cfb-radius-lg);
    overflow: hidden;
    box-shadow: var(--cfb-shadow-md);
    border: 1px solid var(--cfb-gray-200);
    transition: all 0.3s ease;
}

.cfb-product-grid .cfb-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cfb-shadow-lg);
    border-color: var(--cfb-primary);
}

.cfb-product-grid .cfb-product-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.cfb-product-grid .cfb-product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Aspect ratio 1:1 */
    background: var(--cfb-gray-100);
    overflow: hidden;
}

.cfb-product-grid .cfb-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cfb-product-grid .cfb-product-card:hover .cfb-product-image img {
    transform: scale(1.05);
}

.cfb-product-grid .cfb-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cfb-gray-100);
    color: var(--cfb-gray-400);
}

/* Badges en imagen */
.cfb-stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.cfb-badge-outofstock {
    background: var(--cfb-danger);
    color: var(--cfb-white);
}

.cfb-variations-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--cfb-primary);
    color: var(--cfb-white);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

/* Info del producto en grid */
.cfb-product-grid .cfb-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cfb-product-grid .cfb-product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--cfb-gray-800);
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cfb-product-grid .cfb-product-presentations {
    font-size: 13px;
    color: var(--cfb-gray-500);
    margin: 0 0 12px 0;
}

.cfb-presentations-label {
    color: var(--cfb-gray-400);
}

.cfb-product-grid .cfb-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--cfb-primary);
    margin: 0 0 12px 0;
}

.cfb-product-grid .cfb-product-min {
    margin-top: auto;
}

.cfb-product-grid .cfb-min-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--cfb-accent-light);
    color: var(--cfb-gray-700);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Actions en grid */
.cfb-product-grid .cfb-product-actions {
    padding: 0 20px 20px;
}

.cfb-product-grid .cfb-btn-view {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--cfb-primary);
    color: var(--cfb-white);
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cfb-product-grid .cfb-btn-view:hover {
    background: var(--cfb-primary-dark);
    transform: translateY(-1px);
}

/* Estilos de Card */
.cfb-card-compact .cfb-product-info {
    padding: 16px;
}

.cfb-card-compact .cfb-product-name {
    font-size: 14px;
}

.cfb-card-compact .cfb-product-price {
    font-size: 16px;
}

.cfb-card-detailed .cfb-product-info {
    padding: 24px;
}

.cfb-card-detailed .cfb-product-name {
    font-size: 18px;
    -webkit-line-clamp: 3;
}

/* Paginación */
.cfb-grid-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.cfb-page-btn {
    padding: 12px 24px;
    background: var(--cfb-white);
    color: var(--cfb-primary);
    border: 2px solid var(--cfb-primary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cfb-page-btn:hover {
    background: var(--cfb-primary);
    color: var(--cfb-white);
}

.cfb-page-numbers {
    display: flex;
    gap: 8px;
}

.cfb-page-num {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cfb-gray-100);
    color: var(--cfb-gray-700);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cfb-page-num:hover {
    background: var(--cfb-primary-bg);
    color: var(--cfb-primary);
}

.cfb-page-num.active {
    background: var(--cfb-primary);
    color: var(--cfb-white);
}

.cfb-page-dots {
    display: flex;
    align-items: center;
    color: var(--cfb-gray-400);
}

/* No Products */
.cfb-no-products {
    text-align: center;
    padding: 60px 20px;
    background: var(--cfb-gray-50);
    border-radius: var(--cfb-radius-lg);
    color: var(--cfb-gray-500);
    grid-column: 1 / -1;
}

.cfb-no-products svg {
    margin-bottom: 20px;
    color: var(--cfb-gray-300);
}

.cfb-no-products p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

/* ===== Filtros del Grid ===== */
.cfb-grid-filters {
    background: var(--cfb-white);
    border-radius: var(--cfb-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--cfb-shadow);
    border: 1px solid var(--cfb-gray-200);
}

.cfb-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.cfb-filter-group {
    flex: 1;
    min-width: 180px;
}

.cfb-filter-group.cfb-filter-search {
    flex: 2;
    min-width: 280px;
}

.cfb-filter-group.cfb-filter-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

/* Search Input */
.cfb-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cfb-search-icon {
    position: absolute;
    left: 14px;
    color: var(--cfb-gray-400);
    pointer-events: none;
}

.cfb-search-input {
    width: 100%;
    padding: 12px 40px 12px 44px !important;
    border: 2px solid var(--cfb-gray-200) !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    transition: all 0.2s ease !important;
    background: var(--cfb-white) !important;
}

.cfb-search-input:focus {
    border-color: var(--cfb-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(14, 110, 58, 0.1) !important;
}

.cfb-search-clear {
    position: absolute;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cfb-gray-200);
    border: none;
    border-radius: 50%;
    font-size: 16px;
    color: var(--cfb-gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cfb-search-clear:hover {
    background: var(--cfb-gray-300);
    color: var(--cfb-gray-700);
}

/* Select Filters */
.cfb-filter-select {
    width: 100%;
    padding: 12px 36px 12px 14px !important;
    border: 2px solid var(--cfb-gray-200) !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: var(--cfb-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center !important;
    appearance: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.cfb-filter-select:focus {
    border-color: var(--cfb-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(14, 110, 58, 0.1) !important;
}

/* Price Inputs */
.cfb-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfb-price-min,
.cfb-price-max {
    width: 100%;
    padding: 12px 14px !important;
    border: 2px solid var(--cfb-gray-200) !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

.cfb-price-min:focus,
.cfb-price-max:focus {
    border-color: var(--cfb-primary) !important;
    outline: none !important;
}

.cfb-price-separator {
    color: var(--cfb-gray-400);
    font-weight: 500;
}

/* Filter Buttons */
.cfb-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.cfb-filter-apply {
    background: var(--cfb-primary);
    color: var(--cfb-white);
}

.cfb-filter-apply:hover {
    background: var(--cfb-primary-dark);
}

.cfb-filter-clear {
    background: var(--cfb-gray-100);
    color: var(--cfb-gray-600);
    border: 1px solid var(--cfb-gray-200);
}

.cfb-filter-clear:hover {
    background: var(--cfb-gray-200);
}

/* Filters Info */
.cfb-filters-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--cfb-gray-100);
}

.cfb-results-count {
    font-size: 14px;
    color: var(--cfb-gray-600);
}

.cfb-results-count strong {
    color: var(--cfb-primary);
}

.cfb-active-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cfb-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--cfb-primary-bg);
    color: var(--cfb-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.cfb-active-filter button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--cfb-primary);
    font-size: 16px;
    line-height: 1;
}

/* Loading State */
.cfb-grid-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
    gap: 16px;
    min-height: 200px;
}

.cfb-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cfb-gray-200);
    border-top-color: var(--cfb-primary);
    border-radius: 50%;
    animation: cfb-spin 0.8s linear infinite;
}

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

.cfb-grid-loading span {
    font-size: 14px;
    color: var(--cfb-gray-500);
}

/* Make grid relative for loading overlay */
.cfb-product-grid-section {
    position: relative;
}

/* Pagination buttons as buttons */
.cfb-page-num,
.cfb-page-btn {
    border: none;
    cursor: pointer;
}

.cfb-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cfb-page-btn:disabled:hover {
    background: var(--cfb-white);
    color: var(--cfb-primary);
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .cfb-grid-cols-6 { grid-template-columns: repeat(4, 1fr); }
    .cfb-grid-cols-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .cfb-grid-cols-6,
    .cfb-grid-cols-5,
    .cfb-grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .cfb-grid-cols-6,
    .cfb-grid-cols-5,
    .cfb-grid-cols-4,
    .cfb-grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    
    .cfb-product-grid {
        gap: 16px;
    }
    
    .cfb-grid-title {
        font-size: 24px;
    }
    
    .cfb-product-grid .cfb-product-name {
        font-size: 14px;
    }
    
    .cfb-product-grid .cfb-product-price {
        font-size: 16px;
    }
    
    .cfb-page-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Filters responsive */
    .cfb-filters-row {
        flex-direction: column;
    }
    
    .cfb-filter-group {
        min-width: 100%;
    }
    
    .cfb-filter-group.cfb-filter-search {
        min-width: 100%;
    }
    
    .cfb-filter-group.cfb-filter-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .cfb-filter-group.cfb-filter-actions .cfb-filter-btn {
        flex: 1;
        justify-content: center;
    }
    
    .cfb-filters-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .cfb-grid-cols-2 { grid-template-columns: 1fr; }
    
    .cfb-grid-pagination {
        flex-direction: column;
    }
    
    .cfb-page-numbers {
        order: -1;
    }
    
    .cfb-grid-filters {
        padding: 16px;
    }
    
    .cfb-price-inputs {
        flex-direction: column;
    }
    
    .cfb-price-separator {
        display: none;
    }
}