﻿
/* ==========================================================
   NEXO - DETALLE DE PRODUCTO
   DISEÑO RESPONSIVE - MOBILE / TABLET / DESKTOP
   ========================================================== */

/* CONTENEDOR PRINCIPAL */

.nexo-product-detail {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 12px 100px;
}

/* HEADER */

.nexo-detail-back,
.nexo-detail-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--nexo-border);
    border-radius: 13px;
    background: white;
    color: var(--nexo-blue-800);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all .2s ease;
}

    .nexo-detail-back:hover,
    .nexo-detail-action:hover {
        background: var(--nexo-blue-100);
        color: var(--nexo-blue-700);
    }

/* TARJETA PRINCIPAL */

.nexo-detail-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--nexo-border);
    box-shadow: var(--nexo-shadow-sm);
    overflow: hidden;
}

/* ==========================================================
   GALERÍA
   ========================================================== */

.nexo-detail-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: linear-gradient( 145deg, #EDF2FC, #F8FAFF );
    display: flex;
    align-items: center;
    justify-content: center;
}

.nexo-detail-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.nexo-detail-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nexo-detail-featured {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    color: var(--nexo-blue-700);
    padding: 7px 12px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    box-shadow: var(--nexo-shadow-sm);
    z-index: 2;
}

.nexo-detail-favorite {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: white;
    color: var(--nexo-blue-700);
    font-size: 1.15rem;
    box-shadow: var(--nexo-shadow-sm);
    z-index: 2;
    transition: all .2s ease;
}

    .nexo-detail-favorite:hover {
        background: var(--nexo-blue-100);
        transform: scale(1.05);
    }

/* ==========================================================
   INFORMACIÓN DEL PRODUCTO
   ========================================================== */

.nexo-detail-category {
    color: var(--nexo-blue-700);
    background: var(--nexo-blue-100);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
}

.nexo-detail-brand {
    font-size: .76rem;
    color: #8995AA;
    font-weight: 600;
}

.nexo-detail-title {
    color: #263B63;
    font-size: 1.25rem;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: -.3px;
    margin-bottom: 7px;
    overflow-wrap: anywhere;
}

.nexo-detail-code {
    font-size: .75rem;
    color: #8995AA;
}

.nexo-detail-divider {
    border-color: var(--nexo-border);
    opacity: 1;
}

/* ==========================================================
   PRECIO
   ========================================================== */

.nexo-detail-price {
    color: var(--nexo-blue-800);
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -1px;
    line-height: 1.2;
}

.nexo-detail-price-caption {
    font-size: .75rem;
    color: #8995AA;
    margin-top: 4px;
}

/* ==========================================================
   STOCK
   ========================================================== */

.nexo-detail-stock {
    color: #298B70;
    font-size: .84rem;
    font-weight: 700;
}

.nexo-detail-stock-quantity {
    font-size: .75rem;
    color: #8995AA;
    margin-top: 3px;
}

/* ==========================================================
   INFORMACIÓN ADICIONAL
   ========================================================== */

