/* ============================================================
   ficha-tecnica.css — Estilos de la página de ficha técnica
   AMS Shocks — Diseño premium industrial
   ============================================================ */

/* ── Override: fondo oscuro para la página de ficha ───────── */
body {
    background-color: #0a0a0a;
}

/* ── Wrapper principal ────────────────────────────────────── */
.ficha-page {
    padding-top: 88px; /* Compensar header fijo */
    min-height: 100vh;
}

/* ── Hero del producto ────────────────────────────────────── */
.producto-hero {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
    border-bottom: 3px solid var(--primary-color);
    padding: 56px 5% 50px;
    position: relative;
    overflow: hidden;
}

/* Blueprint grid overlay */
.producto-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 102, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 102, 0, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Bottom fade */
.producto-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.4));
    pointer-events: none;
}

.volver-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 44px;
    color: var(--primary-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.3s, gap 0.25s;
    position: relative;
    z-index: 1;
}

.volver-btn:hover {
    color: #fff;
    gap: 14px;
}

.producto-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    animation: fade-in-up 0.55s ease both;
}

/* Technical mono prefix */
.producto-hero-content::before {
    content: '[ FICHA TÉCNICA — AMS SUSPENSION SYSTEMS ]';
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--primary-color);
    letter-spacing: 0.28em;
    margin-bottom: 18px;
    opacity: 0.75;
}

.producto-titulo {
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
    line-height: 1;
    text-shadow: 0 0 50px rgba(255, 102, 0, 0.18);
}

.producto-categoria {
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.22em;
    display: block;
    text-transform: uppercase;
}

/* ── Badges flotantes (barra inferior semi-transparente) ─── */
.badges-flotantes {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: rgba(8, 8, 8, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 102, 0, 0.22);
    transform: translateY(100%);
    transition: transform 0.42s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.42s ease;
    opacity: 0;
    pointer-events: none;
}

.badges-flotantes.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.badge-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.25s ease;
}

.badge-item:last-child {
    border-right: none;
}

.badge-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.badge-icono {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
}

.badge-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.82);
}

.badge-bolivia  .badge-label { color: #F9E300; }
.badge-reparable .badge-label { color: var(--primary-color); }
.badge-garantia  .badge-label { color: #7bb3f0; }

/* ── Galería de imágenes ──────────────────────────────────── */
.galeria-section {
    background: #0d0d0d;
    padding: 72px 5%;
    border-bottom: 1px solid #1e1e1e;
}

.section-label {
    text-align: center;
    margin-bottom: 44px;
}

.section-label h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: inline-block;
    position: relative;
    padding-bottom: 14px;
    margin: 0;
}

.section-label h2::before {
    content: '//\00a0';
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.section-label h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
}

/* ── Galería estilo eBay: thumbnails + imagen principal ─── */
.galeria-ebay {
    display: flex;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: flex-start;
    animation: fade-in-up 0.7s 0.15s ease both;
}

/* Vertical thumbnail strip */
.galeria-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100px;
    flex-shrink: 0;
}

/* Individual thumbnail */
.galeria-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galeria-thumb:hover {
    opacity: 1;
    border-color: #bbb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.galeria-thumb.active {
    border-color: var(--primary-color);
    border-width: 3px;
    opacity: 1;
    box-shadow: 0 2px 12px rgba(255, 102, 0, 0.22);
}

.galeria-thumb:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.galeria-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

/* Main image area */
.galeria-main-wrap {
    flex: 1;
    position: relative;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    box-shadow:
        0 2px 16px rgba(0, 0, 0, 0.07),
        0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: zoom-in;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.galeria-main-img {
    display: block;
    width: 100%;           /* Forzamos a ocupar todo el ancho */
    height: 100%;          /* Forzamos a ocupar toda la altura */
    max-height: 100%;      /* Quitamos el límite de 580px */
    object-fit: contain;   /* Mantiene la proporción sin recortarse */
    padding: 0;            /* Quitamos el espacio interno (estaba en 24px) */
    transition: opacity 0.18s ease;
}

/* Magnifier icon — top-right of main image */
.galeria-zoom-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.2s;
}

.galeria-main-wrap:hover .galeria-zoom-icon {
    opacity: 0;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.93);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lightbox.is-open {
    display: flex;
    animation: lb-fade-in 0.22s ease;
}

@keyframes lb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.85),
        0 0 0 2px rgba(255, 102, 0, 0.28);
    animation: lb-zoom-in 0.22s ease;
}

@keyframes lb-zoom-in {
    from { transform: scale(0.86); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

#lb-img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Close button */
.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    background: rgba(20, 20, 20, 0.82);
    border: 2px solid rgba(255, 102, 0, 0.45);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    z-index: 10001;
    font-family: var(--font-heading);
}

.lightbox-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(90deg) scale(1.1);
}

/* Prev / Next */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.7);
    border: 2px solid rgba(255, 102, 0, 0.4);
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    z-index: 10001;
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Counter */
.lightbox-counter {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background: rgba(0, 0, 0, 0.55);
    padding: 6px 18px;
    border-radius: 20px;
    z-index: 10001;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

/* ── Especificaciones técnicas ────────────────────────────── */
.specs-section {
    background: #111;
    padding: 72px 5%;
    border-bottom: 1px solid #202020;
}

.specs-card {
    max-width: 1000px;
    margin: 0 auto;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
    animation: fade-in-up 0.7s 0.2s ease both;
}

.specs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 75%);
}

.lista-caracteristicas {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 14px 28px;
}

.lista-caracteristicas li {
    position: relative;
    padding: 14px 14px 14px 44px;
    color: #d0d0d0;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1.35;
    display: flex;
    align-items: center;
}

.lista-caracteristicas li:hover {
    background: rgba(255, 102, 0, 0.06);
    border-color: rgba(255, 102, 0, 0.35);
    color: #eee;
}

.lista-caracteristicas li::before {
    content: '✓';
    position: absolute;
    left: 13px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.05rem;
}

/* ── CTA ──────────────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, #0d0d0d 0%, #181818 100%);
    padding: 80px 5%;
    text-align: center;
    border-bottom: 1px solid #1e1e1e;
}

.cta-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
}

.cta-section p {
    color: var(--steel-light);
    font-family: var(--font-body);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto 34px;
    line-height: 1.7;
}

/* ── Error state ────────────────────────────────────────── */
#error-mensaje {
    display: none;
    text-align: center;
    padding: 100px 20px;
    color: #fff;
    min-height: 50vh;
}

#error-mensaje h2 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

#error-mensaje p {
    color: #777;
    font-family: var(--font-body);
    font-size: 1.05rem;
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .badge-label { font-size: 0.65rem; letter-spacing: 0.06em; }
}

@media (max-width: 768px) {
    .ficha-page { padding-top: 130px; }

    .producto-hero { padding: 38px 5% 36px; }
    .producto-titulo { font-size: 1.9rem; }

    .badge-item { padding: 10px 8px; gap: 5px; }
    .badge-icono { font-size: 0.95rem; }
    .badge-label { font-size: 0.62rem; }

    .galeria-section { padding: 52px 5%; }
    .galeria-ebay { flex-direction: column; }
    .galeria-thumbs {
        width: 100%;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        order: 2;
    }
    .galeria-thumb {
        width: 72px;
        flex-shrink: 0;
    }
    .galeria-main-wrap {
        width: 100%;
        min-height: 300px;
        order: 1;
    }

    .specs-section { padding: 52px 5%; }
    .specs-card { padding: 32px 22px; }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
    .galeria-main-wrap { min-height: 260px; }
    .galeria-main-img  { max-height: 360px; }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }

    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
}
