/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Layout principal de imagenes y detalles */
.product-details {
    display: flex;
    gap: 30px;
    flex-wrap: nowrap;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sección imagen */
.image-section {
    flex: 0 0 450px;
    max-width: 450px;
    max-height: 500px;
    overflow: hidden;
    position: relative;
}

/* Contenedor zoom */
.main-image-zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 500px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Imagen principal */
#main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
}

/* Lente zoom */
.img-zoom-lens {
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
    cursor: none;
    display: none;
}

/* Resultado zoom */
.zoom-result {
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 200px;
    height: 200px;
    top: 0;
    right: -220px;
    background-repeat: no-repeat;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

/* Miniaturas */
.thumbnail-container {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    max-width: 450px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.thumbnail {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    object-fit: cover;
}

.thumbnail.active,
.thumbnail:hover,
.thumbnail:focus {
    border-color: #007bff;
    outline: none;
}

/* Sección de detalles */
.info-section {
    flex: 1 1 auto;
    max-width: calc(100% - 480px);
    box-sizing: border-box;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 15px;
}

/* Scroll personalizado para info */
.info-section::-webkit-scrollbar {
    width: 8px;
}

.info-section::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.15);
    border-radius: 4px;
}

/* Texto */
.product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
}

.product-description {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin: 10px 0 20px;
}

.product-price {
    font-size: 1.7rem;
    font-weight: 700;
    color: #D32F2F;
}

.price-original {
    font-weight: normal;
    text-decoration: line-through;
    color: #888;
    margin-right: 10px;
}

.price-offer {
    color: #D32F2F;
}

.no-price-message {
    font-style: italic;
    color: #888;
}

.product-stock, 
.product-brand, 
.product-partnumber, 
.product-rating {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0;
}

.product-specs {
    margin-top: 15px;
    font-size: 0.95rem;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    white-space: pre-wrap;
}

.out-of-stock-message {
    color: red;
    font-weight: bold;
}

/* Formulario */
form {
    margin-top: 25px;
}

label[for="cantidad"] {
    font-weight: 600;
    margin-right: 10px;
}

input[type="number"]#cantidad {
    width: 60px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    vertical-align: middle;
    margin-right: 20px;
}

.btn-comprar, .btn-cotizar {
    padding: 12px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
    text-align: center;
    user-select: none;
}

.btn-comprar {
    background-color: #007bff;
}

.btn-comprar:hover, .btn-comprar:focus {
    background-color: #0056b3;
}

.btn-cotizar {
    background-color: #28a745;
}

.btn-cotizar:hover, .btn-cotizar:focus {
    background-color: #1e7e34;
}

/* Productos relacionados */
.related-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 30px 20px;
    margin-top: 50px;
}

.related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.related-item {
    width: 150px;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.related-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.related-item img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 4px;
}

.related-no-image {
    width: 100%;
    height: 130px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 4px;
}

.related-item p {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 8px;
    color: #222;
}

.related-price {
    font-size: 1.1rem;
    color: #D32F2F;
}

.no-price-related {
    font-style: italic;
    color: #888;
}

.register-link {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
}

.register-link:hover,
.register-link:focus {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .product-details {
        flex-wrap: wrap;
    }
    .image-section,
    .info-section {
        flex: 1 1 100%;
        max-width: 100%;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
    .thumbnail-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .zoom-result {
        display: none !important;
    }
}
