/* =========================
RESET Y BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #fafbfc;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================
VARIABLES
========================= */
:root {
    --rojo: #dc2626;
    --rojo-hover: #b91c1c;
    --rojo-light: #fee2e2;
    --gris: #f8f9fa;
    --gris-border: #e5e7eb;
    --oscuro: #111827;
    --texto-secundario: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =========================
TRANSICIONES
========================= */
a, button, .card, .brand, input, textarea, select {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================
CONTAINER
========================= */
.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================
HEADER
========================= */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--gris-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    height: 64px;
    width: auto;
    display: block;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-link {
    display: flex;
    text-decoration: none;
}

/* =========================
NAV
========================= */
.nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--texto-secundario);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    cursor: pointer;
}

.nav a:hover {
    color: var(--oscuro);
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--rojo), var(--rojo-hover));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav a:hover::after {
    width: 100%;
}

#botonIngresar,
#botonCerrarSesion {
    color: #ffffff !important;
    padding: 8px 20px !important;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#botonIngresar {
    background: linear-gradient(135deg, var(--rojo), var(--rojo-hover));
}

#botonIngresar i,
#botonCerrarSesion i {
    font-size: 14px;
}

#botonIngresar::after,
#botonCerrarSesion::after {
    display: none;
}

#botonIngresar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, var(--rojo-hover), #991b1b);
}

#botonCerrarSesion {
    background: transparent;
    color: var(--rojo) !important;
    padding: 8px 20px !important;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--rojo);
}

#botonCerrarSesion:hover {
    background: var(--rojo);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* =========================
MENU MOBILE
========================= */
.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--oscuro);
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.menu-toggle:hover {
    background: var(--gris);
}

/* =========================
HERO
========================= */
.hero {
    background: url("https://images.unsplash.com/photo-1487754180451-c456f719a1fc");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 24px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 32px;
    opacity: 0.95;
    font-weight: 400;
}

.hero .btn-primary {
    background: #ffffff;
    color: var(--rojo);
    padding: 14px 40px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    max-width: 240px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: none;
}

.hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: #f9fafb;
}

/* =========================
ABOUT
========================= */
.about {
    padding: 80px 0;
    text-align: center;
    background: #ffffff;
}

.about h2 {
    margin-bottom: 24px;
    font-size: 36px;
    font-weight: 700;
    color: var(--oscuro);
    letter-spacing: -0.02em;
}

.about p {
    font-size: 18px;
    color: var(--texto-secundario);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* =========================
CATEGORÍAS
========================= */
.categories {
    background: linear-gradient(to bottom, var(--gris), #ffffff);
    padding: 100px 0;
}

.categories h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background-color: #ffffff;
    padding: 32px;
    border: 1px solid var(--gris-border);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--rojo), var(--rojo-hover));
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before {
    transform: scaleY(1);
}

.card h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--oscuro);
    margin-bottom: 12px;
}

.card p {
    color: var(--texto-secundario);
    font-size: 15px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--rojo-light);
}

/* =========================
MARCAS
========================= */
.brands {
    padding: 80px 0;
    text-align: center;
    background: #ffffff;
}

.brands h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.brand-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.brand {
    background-color: #ffffff;
    padding: 24px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--gris-border);
    border-radius: 10px;
    color: var(--texto-secundario);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.brand:hover {
    background: linear-gradient(135deg, var(--rojo), var(--rojo-hover));
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--rojo);
}

/* =========================
FOOTER
========================= */
.footer {
    background: linear-gradient(180deg, var(--oscuro), #0f172a);
    color: #e5e7eb;
    padding: 64px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-columna h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 12px;
}

.footer-columna h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--rojo), var(--rojo-hover));
    border-radius: 2px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.6;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.footer-list li:last-child {
    margin-bottom: 0;
}

.footer-list li:hover {
    color: #ffffff;
}

.footer-list li i {
    color: var(--rojo);
    font-size: 16px;
    margin-top: 2px;
    min-width: 20px;
    transition: transform 0.2s ease;
}

.footer-list li:hover i {
    transform: scale(1.1);
}

.footer-list li span {
    flex: 1;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 0;
    width: 100%;
}

