/* ==========================================================================
   Cemauto Repuestos - Estilos Tienda en Línea Híbrida
   Paleta Oficial Cemauto
   ========================================================================== */

:root {
    --primary-blue: #0b1d3a;
    --accent-yellow: #f5b041;
    --accent-yellow-hover: #d49a31;
    --bg-light: #f8f9fa;
    --text-dark: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --transition-speed: 0.3s;
    --store-red: #cc0000; /* Toque comercial estilo AutoZone/Super Repuestos */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.store-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Cabecera Superior */
.store-top-header {
    background-color: var(--primary-blue);
    border-bottom: 3px solid var(--accent-yellow);
    padding: 12px 0;
}

.topbar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.store-logo-img {
    height: 45px;
    width: auto;
    display: block;
}

.store-search-bar-container {
    flex: 1;
    max-width: 600px;
    display: flex;
}

.store-search-input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.95rem;
    outline: none;
}

.store-search-btn {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.store-search-btn:hover {
    background-color: var(--accent-yellow-hover);
}

.store-user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-link, .action-cart-btn {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-cart-btn {
    background-color: var(--store-red);
    padding: 8px 14px;
    border-radius: 4px;
}

.cart-badge {
    background-color: var(--white);
    color: var(--store-red);
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Barra de Categorías */
.store-category-nav {
    background-color: #1a2a4a;
    padding: 10px 0;
}

.category-menu-list {
    list-style: none;
    display: flex;
    gap: 25px;
    overflow-x: auto;
}

.category-menu-list a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color var(--transition-speed);
}

.category-menu-list a:hover {
    color: var(--accent-yellow);
}

/* Contenedor Principal de Pasos Dinámicos */
.store-main-content {
    margin: 40px auto;
    min-height: 500px;
}

.step-container {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.catalog-step-title {
    font-size: 1.6rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Barra de Navegación "Volver" */
.nav-back-row {
    margin-bottom: 20px;
}

.btn-back-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition-speed);
}

.btn-back-link:hover {
    color: var(--store-red);
}

/* Cuadrícula de Tarjetas de Selección (Marcas, Modelos, Motores) */
.selection-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.brand-selection-card {
    background: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-selection-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-yellow);
    box-shadow: 0 8px 20px rgba(11, 29, 58, 0.12);
}

.card-img-wrapper {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.card-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.brand-selection-card h3 {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.brand-selection-card small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.motor-card-title {
    color: var(--store-red) !important;
}

.empty-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Tarjetas de Productos del Catálogo Final */
.products-grid-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.q-card.part-card-item {
    background: var(--white);
    border-radius: 6px;
    padding: 15px;
    text-align: left;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-speed);
}

.q-card.part-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.q-card.part-card-item img {
    height: 130px;
    object-fit: contain;
    margin-bottom: 10px;
    width: 100%;
}

.part-number-tag {
    font-size: 0.75rem;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
}

.part-title {
    margin: 5px 0;
    font-size: 1rem;
    color: var(--primary-blue);
    font-weight: 700;
}

.part-brand {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.part-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.btn-store-accent {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background var(--transition-speed);
    text-align: center;
    display: block;
    width: 100%;
}

.btn-store-accent:hover {
    background-color: var(--accent-yellow-hover);
}

.loading-state-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Footer Comercial */
.store-footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 25px 0;
    margin-top: 60px;
    border-top: 4px solid var(--accent-yellow);
}

.footer-content-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 15px;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .topbar-flex {
        flex-direction: column;
        align-items: stretch;
    }
    .store-search-bar-container {
        max-width: 100%;
    }
    .selection-cards-grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================================
   CINTILLO TIENDA ACTIVA - Reemplaza al de Construcción
   ========================================================================== */
.store-active-banner {
    background: linear-gradient(135deg, #0b1d3a, #16325c);
    color: #ffffff;
    border-bottom: 4px solid #f5b041;
    padding: 18px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.store-active-banner-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.store-active-banner p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
    color: #e2e8f0;
    text-align: left;
}
.store-active-banner strong {
    color: #f5b041;
}
.btn-banner-wa {
    background: #25D366;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.2s;
}
.btn-banner-wa:hover {
    background: #1ebd5a;
}

@media (max-width: 768px) {
    .store-active-banner-content {
        flex-direction: column;
        text-align: center;
    }
    .store-active-banner p {
        text-align: center;
    }
}

/* ==========================================================================
   BANNERS PROMO - Dado10 y Taller - Antes estaban inline en index.php
   ========================================================================== */
.dado10-promo-banner {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    color: #ffffff;
    padding: 25px 30px;
    margin: 30px 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    box-shadow: 0 10px 25px rgba(59,130,246,0.15);
}
.taller-promo-banner {
    background: linear-gradient(135deg, #1e293b, #0b1d3a);
    border: 2px solid #f5b041;
    border-radius: 12px;
    color: #ffffff;
    padding: 25px 30px;
    margin: 20px 0 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    box-shadow: 0 10px 25px rgba(245,176,65,0.15);
}
.promo-content h3 { font-size: 1.4rem; color: #60a5fa; margin-bottom: 8px; font-weight: 700; }
.taller-promo-banner .promo-content h3 { color: #f5b041; }
.promo-content p { margin: 0; color: #cbd5e1; font-size: 0.95rem; line-height: 1.5; }
.btn-promo-cta {
    background: #3b82f6; color: #fff; padding: 12px 22px; border-radius: 8px;
    text-decoration: none; font-weight: bold; font-size: 0.95rem;
    display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
}
.btn-promo-cta:hover { background: #2563eb; }
.btn-taller-cta {
    background: #f5b041; color: #0b1d3a; padding: 12px 22px; border-radius: 8px;
    text-decoration: none; font-weight: bold; font-size: 0.95rem;
    display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
}
.btn-taller-cta:hover { background: #e09f30; }

/* ==========================================================================
   FAQ VISIBLE + TARJETAS IA - Para SEO / GEO - Reutilizable en index y detalle
   ========================================================================== */
.faq-geo-box {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    margin-top: 40px;
}
.faq-geo-box h2 { font-size: 1.3rem; color: var(--primary-blue); }
.faq-geo-box h3 { font-size: 1rem; margin-top: 18px; color: var(--primary-blue); }
.faq-geo-box p { color: var(--text-muted); line-height: 1.6; margin-top: 6px; font-size: 0.95rem; }

.ai-context-card {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}
.ai-context-card h4 { margin: 0 0 8px 0; font-size: 0.95rem; color: #1e293b; display: flex; align-items: center; gap: 6px; }
.ai-context-card p { margin: 0; font-size: 0.9rem; color: #334155; line-height: 1.5; }

/* Ficha de producto - detalle.php */
.product-detail-wrapper { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; padding: 30px; margin-top: 20px; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-image-container { text-align: center; border: 1px solid #edf2f7; border-radius: 10px; padding: 20px; background: #fafafa; }
.product-main-img { width: 100%; max-height: 380px; object-fit: contain; border-radius: 8px; }
.product-meta-badge { display: inline-block; background: #edf2f7; color: #16325c; font-size: 0.85rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; margin-bottom: 12px; }
.product-title-header { font-size: 1.8rem; color: #0b1d3a; font-weight: 800; margin-bottom: 15px; line-height: 1.3; }
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #edf2f7; font-size: 0.95rem; }
.spec-table th { background: #f8fafc; color: #64748b; font-weight: 600; width: 40%; }
.spec-table td { color: #2d3748; font-weight: 500; }
.compatibility-box { background: #f8fafc; border-left: 4px solid #d49a31; padding: 20px; border-radius: 6px; margin-top: 25px; }
.compatibility-box h3 { margin-top: 0; font-size: 1.1rem; color: #0b1d3a; }
.compatibility-list { list-style: none; padding-left: 0; margin-bottom: 0; }
.compatibility-list li { font-size: 0.92rem; color: #4a5568; padding: 4px 0; display: flex; align-items: center; gap: 8px; }
.btn-wa-green { background: #25D366; color: #fff; text-decoration: none; padding: 12px 24px; border-radius: 6px; display: inline-flex; align-items: center; gap: 10px; font-weight: bold; font-size: 1rem; }
.btn-wa-green:hover { background: #1ebd5a; }
