/* ==========================================================================
   Responsive Product Catalog - Estilos Consolidados
   Tipografía: Poppins
   Colores Corporativos:
   - Primario: #006B24
   - Oscuro / Encabezados: #0B3D20
   - Acento / Detalle: #65A30D
   - WhatsApp Verde: #22c55e
   ========================================================================== */

/* Variables y Fuente Global */
:root {
    --rpc-primary: #006B24;
    --rpc-dark: #0B3D20;
    --rpc-accent: #65A30D;
    --rpc-wa-green: #22c55e;
    --rpc-wa-hover: #16a34a;
    --rpc-font-family: 'Poppins', sans-serif;
}

body, input, select, textarea, button {
    font-family: var(--rpc-font-family) !important;
}

/* =================================================_
   1. Grillas Dinámicas y Adaptables
   ================================================= */
.rpc-dynamic-grid { 
    display: grid; 
    gap: 20px; 
    grid-template-columns: repeat(var(--desktop-cols, 3), 1fr); 
}
@media (max-width: 768px) {
    .rpc-dynamic-grid { 
        grid-template-columns: repeat(var(--mobile-cols, 1), 1fr); 
    }
}

/* =================================================_
   2. Tarjetas de Productos y Botones
   ================================================= */
.rpc-product-card { 
    border: 1px solid #e2e8f0; 
    padding: 16px; 
    border-radius: 12px; 
    position: relative; 
    background: #fff; 
    text-align: center; 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rpc-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.rpc-product-card img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
}
.rpc-promo-badge { 
    position: absolute; 
    top: 12px; 
    right: 12px; 
    color: #fff; 
    background-color: var(--rpc-accent);
    padding: 4px 10px; 
    font-size: 12px; 
    border-radius: 6px; 
    font-weight: 600; 
    z-index: 2; 
}
.rpc-card-price { 
    font-weight: 700; 
    color: var(--rpc-primary);
    font-size: 18px;
    margin: 10px 0; 
}

.rpc-btn-view { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 10px 18px; 
    background-color: var(--rpc-dark);
    color: #ffffff !important;
    text-decoration: none; 
    font-weight: 600; 
    border-radius: 8px;
    transition: background-color 0.2s ease; 
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}
.rpc-btn-view:hover { 
    background-color: var(--rpc-primary) !important; 
    color: #ffffff !important;
}

/* =================================================_
   3. Listado de Categorías (Alturas Uniformes)
   ================================================= */
.rpc-cat-card-uniform { 
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    background: #fff; 
    overflow: hidden; 
    transition: transform 0.2s ease, box-shadow 0.2s ease; 
}
.rpc-cat-card-uniform:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 24px rgba(0,0,0,0.08); 
    border-color: var(--rpc-accent);
}
.rpc-cat-card-uniform a { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    text-decoration: none; 
}
.rpc-cat-img-box { 
    height: 160px; 
    width: 100%; 
    background: #fdfdfd; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 15px; 
    box-sizing: border-box;
    border-bottom: 1px solid #f1f5f9;
}
.rpc-cat-img-box img { 
    max-height: 100%; 
    max-width: 100%; 
    object-fit: contain; 
}
.rpc-cat-info-box { 
    padding: 16px; 
    text-align: center; 
}
.rpc-cat-info-box h3 { 
    margin: 0 0 5px 0; 
    font-size: 16px; 
    color: var(--rpc-dark); 
    font-weight: 700;
}
.rpc-cat-info-box span { 
    font-size: 13px; 
    color: #64748b; 
}

/* =================================================_
   4. Grilla de Marcas
   ================================================= */
.rpc-brand-grid-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 130px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rpc-brand-grid-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 24px rgba(0,0,0,0.08); 
    border-color: var(--rpc-primary);
}
.rpc-brand-grid-card a { 
    text-decoration: none; 
    width: 100%; 
}
.rpc-brand-grid-img { 
    height: 60px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 10px; 
}
.rpc-brand-grid-img img { 
    max-height: 100%; 
    max-width: 100%; 
    object-fit: contain; 
}
.rpc-brand-grid-card h3 { 
    margin: 0; 
    font-size: 16px; 
    color: var(--rpc-dark); 
    font-weight: 600; 
}

/* =================================================_
   5. Interior / Ficha de Producto (Detalle)
   ================================================= */