.footer-social:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-social i {
    color: var(--rojo);
    font-size: 18px;
    transition: transform 0.2s ease;
}

.footer-social:hover i {
    transform: scale(1.15);
}

.footer-social span {
    font-size: 15px;
}

.footer-bottom {
    text-align: center;
    padding: 32px 0;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: #9ca3af;
    opacity: 0.8;
}

/* =========================
MODAL DE ACCESO
========================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-contenido {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    padding: 48px 40px;
    border-radius: 16px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: aparecerModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gris-border);
}

.modal-contenido h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.modal-contenido > p {
    color: var(--texto-secundario);
    margin-bottom: 32px;
    font-size: 15px;
}

.modal-cerrar {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px;
    cursor: pointer;
    color: var(--texto-secundario);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-cerrar:hover {
    background: var(--gris);
    color: var(--oscuro);
}

/* =========================
FORMULARIOS
========================= */
.grupo-formulario {
    margin-bottom: 24px;
}

.grupo-formulario label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--oscuro);
}

.grupo-formulario input,
.grupo-formulario textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
    border: 1.5px solid var(--gris-border);
    background: #ffffff;
    color: var(--oscuro);
    font-family: inherit;
    transition: all 0.2s ease;
}

.grupo-formulario input:focus,
.grupo-formulario textarea:focus {
    outline: none;
    border-color: var(--rojo);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.grupo-formulario textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-contenido .btn-primary {
    width: 100%;
    margin-top: 8px;
    padding: 14px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--rojo), var(--rojo-hover));
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.modal-contenido .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, var(--rojo-hover), #991b1b);
}

.modal-contenido .btn-primary:active {
    transform: translateY(0);
}

/* =========================
ENLACES PROTEGIDOS
========================= */
.enlace-protegido {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

/* =========================
PÁGINA CLIENTES
========================= */
#seccionLogin,
#seccionRegistro,
#seccionPendiente {
    background: #ffffff;
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gris-border);
}

#seccionLogin h2,
#seccionRegistro h2,
#seccionPendiente h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

#seccionLogin > p,
#seccionRegistro > p {
    color: var(--texto-secundario);
    margin-bottom: 32px;
    font-size: 15px;
}

#seccionLogin a,
#seccionRegistro a {
    color: var(--rojo);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

#seccionLogin a:hover,
#seccionRegistro a:hover {
    color: var(--rojo-hover);
    text-decoration: underline;
}

#seccionPendiente {
    padding: 64px 48px;
}

#seccionPendiente h2 {
    color: var(--rojo);
    margin-bottom: 20px;
}

#seccionPendiente p {
    color: var(--texto-secundario);
    font-size: 16px;
    line-height: 1.8;
}

/* =========================
PÁGINA MI CUENTA
========================= */
.mi-cuenta-main {
    max-width: 680px;
    margin: 48px auto 80px;
    padding: 0 24px;
    animation: fadeInUp 0.4s ease;
}

.mi-cuenta-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--gris-border);
    overflow: hidden;
}

