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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    background: #050507 url('../img/flamas-stardust.avif') center top / cover no-repeat fixed;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* EFECTO GLASSMORPHISM */
.text-box-dark {
    background: rgba(8, 8, 12, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: linear-gradient(180deg, rgba(5, 5, 7, 0.98) 0%, rgba(5, 5, 7, 0.85) 80%, rgba(5, 5, 7, 0) 100%);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-icon-btn, .track-icon-btn, .cart-icon-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.25s ease;
    will-change: transform, opacity;
}

.menu-icon-btn:hover, .track-icon-btn:hover, .cart-icon-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.menu-icon-btn:active, .track-icon-btn:active, .cart-icon-btn:active {
    transform: translateY(0) scale(0.96);
}

.menu-brand-img {
    height: 32px;
    width: auto;
    display: block;
    transform: translateY(2px);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.track-icon-btn {
    font-size: 1.2rem;
}

.nav-right-logo {
    height: 28px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.cart-icon-img {
    height: 24px;
    width: auto;
    filter: invert(1);
}

#cart-count {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
}

/* VISTAS Y CONTENEDOR PRINCIPAL */
.views-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 85px;
    padding-bottom: 30px;
    width: 100%;
}

.page-view {
    display: none;
    width: 100%;
    padding: 10px 6% 30px 6%;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: opacity, transform;
}

.page-view.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.page-view.show {
    opacity: 1;
    transform: translateY(0);
}

/* HERO INICIO */
#inicio.page-view.active {
    flex: 1;
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 6%;
}

.hero-content {
    padding: 35px 30px;
    max-width: 460px;
    width: 100%;
    margin: auto 0;
    text-align: center;
}

.hero-logo {
    max-width: 200px;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
}

.brand-subtitle {
    font-size: 0.85rem;
    color: #cccccc;
    letter-spacing: 5px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

/* BOTONES PRINCIPALES */
.btn-primary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 14px 34px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    will-change: transform, background, box-shadow;
}