.rpc-single-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}
@media (max-width: 768px) {
    .rpc-single-product-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
.rpc-single-col-left {
    position: relative;
}
.rpc-single-col-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rpc-single-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
.rpc-single-content-box {
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
}
.rpc-single-content-box h3 {
    font-size: 20px;
    color: var(--rpc-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

/* =================================================_
   6. Galería Interactiva e Imágenes Principales
   ================================================= */
.rpc-product-image-box .rpc-main-image {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}
.rpc-main-image img { 
    max-width: 100%; 
    height: auto; 
    object-fit: contain;
}
.rpc-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.rpc-thumb-item { 
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer; 
    border: 1px solid #cbd5e1;
    transition: opacity 0.2s, border-color 0.2s; 
}
.rpc-thumb-item:hover { 
    opacity: 0.85; 
    border-color: var(--rpc-primary);
}

/* =================================================_
   7. Calificación y Estrellas
   ================================================= */
.rpc-rating-container { 
    display: flex; 
    gap: 10px; 
    align-items: center;
    margin: 8px 0; 
}
.rpc-rating-number { 
    color: var(--rpc-primary) !important; 
    font-weight: 700 !important;
    line-height: 1; 
}
.rpc-rating-stars { 
    display: flex; 
    gap: 3px; 
    font-size: 18px; 
    color: #e2e8f0; 
}
.rpc-rating-stars .rpc-star.filled,
.rpc-rating-stars .rpc-star.half { 
    color: var(--rpc-accent) !important; 
}

/* =================================================_
   8. Botón Autónomo y Modal de WhatsApp Moderno
   ================================================= */
.rpc-whatsapp-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    background-color: var(--rpc-wa-green) !important; 
    color: #ffffff !important; 
    border: none; 
    padding: 14px 24px; 
    font-size: 16px; 
    font-weight: 700; 
    border-radius: 10px; 
    cursor: pointer; 
    transition: all 0.25s ease-in-out; 
    text-decoration: none; 
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25); 
    width: 100%;
    max-width: 340px;
    box-sizing: border-box;
}
.rpc-whatsapp-btn:hover { 
    background-color: var(--rpc-wa-hover) !important; 
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
}
.rpc-wa-icon { 
    width: 22px; 
    height: 22px; 
    fill: #ffffff; 
    flex-shrink: 0; 
}

.rpc-modal { 
    position: fixed; 
    z-index: 99999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(11, 61, 32, 0.4); 
    backdrop-filter: blur(4px); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.rpc-modal-content { 
    background: #fff; 
    padding: 32px 28px; 
    border-radius: 20px; 
    width: 100%; 
    max-width: 400px; 
    position: relative; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); 
}
.rpc-close { 
    position: absolute; 
    right: 20px; 
    top: 16px; 
    font-size: 24px; 
    color: #6b7280; 
    cursor: pointer; 
    font-weight: 400;
    line-height: 1;
}
.rpc-close:hover { 
    color: #1f2937; 
}
.rpc-modal-content h3, .rpc-modal-title { 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--rpc-dark); 
    margin-top: 0; 
    margin-bottom: 20px; 
}
.rpc-form-group { 
    margin-bottom: 16px; 
    text-align: left;
}
.rpc-form-group label { 
    display: block; 
    font-size: 13px; 
    font-weight: 600; 
    color: #374151; 
    margin-bottom: 6px; 
}
.rpc-form-group input { 
    width: 100%; 
    padding: 12px 14px; 
    border: 1px solid #e5e7eb; 
    border-radius: 10px; 
    font-size: 14px; 
    color: #1f2937; 
    background: #f9fafb; 
    box-sizing: border-box; 
    outline: none;
    transition: border-color 0.2s ease;
}
.rpc-form-group input:focus { 
    border-color: var(--rpc-wa-green); 
    background: #fff; 
}
.rpc-send-wa { 
    background-color: var(--rpc-wa-green) !important; 
    color: #ffffff !important; 
    border: none; 
    padding: 14px; 
    width: 100%; 
    font-size: 16px; 
    font-weight: 700; 
    border-radius: 10px; 
    cursor: pointer; 
    margin-top: 10px; 
    transition: background 0.2s ease;
}
.rpc-send-wa:hover {
    background-color: var(--rpc-wa-hover) !important;
}