/* HEADER */
.mi-cuenta-header {
    background: linear-gradient(145deg, #c62828 0%, #8b0000 100%);
    padding: 48px 40px 40px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.mi-cuenta-header::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.mi-cuenta-header::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.avatar-cliente {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.avatar-cliente:hover { transform: scale(1.05); }

.avatar-cliente i {
    font-size: 38px;
    color: #ffffff;
}

.nombre-cliente {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.subtitulo-cliente {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 12px 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* BADGE DE RANGO */
.badge-rango {
    display: inline-block;
    margin-top: 4px;
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.rango-bronce  { background: #cd7f32; color: #fff; }
.rango-plata   { background: #a8a9ad; color: #fff; }
.rango-oro     { background: #d4af37; color: #fff; }
.rango-platino { background: #e5e4e2; color: #333; }

/* SECCIÓN PORCENTAJE */
.mi-cuenta-porcentaje {
    margin: 28px 28px 0;
    padding: 22px 24px;
    background: linear-gradient(135deg, #fff5f5, #ffffff);
    border: 1.5px solid #fecaca;
    border-radius: 16px;
}

.porcentaje-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.porcentaje-header i {
    font-size: 20px;
    color: var(--rojo);
    margin-top: 2px;
    flex-shrink: 0;
    background: #fee2e2;
    padding: 8px;
    border-radius: 8px;
}

.porcentaje-titulo {
    font-size: 14px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 3px;
}

.porcentaje-descripcion {
    font-size: 12px;
    color: var(--texto-secundario);
    line-height: 1.5;
}

.porcentaje-input-grupo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.porcentaje-input {
    width: 90px;
    padding: 10px 12px;
    font-size: 18px;
    font-weight: 700;
    border: 2px solid var(--gris-border);
    border-radius: 10px;
    text-align: center;
    color: var(--oscuro);
    transition: border-color 0.2s ease;
    background: #ffffff;
}

.porcentaje-input:focus {
    outline: none;
    border-color: var(--rojo);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.porcentaje-simbolo {
    font-size: 20px;
    font-weight: 700;
    color: var(--texto-secundario);
}

.btn-guardar-porcentaje {
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--rojo), var(--rojo-hover));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.btn-guardar-porcentaje:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.porcentaje-mensaje {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
}

/* ACCIONES */
.mi-cuenta-acciones {
    padding: 24px 28px 28px;
    display: grid;
    gap: 12px;
}

.accion-boton {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1.5px solid var(--gris-border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.accion-boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.accion-pedidos:hover  { box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);  border-color: #fecaca; }
.accion-carrito:hover  { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15); border-color: #a7f3d0; }
.accion-catalogo:hover { box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15); border-color: #bfdbfe; }
.accion-cerrar:hover   { box-shadow: 0 8px 24px rgba(107, 114, 128, 0.15); border-color: #e5e7eb; }

.accion-icono {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.accion-pedidos .accion-icono  { background: linear-gradient(135deg, #ef4444, #dc2626); }
.accion-carrito .accion-icono  { background: linear-gradient(135deg, #10b981, #059669); }
.accion-catalogo .accion-icono { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.accion-cerrar .accion-icono   { background: linear-gradient(135deg, #9ca3af, #6b7280); }

.accion-boton:hover .accion-icono {
    transform: scale(1.08) rotate(4deg);
}

.accion-icono i {
    font-size: 19px;
    color: #ffffff;
}

.accion-contenido {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.accion-titulo {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.accion-descripcion {
    font-size: 12px;
    color: #9ca3af;
}

.accion-flecha {
    color: #d1d5db;
    font-size: 13px;
    transition: transform 0.25s ease, color 0.25s ease;
}

.accion-boton:hover .accion-flecha {
    transform: translateX(3px);
    color: #6b7280;
}

.volver-cuenta {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
}

.volver-cuenta:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: translateX(-2px);
}

/* =========================
SOBRE NOSOTROS
========================= */
.sobre-nosotros {
    background: linear-gradient(to bottom, #ffffff, var(--gris));
    padding: 100px 0;
}

.sobre-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.sobre-texto h2 {
    font-size: 36px;
    margin-bottom: 24px;
    color: var(--oscuro);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sobre-texto p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--texto-secundario);
}

.sobre-imagenes {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gris-border);
    transition: transform 0.3s ease;
}

.sobre-imagenes:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.foto-activa {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.foto-activa img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.sobre-imagenes:hover .foto-activa img {
    transform: scale(1.02);
}

.miniaturas {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.miniaturas img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.miniaturas img:hover {
    opacity: 1;
    transform: scale(1.08);
    border-color: var(--rojo);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* =========================
WHATSAPP FLOTANTE
========================= */
.whatsapp-flotante {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: linear-gradient(135deg, #25d366, #1ebe5d);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s infinite;
}

.whatsapp-flotante:hover {
    background: linear-gradient(135deg, #1ebe5d, #17a049);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
    }
}

/* =========================
MENSAJE FLOTANTE
========================= */
.mensaje-flotante {
    position: fixed;
    top: 90px;
    right: 32px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    z-index: 5000;
    transition: all 0.4s ease;
}

.mensaje-flotante.mostrar {
    opacity: 1;
    transform: translateY(0);
}

/* ===== FIX CONTRASTE HEADER ROJO ===== */

.header {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.header .nav a {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
}

.header .nav a:hover {
    color: #ffffff;
}

.header .nav a::after {
    background: #ffffff;
}

.header img.logo {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

/* ===============================
AVISO ACTUALIZACIÓN PEDIDOS
=============================== */

.aviso-actualizacion {
    position: fixed;
    top: 90px;
    right: 30px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    z-index: 5000;
    transition: all .4s ease;
}

.aviso-actualizacion.mostrar {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
CARRUSEL DE MARCAS
========================= */
.marcas-carrusel {
    padding: 80px 0;
    background: linear-gradient(to bottom, var(--gris), #ffffff);
}

.marcas-carrusel h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

/* Contenedor del carrusel infinito */
.carrusel-contenedor {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* Flechas laterales elegantes */
.carrusel-flecha {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--rojo);
    background: #fff;
    color: var(--rojo);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carrusel-flecha:hover {
    background: var(--rojo);
    color: #fff;
    transform: scale(1.05);
}

.carrusel-flecha:active {
    transform: scale(0.98);
}

/* Pista con overflow para efecto infinito */
.carrusel-pista {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.carrusel-slides {
    display: flex;
    gap: 20px;
    width: max-content;
}

.marca-card {
    flex: 0 0 180px;
    width: 180px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.9);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.marca-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--rojo-light);
}

.marca-card-img {
    height: 124px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    background:
        radial-gradient(circle at 50% 20%, rgba(220, 38, 38, 0.08), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f5f6f8 100%);
}

.marca-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 6px 10px rgba(17, 24, 39, 0.08));
}

.marca-card-nombre {
    padding: 12px 14px 14px;
    margin: 0;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--oscuro);
    text-align: center;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .marca-card { flex: 0 0 150px; width: 150px; }
    .marca-card-img { height: 108px; padding: 15px; }
}

@media (max-width: 640px) {
    .logo { height: 54px; }
    .marcas-carrusel { padding: 48px 0; }
    .marcas-carrusel h2 { font-size: 28px; margin-bottom: 32px; }
    .carrusel-flecha { width: 40px; height: 40px; }
    .marca-card { flex: 0 0 130px; width: 130px; }
    .marca-card-img { height: 96px; padding: 12px; }
    .marca-card-nombre { font-size: 13px; min-height: 48px; padding: 10px 12px 12px; }
}

/* =========================
SOBRE NOSOTROS (INDEX)
========================= */
.sobre-nosotros-index {
    padding: 80px 0;
    background: #ffffff;
}

.sobre-nosotros-index h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

.sobre-nosotros-index .sobre-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.sobre-nosotros-index .sobre-texto h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--oscuro);
    margin-bottom: 12px;
    text-align: center;
}

.sobre-nosotros-index .sobre-texto p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--texto-secundario);
    margin: 0;
}

.sobre-fotos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.foto-empresa {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gris-border);
    transition: transform 0.3s ease;
}

.foto-empresa:hover {
    transform: translateY(-4px);
}

.foto-empresa img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

@media (max-width: 900px) {
    .sobre-nosotros-index .sobre-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .sobre-fotos { grid-template-columns: 1fr; }
    .foto-empresa img { height: 220px; }
}

/* =========================
FOOTER INDEX
========================= */
.footer-index {
    background: linear-gradient(180deg, var(--oscuro), #0f172a);
    color: #e5e7eb;
    padding: 64px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-index .footer-col h3 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.footer-index .footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.footer-index .footer-col p {
    margin: 0;
    color: #94a3b8;
    font-size: 15px;
}

.footer-contacto,
.footer-redes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contacto li,
.footer-redes li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contacto a,
.footer-redes a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contacto a:hover,
.footer-redes a:hover {
    color: #fff;
}

.footer-contacto i,
.footer-redes i {
    color: var(--rojo);
    width: 20px;
    text-align: center;
}

.footer-contacto span {
    color: #94a3b8;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* =========================
BADGE DE RANGO
========================= */
.badge-rango {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

.rango-bronce  { background: #cd7f32; color: #fff; }
.rango-plata   { background: #a8a9ad; color: #fff; }
.rango-oro     { background: #d4af37; color: #fff; }
.rango-platino { background: #e5e4e2; color: #333; }
