/* =========================================
   CONTENEDOR DEL MODAL (OVERLAY)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Permite scroll si el contenido es largo */
    z-index: 2000;
    overflow-y: auto;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 1000px;
    margin: auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #eee;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: background 0.2s;
}

.close-button:hover { background: #ddd; }

/* =========================================
   ESTRUCTURA DE DETALLES (PD-CONTAINER)
   ========================================= */
.pd-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


.pd-container h3{
   width: -webkit-fill-available;
    font-family: 'FontAwesome';
}


/* Columna Izquierda: Imagen */
.pd-media {
    flex: 1 1 400px;
}

.pd-media img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    background: #f9f9f9;
    border: 1px solid #eee;
}

/* Columna Derecha: Información */
.pd-content {
   flex: 1 1 400px;
    min-width: 0; /* Regla de oro para evitar desbordes en Flexbox */
}

.pd-title {
    font-size: 1.5rem; margin: 0 0 10px; color: #2c3e50;
}

.pd-price {
      font-size: 1.4rem;
    font-weight: 800;
    color: #0984e3;
    width: 100%;
    margin-bottom: 4px;
}

.pd-content h3{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.3rem;
    margin-block-start: 0.83em;
    margin-block-end: 0.83em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}


/* Badges */
.pd-badge-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
   align-items: baseline;
}

       .pd-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; color: white; margin-bottom: 10px; }
        .bg-promo { background-color: #27ae60; }
        .bg-info { background-color: #3498db; }
    
/* =========================================
   BOTONES DE CONTACTO
   ========================================= */
.pd-contact-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 25px 0;
}

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s;
    color: white;
}

.btn-contact:active { transform: scale(0.96); }
.btn-contact:hover { filter: brightness(0.9); }

.bg-whatsapp { background-color: #25D366; }
.bg-telegram { background-color: #0088cc; }
.bg-phone    { background-color: #3498db; }
.bg-gps      { background-color: #e67e22; }

/* =========================================
   SECCIONES Y TABLA DE ESPECIFICACIONES
   ========================================= */
.pd-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f1f2f6;
    color: #4b4b4b;
    border: 1px solid #dfe4ea;
}


/* 2. Control total sobre el texto de la descripción */
.pd-section p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word; /* Rompe palabras largas si es necesario */
    max-width: 100%;
    line-height: 1.6;
}

.product-desc p {
    font-size: 0.9rem;
    color: #636e72;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
   margin-top: 5px;
}

.pd-section strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
}

.pd-section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;

    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f1f2f6;
    color: #4b4b4b;
    border: 1px solid #dfe4ea;
}

.pd-section li {
    font-size: 0.9rem;
    color: #555;
    border-bottom: 1px solid #fafafa;
    padding-bottom: 4px;
   display: flex;
    flex-wrap: wrap; /* Por si el valor es muy largo, que baje con elegancia */
    align-items: baseline;
    padding: 6px 0; /* Un poco más de aire entre filas */
}


.pd-section li strong {
    display: inline; /* O inline-block */
    margin-right: 5px; /* Espacio entre el nombre y el valor */
}

/* =========================================
   PRODUCTOS RELACIONADOS
   ========================================= */
.related-header {
    border-top: 1px solid #2c3e50;
    padding-top: 20px;
    margin-top: 15px;
    margin-bottom: 10px;
   border-bottom: 1px solid #2c3e50;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.related-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: box-shadow 0.3s;
}

.related-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #ccc;
}

.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-info {
    padding: 10px;
}

/* =========================================
   RESPONSIVIDAD (MÓVILES)
   ========================================= */
@media (max-width: 768px) {
    .pd-container { padding: 20px; }
    .pd-title { font-size: 1.2rem; }
    .pd-price { font-size: 1.8rem; }
    .pd-section ul { grid-template-columns: 1fr; }
    .modal-overlay { padding: 0; }
    .modal-content { border-radius: 0; min-height: 100vh; }
}



/* Animación de pulso */
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    display: block;
}

/* Formas del Skeleton */
.sk-image { width: 100%; height: 400px; border-radius: 12px; }
.sk-title { width: 80%; height: 30px; margin-bottom: 15px; }
.sk-price { width: 40%; height: 40px; margin-bottom: 20px; }
.sk-button { width: 100%; height: 50px; border-radius: 8px; }
.sk-text { width: 100%; height: 15px; margin-bottom: 10px; }

