/* styles.css - Carrocerías Chama - Versión Profesional */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #FFC31F;        /* Amarillo dorado - SOLO para acentos importantes */
    --primary-dark: #EB8107;    /* Naranja - hover estados */
    --dark: #1F1F1F;           /* Negro - textos y fondos importantes */
    --gray-dark: #4B4847;       /* Gris oscuro - textos secundarios */
    --gray-light: #E6E1DB;      /* Beige - fondo general sutil */
    --white: #FFFFFF;           /* Blanco - tarjetas y contrastes */
    
    /* Sombras profesionales */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    --border-radius: 12px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* HEADER - Minimalista y profesional */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 20px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.menu-toggle:active {
    background: rgba(0,0,0,0.05);
}

.header-logo {
    max-height: 150px;
    width: auto;
    object-fit: contain;
}

.header-spacer {
    width: 44px;
}

/* Menú desplegable - limpio */
.dropdown-menu {
    display: none;
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-md);
}

.dropdown-menu.open {
    display: block;
}

.dropdown-menu ul {
    list-style: none;
    padding: 8px 0;
}

.dropdown-menu li a {
    display: block;
    padding: 14px 24px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:active {
    background: var(--gray-light);
}

/* CHIPS DE ACCIÓN - estilo moderno */
.actions-carousel-container {
    padding: 20px 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.actions-carousel-container::-webkit-scrollbar {
    display: none;
}

.actions-carousel {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    width: max-content;
}

.action-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--primary);
    border: none;
    border-radius: 40px;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.action-chip i {
    color: var(--dark);
    font-size: 1rem;
}

.action-chip:active {
    background: var(--primary-dark);
    color: var(--dark);
}

.action-chip:active i {
    color: var(--dark);
}

/* CARRUSEL DE BANNERS - elegante */
.banners-section {
    padding: 8px 0 0px;
    position: relative;
}

.banners-carousel {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.banners-carousel::-webkit-scrollbar {
    display: none;
}

.banner-item {
    flex: 0 0 280px;
    height: 350px;
    border-radius: 24px;
    overflow: visible;
    scroll-snap-align: center;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
}


.banner-item:active {
    transform: scale(0.98);
}

.banner-img {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.banner-item:hover .banner-img,
.banner-item:active .banner-img {
    transform: scale(1.02);
}

/* Efecto de brillo sutil en los bordes */
.banner-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.5);
    pointer-events: none;
}

.banners-indicators {
    display: none;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.banner-indicator {
    width: 4px;
    height: 4px;
    border-radius: 2px;
    background: var(--gray-dark);
    opacity: 0.3;
    transition: all 0.3s;
}

.banner-indicator.active {
    width: 20px;
    opacity: 1;
    background: var(--primary);
}

/* BOTONES DE CATEGORÍA - sobrios y profesionales */
.category-buttons {
    display: flex;
    gap: 8px;
    padding: 0 20px 24px;
}

.category-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px;
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.category-btn i {
    font-size: 1.6rem;
    color: var(--primary);
    transition: all 0.2s;
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
}

.category-btn.active i {
    color: var(--dark);
}

.category-btn:active {
    transform: scale(0.97);
}

/* TÍTULOS DE SECCIÓN - elegantes */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 20px 16px;
    color: var(--dark);
    letter-spacing: -0.02em;
}

/* GRID DE PRODUCTOS - limpio y profesional */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 20px 30px;
}

@media (min-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-item {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.03);
}

.product-item:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: var(--gray-light);
}

.product-info {
    padding: 12px 8px;
}

.product-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--dark);
    line-height: 1.3;
}

.product-category {
    font-size: 0.75rem;
    color: var(--gray-dark);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* PANTALLA DE DETALLE DE PRODUCTO */
#productDetailScreen {
    background: var(--white);
    min-height: 100vh;
}

.detail-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 12px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.3rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.back-btn:active {
    background: rgba(0,0,0,0.05);
}

.detail-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    color: var(--dark);
}

.detail-content {
    padding: 20px;
}

.main-image-container {
    width: 100%;
    /* 👇 CAMBIAR el aspect-ratio */
    aspect-ratio: auto;  /* o eliminar esta línea */
    min-height: 250px;
    max-height: 350px;
    background: var(--gray-light);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* CAMBIAR de cover a contain */
    object-position: center;
    background: var(--gray-light);
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Miniaturas */
.thumbnail-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: none;
}

.thumbnail-carousel::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    flex: 0 0 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border 0.2s;
    border: 2px solid transparent;
    background: var(--gray-light);
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--primary);
}

/* Información del producto */
.product-info {
    margin-top: 8px;
}

.product-info-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.product-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-dark);
    margin-bottom: 20px;
}

.product-features {
    background: var(--gray-light);
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.product-features h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9rem;
    color: var(--gray-dark);
}

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

.feature-icon {
    color: var(--primary);
    font-size: 1rem;
    width: 20px;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--dark);
    color: white;
    text-decoration: none;
    padding: 16px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 16px;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-button i {
    color: var(--primary);
    font-size: 1.2rem;
}

.contact-button:active {
    background: #000;
}

/* MODALES */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: var(--white);
    width: 95%;           /* un poco más ancho */
    max-width: 900px;     /* máximo más grande */
    margin: 40px auto;    /* menos margen superior */
    border-radius: 24px;
    position: relative;
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-dark);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:active {
    background: rgba(0,0,0,0.05);
}

.modal-logo {
    height: 48px;
    display: block;
    margin: 0 auto 16px;
    object-fit: contain;
}

.modal-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
}

.modal-text {
    line-height: 1.6;
    color: var(--gray-dark);
    font-size: 0.95rem;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px 8px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.gallery-img {
    width: 100%;
    height: auto;
    min-height: 300px;      /* altura mínima */
    max-height: 500px;      /* altura máxima */
    object-fit: contain;
    object-position: center;
    border-radius: 20px;
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}


.gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}


/* FOOTER - minimalista */
.site-footer {
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 24px 20px;
    text-align: center;
    margin-top: auto;
}

.copyright-text {
    color: var(--gray-dark);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.powered-by {
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.powered-by a {
    color: var(--dark);
    font-weight: 600;
    text-decoration: none;
}

/* TOAST */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    transform: none;
    background: var(--dark);
    color: white;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.9rem;
    display: none;
    z-index: 2000;
    text-align: center;
    box-shadow: var(--shadow-lg);
}