/* ===== CONTENEDOR GENERAL ===== */
.modal-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-height: 80vh;
    overflow: hidden;
}

/* ===== GALERÍA ===== */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-main-images {
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 12px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-main-images img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== MINIATURAS ===== */
.modal-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.modal-thumbnails img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.2s ease;
}

.modal-thumbnails img:hover,
.modal-thumbnails img.active {
    border-color: #4f46e5;
}

/* ===== DETALLES ===== */
.modal-details {
    max-height: 50vh;   /* igual o menor al modal */
    overflow-y: auto;   /* 👈 SCROLL */
    padding-right: 8px;
}


/* Scroll bonito */
.modal-details::-webkit-scrollbar {
    width: 6px;
}
.modal-details::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}


/* ===== HEADER ===== */
.modal-header h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.modal-product-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.modal-category,
.modal-condition,
.modal-stock {
    padding: 4px 10px;
    border-radius: 20px;
    background: #e5e7eb;
    font-weight: 500;
}

.modal-stock.in-stock {
    background: #dcfce7;
    color: #166534;
}

.modal-stock.low-stock {
    background: #fef3c7;
    color: #92400e;
}

.modal-stock.out-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== PRECIO ===== */
.modal-price-section {
    margin: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-price {
    font-size: 2rem;
    font-weight: bold;
    color: #4f46e5;
}

.modal-rating {
    font-size: 0.9rem;
    color: #f59e0b;
}

.rating-count {
    color: #6b7280;
    margin-left: 6px;
}

/* ===== DESCRIPCIÓN ===== */
.modal-description h3,
.modal-specs h3,
.modal-shipping h3 {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.modal-description p {
    color: #4b5563;
    line-height: 1.6;
}

/* ===== ESPECIFICACIONES ===== */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.spec-item {
    background: #f9fafb;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.spec-label {
    font-weight: 600;
    color: #374151;
}

.spec-value {
    color: #4b5563;
}

/* ===== ACCIONES ===== */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-modal-action {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-modal-action i {
    margin-right: 6px;
}

.btn-modal-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.btn-add-cart {
    background: #4f46e5;
    color: #fff;
}

.btn-buy-now {
    background: #16a34a;
    color: #fff;
}

.btn-wishlist {
    background: #f3f4f6;
    color: #374151;
}

.btn-modal-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== ENVÍO ===== */
.modal-shipping ul {
    padding-left: 18px;
    color: #4b5563;
}

.modal-shipping li {
    margin-bottom: 6px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .modal-product {
        grid-template-columns: 1fr;
        max-height: 85vh;
    }

    .modal-main-images {
        height: 280px;
    }
}
