/* =================================================_
   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 #e1e1e1; 
    padding: 15px; 
    border-radius: 6px; 
    position: relative; 
    background: #fff; 
    text-align: center; 
}
.rpc-product-card img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 4px; 
}
.rpc-promo-badge { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    color: #fff; 
    padding: 3px 8px; 
    font-size: 12px; 
    border-radius: 3px; 
    font-weight: bold; 
    z-index: 2; 
}
.rpc-card-price { 
    font-weight: bold; 
    margin: 10px 0; 
}

.rpc-btn-view { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 8px 18px; 
    text-decoration: none; 
    font-weight: 600; 
    transition: opacity 0.2s; 
    margin-top: 10px;
}
.rpc-btn-view:hover { 
    opacity: 0.85; 
}

/* =================================================_
   3. Listado de Categorías (Alturas Uniformes)
   ================================================= */
.rpc-cat-card-uniform { 
    border: 1px solid #e1e1e1; 
    border-radius: 8px; 
    background: #fff; 
    overflow: hidden; 
    transition: transform 0.2s; 
}
.rpc-cat-card-uniform:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
}
.rpc-cat-card-uniform a { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    text-decoration: none; 
}
.rpc-cat-img-box { 
    height: 160px; 
    width: 100%; 
    background: #fcfcfc; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 15px; 
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
}
.rpc-cat-img-box img { 
    max-height: 100%; 
    max-width: 100%; 
    object-fit: contain; 
}
.rpc-cat-info-box { 
    padding: 15px; 
    text-align: center; 
}
.rpc-cat-info-box h3 { 
    margin: 0 0 5px 0; 
    font-size: 16px; 
    color: #002852; 
}
.rpc-cat-info-box span { 
    font-size: 13px; 
    color: #777; 
}

/* =================================================_
   4. Grilla de Marcas
   ================================================= */
.rpc-brand-grid-card {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    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;
}
.rpc-brand-grid-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
}
.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: #002852; 
    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;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}
.rpc-single-content-box {
    margin-top: 40px;
    border-top: 1px solid #e1e1e1;
    padding-top: 30px;
}
.rpc-single-content-box h3 {
    font-size: 20px;
    color: #002852;
    margin-bottom: 15px;
}

/* =================================================_
   6. Galería Interactiva e Imágenes Principales
   ================================================= */
.rpc-main-image img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 6px; 
}
.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: 4px;
    cursor: pointer; 
    border: 1px solid #ddd;
    transition: opacity 0.2s, border-color 0.2s; 
}
.rpc-thumb-item:hover { 
    opacity: 0.7; 
    border-color: #FB6008;
}

/* =================================================_
   7. Calificación y Estrellas
   ================================================= */
.rpc-rating-container { 
    display: flex; 
    gap: 8px; 
    margin: 10px 0; 
}
.rpc-rating-number { 
    color: #1a1a1a; 
    line-height: 1; 
    letter-spacing: -1px; 
}
.rpc-rating-stars { 
    display: flex; 
    gap: 3px; 
    font-size: 18px; 
    color: #e4e4e4; 
}
.rpc-rating-stars .rpc-star.filled { 
    color: #ffb800; 
}

/* =================================================_
   8. Botón y Modal de WhatsApp
   ================================================= */
.rpc-whatsapp-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    background: #25d366; 
    color: #fff; 
    border: none; 
    padding: 12px 22px; 
    font-size: 16px; 
    font-weight: bold; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: background 0.3s; 
    text-decoration: none; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
}
.rpc-whatsapp-btn:hover { 
    background: #20ba5a; 
}
.rpc-wa-icon { 
    width: 22px; 
    height: 22px; 
    fill: #fff; 
    flex-shrink: 0; 
}

.rpc-modal { 
    position: fixed; 
    z-index: 99999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(3px); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.rpc-modal-content { 
    background: #fff; 
    padding: 35px 30px; 
    border-radius: 12px; 
    width: 100%; 
    max-width: 400px; 
    position: relative; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
}
.rpc-close { 
    position: absolute; 
    right: 20px; 
    top: 20px; 
    font-size: 22px; 
    color: #888; 
    cursor: pointer; 
}
.rpc-close:hover { 
    color: #1a1a1a; 
}
.rpc-modal-content h3 { 
    font-size: 22px; 
    font-weight: 700; 
    color: #002852; 
    margin-top: 0; 
    margin-bottom: 25px; 
}
.rpc-form-group { 
    margin-bottom: 18px; 
}
.rpc-form-group label { 
    display: block; 
    font-size: 13px; 
    font-weight: 600; 
    color: #444; 
    margin-bottom: 6px; 
}
.rpc-form-group input { 
    width: 100%; 
    padding: 12px 14px; 
    border: 1px solid #dcdcdc; 
    border-radius: 6px; 
    font-size: 15px; 
    color: #333; 
    background: #fafafa; 
    box-sizing: border-box; 
}
.rpc-form-group input:focus { 
    border-color: #25d366; 
    background: #fff; 
    outline: none; 
}
.rpc-send-wa { 
    background: #25d366; 
    color: #fff; 
    border: none; 
    padding: 14px; 
    width: 100%; 
    font-size: 16px; 
    font-weight: bold; 
    border-radius: 6px; 
    cursor: pointer; 
    margin-top: 10px; 
}

/* =================================================_
   9. Filtros AJAX y Sidebar
   ================================================= */
.rpc-mobile-filter-toggle { 
    display: none; 
    background: #002852; 
    color: #fff; 
    border: none; 
    padding: 10px 16px; 
    font-size: 15px; 
    font-weight: bold; 
    border-radius: 4px; 
    margin-bottom: 15px; 
    cursor: pointer; 
    width: 100%; 
}
.rpc-filters-sidebar { 
    background: #fdfdfd; 
    border: 1px solid #e1e1e1; 
    padding: 20px; 
    border-radius: 6px; 
    max-width: 300px; 
}
.rpc-filter-section { 
    margin-bottom: 20px; 
}
.rpc-filter-section h3 { 
    font-size: 16px; 
    color: #002852; 
    border-bottom: 2px solid #FB6008; 
    padding-bottom: 5px; 
    margin-bottom: 12px; 
}
.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: #333; 
    line-height: 1.4; 
    text-align: left; 
}
.rpc-filter-label input[type="checkbox"] { 
    margin-top: 2px; 
    flex-shrink: 0; 
}

@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: 15px 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 #e1e1e1; 
    padding: 15px; 
    border-radius: 8px; 
    background: #fff; 
    text-align: center; 
    box-sizing: border-box;
}
@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: 4px; 
}

@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: #FB6008 !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: #002852 !important;
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
}
.rpc-cat-underline {
    width: 32px;
    height: 3px;
    background-color: #FB6008;
    border-radius: 2px;
    margin-bottom: 8px;
}
.rpc-cat-content-box span {
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
}

/* =================================================_
   12. Ficha Técnica y Contenedor de Marca
   ================================================= */
.rpc-tech-pdf-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    background: #d9534f; 
    color: #fff; 
    padding: 10px 16px; 
    border-radius: 4px; 
    text-decoration: none; 
    font-weight: bold; 
}
.rpc-brand-container { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin: 10px 0; 
}
.rpc-brand-img { 
    max-height: 40px; 
    width: auto; 
}