.nexo-detail-info-icon {
    color: var(--nexo-blue-700);
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ==========================================================
   CANTIDAD
   ========================================================== */

.nexo-quantity {
    max-width: 160px;
    border: 1px solid var(--nexo-border);
    border-radius: 10px;
    overflow: hidden;
}

    .nexo-quantity .form-control {
        border: 0;
        box-shadow: none;
        font-weight: 700;
    }

    .nexo-quantity .btn {
        border: 0;
        min-width: 42px;
    }

/* ==========================================================
   BOTÓN COMPRAR
   ========================================================== */

.nexo-detail-card .btn-primary {
    min-height: 48px;
    transition: all .2s ease;
}

    .nexo-detail-card .btn-primary:hover:not(:disabled) {
        transform: translateY(-1px);
    }

/* ==========================================================
   SECCIONES: DESCRIPCIÓN E INFORMACIÓN
   ========================================================== */

.nexo-detail-section {
    background: white;
    border: 1px solid var(--nexo-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--nexo-shadow-sm);
}

.nexo-detail-section-title {
    font-size: 1rem;
    font-weight: 750;
    color: var(--nexo-blue-900);
    margin-bottom: 15px;
}

.nexo-detail-description {
    color: #65738C;
    font-size: .88rem;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.nexo-detail-specification {
    display: flex;
    flex-direction: column;
}

    .nexo-detail-specification > div {
        display: flex;
        justify-content: space-between;
        gap: 15px;
        padding: 12px 0;
        border-bottom: 1px solid var(--nexo-border);
        font-size: .82rem;
    }

        .nexo-detail-specification > div:last-child {
            border-bottom: 0;
        }

    .nexo-detail-specification span {
        color: #8995AA;
    }

    .nexo-detail-specification strong {
        color: #263B63;
        text-align: right;
    }

/* ==========================================================
   BARRA INFERIOR MOBILE
   ========================================================== */

.nexo-detail-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: white;
    border-top: 1px solid var(--nexo-border);
    box-shadow: 0 -5px 20px rgba(30,66,155,.08);
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.nexo-bottom-price {
    display: flex;
    flex-direction: column;
}

    .nexo-bottom-price small {
        color: #8995AA;
        font-size: .68rem;
    }

    .nexo-bottom-price strong {
        color: var(--nexo-blue-800);
        font-size: 1.15rem;
        white-space: nowrap;
    }

.nexo-detail-bottom .btn {
    flex: 1;
    max-width: 220px;
    min-height: 46px;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (min-width: 768px) {

    .nexo-product-detail {
        padding: 0 20px 35px;
    }

    .nexo-detail-card {
        border-radius: 20px;
    }

    .nexo-detail-gallery {
        min-height: 430px;
        height: 100%;
    }

    .nexo-detail-image-container {
        aspect-ratio: auto;
        min-height: 430px;
        padding: 30px;
    }

    .nexo-detail-image {
        max-height: 430px;
    }

    .nexo-detail-title {
        font-size: 1.4rem;
    }

    .nexo-detail-price {
        font-size: 1.9rem;
    }

    .nexo-detail-section {
        padding: 25px;
    }

    /* Ocultar barra inferior mobile */

    .nexo-detail-bottom {
        display: none;
    }
}

/* ==========================================================
   DESKTOP
   ========================================================== */

@media (min-width: 992px) {

    .nexo-product-detail {
        max-width: 1250px;
        padding: 0 25px 40px;
    }

    .nexo-detail-card {
        border-radius: 22px;
    }

    .nexo-detail-gallery {
        min-height: 540px;
        padding: 25px;
    }

    .nexo-detail-image-container {
        min-height: 500px;
        padding: 30px;
    }

    .nexo-detail-image {
        max-height: 500px;
    }

    .nexo-detail-title {
        font-size: 1.5rem;
    }

    .nexo-detail-price {
        font-size: 2.1rem;
    }

    .nexo-detail-section {
        padding: 28px;
    }
}

/* ==========================================================
   DESKTOP GRANDE
   ========================================================== */

@media (min-width: 1200px) {

    .nexo-product-detail {
        max-width: 1320px;
    }

    .nexo-detail-gallery {
        min-height: 590px;
    }

    .nexo-detail-image-container {
        min-height: 550px;
    }

    .nexo-detail-image {
        max-height: 550px;
    }

    .nexo-detail-title {
        font-size: 1.65rem;
    }

    .nexo-detail-price {
        font-size: 2.25rem;
    }
}

/* ==========================================================
   MOBILE PEQUEÑO
   ========================================================== */

@media (max-width: 380px) {

    .nexo-product-detail {
        padding-left: 8px;
        padding-right: 8px;
    }

    .nexo-detail-image-container {
        padding: 18px;
    }

    .nexo-detail-price {
        font-size: 1.8rem;
    }

    .nexo-detail-title {
        font-size: 1.15rem;
    }
}