.btn-primary:hover:not(:disabled) {
    background: #ffffff;
    color: #050507;
    border-color: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

.top-back-wrapper {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    margin-top: 5px;
    z-index: 10;
}

.btn-back {
    background: rgba(8, 8, 12, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 10px 20px;
    color: #ffffff;
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.btn-back:hover {
    background: #ffffff;
    color: #050507;
    transform: translateY(-2px);
}

/* VISTA COLECCIÓN & SELECCIÓN */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 25px 35px;
    max-width: 650px;
    width: 100%;
}

.section-header h2, .detail-content h2, .story-container h2, .contact-container h2 {
    font-size: 2rem;
    letter-spacing: 5px;
    margin-bottom: 12px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

/* CORRECCIÓN DE ETIQUETA EN CELULARES */
.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    padding: 8px 16px;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    max-width: 100%;
    word-wrap: break-word;
    box-sizing: border-box;
}

.model-selector {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    width: 100%;
    flex-wrap: wrap;
}

.selector-card {
    flex: 1;
    min-width: 280px;
    background: linear-gradient(135deg, rgba(20, 20, 28, 0.85) 0%, rgba(8, 8, 12, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, border-color, box-shadow;
}

.selector-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.35);
}

.selector-card:active {
    transform: translateY(-2px) scale(0.99);
}

.selector-title {
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.selector-img-wrapper {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selector-logo {
    max-height: 90px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.stock-badge {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #a0a0a5;
    text-transform: uppercase;
}

/* VISTA DETALLE PRODUCTO */
.detail-container {
    display: flex;
    gap: 35px;
    max-width: 1100px;
    width: 100%;
    align-items: flex-start;
}

.detail-image {
    flex: 1.3;
    min-height: 480px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(10, 10, 12, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 18px rgba(0, 0, 0, 0.6);
}

.gallery-container {
    position: relative;
    user-select: none;
}

.gallery-slide-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

.detail-image img,
.zoomable-img {
    max-width: 100%;
    max-height: 460px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.85));
    cursor: zoom-in;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.3s ease;
}

.zoomable-img:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.gallery-arrow:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.gallery-arrow.prev-btn {
    left: 15px;
}

.gallery-arrow.next-btn {
    right: 15px;
}

.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 18px;
    background: rgba(0, 0, 0, 0.75);
    color: #cccccc;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}

.detail-content {
    flex: 1.2;
    padding: 35px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stock-tag {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #a0a0a5;
    text-transform: uppercase;
    font-weight: 700;
}

.product-desc {
    font-size: 0.9rem;
    color: #cccccc;
    line-height: 1.6;
}

.product-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 10px;
}

.product-price small {
    font-size: 0.9rem;
    font-weight: 400;
    color: #88888d;
}

/* ACORDEÓN DE ESPECIFICACIONES */
.specs-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.accordion-item {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.accordion-header {
    width: 100%;
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.accordion-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.accordion-icon {
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: grid-template-rows;
}

.accordion-item.active .accordion-content {
    grid-template-rows: 1fr;
}

.accordion-content-inner {
    overflow: hidden;
}

.accordion-content-inner-pad {
    padding: 0 18px 16px 18px;
}

.accordion-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.82rem;
    color: #bbbbbf;
    line-height: 1.5;
}

.accordion-content ul strong {
    color: #ffffff;
}

/* SELECTOR DE MODO DE PAGO */
.payment-plan-selector {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 16px;
}

.plan-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.plan-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.plan-option.active {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.plan-option input[type="radio"] {
    accent-color: #ffffff;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plan-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
}

.plan-amount {
    font-size: 0.78rem;
    color: #a0a0a5;
}

.plan-amount small {
    font-size: 0.7rem;
    color: #88888d;
}

/* DRAWERS (MENÚ & CARRITO) */
.menu-drawer, .cart-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 320px;
    background: #08080c;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
    overscroll-behavior: contain;
}

.menu-drawer {
    left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    transform: translateX(-100%);
}

.cart-drawer {
    right: 0;
    transform: translateX(100%);
}

.menu-drawer.open, .cart-drawer.open {
    transform: translateX(0);
}

.menu-header, .cart-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-btn:hover {
    color: #ff5555;
    transform: scale(1.1);
}

.drawer-nav-links {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.drawer-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.25s ease, transform 0.25s ease;
}

.drawer-link:hover {
    color: #ffffff;
    transform: translateX(6px);
}

.drawer-footer-logo {
    margin-top: auto;
    padding: 30px;
    text-align: center;
}

.drawer-footer-logo img {
    max-width: 140px;
    margin: 0 auto;
}

/* CARRITO DETALLES */
.cart-items-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overscroll-behavior: contain;
}

.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
    border-radius: 6px;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cart-item-title {
    font-size: 0.8rem;
    font-weight: 700;
}

.cart-item-plan {
    font-size: 0.7rem;
    color: #a0a0a5;
    font-weight: 600;
    margin-top: 2px;
}

.cart-item-price {
    font-size: 0.75rem;
    color: #aaaaae;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.qty-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.remove-item-btn {
    background: transparent;
    border: none;
    color: #ff5555;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.remove-item-btn:hover {
    transform: scale(1.15);
}

.cart-footer {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #08080c;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 15px;
}

.btn-secondary-ws {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cccccc;
    padding: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.btn-secondary-ws:hover {
    border-color: #ffffff;
    color: #ffffff;
}

.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    will-change: opacity, visibility;
    touch-action: none;
}

.page-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* HISTORIA & CONTACTO */
.story-container, .contact-container {
    max-width: 700px;
    width: 100%;
    padding: 40px;
    text-align: center;
}

.story-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 20px 0;
}

.story-timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: left;
    margin-top: 25px;
}

.timeline-item h4 {
    font-size: 0.85rem;
    color: #ffffff;
    letter-spacing: 2px;
}

.timeline-item p {
    font-size: 0.85rem;
    color: #aaaaae;
    margin-top: 4px;
}

/* FOOTER GLOBAL */
#global-footer {
    width: 100%;
    padding: 25px 20px;
    text-align: center;
    background: #040406;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.social-links a {
    color: #ffffff;
    font-size: 1.3rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

/* VENTANA EMERGENTE (LIGHTBOX) PARA ZOOM DE FOTO */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
}

.lightbox-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.12);
    animation: zoomIn 0.25s ease-out;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #888888;
}

/* RESPONSIVIDAD PARA CELULARES Y DISPOSITIVOS MÓVILES */
@media (max-width: 768px) {
    .section-header {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .section-header h2, .detail-content h2, .story-container h2, .contact-container h2 {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .badge {
        font-size: 0.7rem;
        padding: 6px 12px;
        letter-spacing: 1px;
    }

    .detail-container {
        flex-direction: column;
    }
    .detail-container.reverse {
        flex-direction: column;
    }
    .detail-image {
        width: 100%;
        min-height: 340px;
        padding: 15px;
    }
    .zoomable-img {
        max-height: 340px;
    }
    .gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .detail-content {
        padding: 20px;
    }
    .story-container, .contact-container {
        padding: 25px 18px;
    }
}