/* 1. Contenedor y Espaciado */
.product-details-wrapper {
    padding: 120px 0 60px;
    background: #ffffff;
    font-family: 'Poppins', sans-serif;
}

/* 2. Galería (thumbnails a la izquierda) */
.apple-gallery-container {
    display: flex;
    gap: 15px;
    height: 550px; /* Altura fija para alinear con la info */
}

.thumbnails-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90px;
    overflow-y: auto; /* Scroll si hay muchas fotos */
    padding-right: 5px;
}

/* Ocultar scrollbar pero mantener funcionalidad (opcional) */
.thumbnails-side::-webkit-scrollbar {
    width: 4px;
}
.thumbnails-side::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 10px;
}

.thumb-item {
    flex: 0 0 80px; /* Altura fija para cada miniatura */
    background: #f5f5f7;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-item.active {
    border-color: #0071e3;
}

.thumb-item img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Contenedor Imagen Principal */
.main-image-viewport {
    flex: 1;
    background: #f5f5f7;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.main-image-viewport img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: crosshair;
}
/* 3. Textos Apple */
.category-label {
    font-size: 14px;
    color: #86868b;
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.product-main-title {
    font-size: 40px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.product-code {
    color: #0066cc;
    font-size: 14px;
    background: rgba(0, 102, 204, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 25px;
}

/* 4. Precios */
.current-price {
    font-size: 32px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 20px;
}

/* 5. Sección de compra (La caja gris) */
.purchase-section {
    background: #f5f5f7;
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
}

.quantity-selector label {
    font-weight: 500;
    display: block;
    margin-bottom: 10px;
}

.quantity-selector input {
    width: 80px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Botón Apple Azul */
.btn-apple-buy {
    background: #0071e3;
    color: #fff;
    border: none;
    width: 100%;
    padding: 18px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-apple-buy:hover {
    background: #0077ed;
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

/* Badges */
.product-trust-badges p {
    font-size: 14px;
    color: #424245;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Badge de Urgencia */
.badge-stock-low {
    background-color: #fff2f2;
    color: #ff3b30; /* Rojo Apple */
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.badge-top-seller {
    background-color: #f2f2f7;
    color: #1d1d1f;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
    border: 1px solid #d2d2d7;
}

/* Badge de Stock: Rojo suave para urgencia */
.apple-badge-stock {
    display: inline-block;
    background-color: #fff2f2;
    color: #ff3b30;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    border: 1px solid #ffcfcf;
}

/* Prueba Social: Gris con toque azul para confianza */
.social-proof-wrapper {
    margin-top: 5px;
    margin-bottom: 15px;
}

.proof-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #86868b; /* Gris Apple */
    margin-bottom: 5px;
}

.proof-line i {
    color: #0071e3; /* Azul para resaltar iconos positivos */
}

.highlight-text {
    color: #1d1d1f;
    font-weight: 600;
}


/* Contenedor de descripción con altura controlada */
#descripcionPpal {
    max-height: 220px; /* Altura ideal para mostrar unas 8-10 líneas */
    overflow-y: auto;  /* Solo aparece scroll si el texto se desborda */
    padding-right: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.6;
    color: #424245;
    border-bottom: 1px solid #f5f5f7; /* Línea sutil de cierre */
}

/* Scrollbar minimalista estilo macOS/iOS */
#descripcionPpal::-webkit-scrollbar {
    width: 5px;
}

#descripcionPpal::-webkit-scrollbar-track {
    background: transparent;
}

#descripcionPpal::-webkit-scrollbar-thumb {
    background: #d2d2d7; 
    border-radius: 10px;
    transition: background 0.3s;
}

#descripcionPpal::-webkit-scrollbar-thumb:hover {
    background: #86868b; /* Se oscurece al pasar el mouse */
}

/* Ajuste para las listas que vienen de la DB */
#descripcionPpal ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

#descripcionPpal li {
    margin-bottom: 8px;
}