/* =================================================_
   9. Filtros AJAX y Sidebar
   ================================================= */
.rpc-mobile-filter-toggle { 
    display: none; 
    background: var(--rpc-dark); 
    color: #fff; 
    border: none; 
    padding: 12px 18px; 
    font-size: 15px; 
    font-weight: 600; 
    border-radius: 8px; 
    margin-bottom: 15px; 
    cursor: pointer; 
    width: 100%; 
}
.rpc-filters-sidebar { 
    background: #ffffff; 
    border: 1px solid #e2e8f0; 
    padding: 20px; 
    border-radius: 12px; 
    max-width: 300px; 
}
.rpc-filter-section { 
    margin-bottom: 20px; 
}
.rpc-filter-section h3 { 
    font-size: 16px; 
    color: var(--rpc-dark); 
    border-bottom: 2px solid var(--rpc-accent); 
    padding-bottom: 5px; 
    margin-bottom: 12px; 
    font-weight: 700;
}
.rpc-filter-list-vertical { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}
.rpc-filter-label { 
    display: flex; 
    align-items: flex-start; 
    gap: 10px; 
    width: 100%; 
    font-size: 14px; 
    cursor: pointer; 
    color: #374151; 
    line-height: 1.4; 
    text-align: left; 
}
.rpc-filter-label input[type="checkbox"] { 
    margin-top: 2px; 
    flex-shrink: 0; 
}
.rpc-filter-checkbox:checked + span { 
    color: var(--rpc-primary); 
    font-weight: 600; 
}

@media (max-width: 768px) {
    .rpc-mobile-filter-toggle { 
        display: block; 
    }
    .rpc-filters-sidebar { 
        display: none; 
        max-width: 100%; 
    }
    .rpc-filters-sidebar.rpc-filters-open { 
        display: block; 
    }
}

/* =================================================_
   10. Carruseles Infinitos (Ticker)
   ================================================= */
.rpc-infinite-ticker-wrapper { 
    overflow: hidden; 
    width: 100%; 
    padding: 16px 0; 
    position: relative; 
}
.rpc-infinite-ticker { 
    display: flex; 
    gap: 20px; 
    width: max-content; 
    animation: rpcTickerScroll 25s linear infinite; 
}
.rpc-infinite-ticker:hover { 
    animation-play-state: paused; 
}

.rpc-ticker-item { 
    flex: 0 0 calc(100vw / var(--desktop-items, 4) - 20px); 
    max-width: 240px;
    border: 1px solid #e2e8f0; 
    padding: 15px; 
    border-radius: 12px; 
    background: #fff; 
    text-align: center; 
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rpc-ticker-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
@media (min-width: 769px) {
    .rpc-ticker-item { 
        flex: 0 0 240px; 
    }
}
@media (max-width: 768px) {
    .rpc-ticker-item { 
        flex: 0 0 calc(100vw / var(--mobile-items, 2) - 15px); 
    }
}
.rpc-ticker-item img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
}

@keyframes rpcTickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =================================================_
   11. Carrusel de Categorías Estilo Tarjeta Grande (Libre)
   ================================================= */
.rpc-cat-card-large {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 280px !important;
    flex: 0 0 260px !important;
}
.rpc-cat-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--rpc-accent) !important;
}
.rpc-cat-card-large a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
}
.rpc-cat-img-free {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.rpc-cat-img-free img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.rpc-cat-content-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.rpc-cat-content-box h4 {
    color: var(--rpc-dark) !important;
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
}
.rpc-cat-underline {
    width: 32px;
    height: 3px;
    background-color: var(--rpc-accent);
    border-radius: 2px;
    margin-bottom: 8px;
}
.rpc-cat-content-box span {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

/* =================================================_
   12. Ficha Técnica y Contenedor de Marca
   ================================================= */
.rpc-tech-pdf-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    background-color: var(--rpc-dark); 
    color: #ffffff !important; 
    padding: 12px 20px; 
    border-radius: 10px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 14px;
    transition: background-color 0.2s ease;
    width: 100%;
    max-width: 340px;
    box-sizing: border-box;
}
.rpc-tech-pdf-btn:hover {
    background-color: var(--rpc-accent);
}

.rpc-brand-container { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin: 10px 0; 
}
.rpc-brand-img { 
    max-height: 40px; 
    width: auto; 
}