/* Estilos específicos de alquiler.php (página de producto) */

/* ===== Página de producto (alquiler.php?material=X) ===== */
/* Matchear el espacio superior con las páginas sin wrapper (estilo .servicios) */
.cont-producto {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 40px !important;
}
@media (min-width: 575px) {
    .cont-producto { margin-top: 110px !important; }
}

/* Título del producto */
.tit-producto {
    padding: 0 !important;
    margin-bottom: 18px !important;
}
.tit-producto h1 {
    line-height: 1.25 !important;
    margin: 0 !important;
    letter-spacing: -0.01em;
    font-size: 2.2em !important;
    font-weight: bold;
    color: #0057b4;
}

/* Bloque imagen + info como una "card" */
.padd-producto {
    background: #fff;
    border-radius: 12px;
    padding: 0 20px !important;
    margin-bottom: 24px;
}
.padd-producto .img-thumbnail {
    width: 100% !important;
    height: auto !important;
    border-radius: 10px !important;
    border: 1px solid #eef0f2 !important;
    padding: 4px !important;
    background: #fafbfc !important;
}

/* Caja de info / precio */
.info-producto {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    padding-top: 10px;
}
.info-producto .btn-success,
.info-producto .btn-primary {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    padding: 12px 18px !important;
    border-radius: 10px !important;
    margin-bottom: 0 !important;
    text-align: center;
    transition: filter 0.2s ease, transform 0.2s ease;
}
.info-producto .btn-success {
    background: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}
.info-producto .btn-success span {
    font-size: 0.78rem !important;
    opacity: 0.8;
    margin-left: 4px;
    font-weight: 500;
}
.info-producto .btn-primary {
    background: #0057b4 !important;
    border-color: #0057b4 !important;
    color: #fff !important;
}
.info-producto .btn-success:hover,
.info-producto .btn-primary:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.info-producto .imp-baja {
    font-size: 0.88rem !important;
    color: #495057 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    background: #f8f9fa;
    padding: 10px 12px;
    border-left: 3px solid #0057b4;
    border-radius: 4px;
}
.info-producto .imp-baja strong { color: #0057b4; }

/* Compartir */
.compartir-producto {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #eef0f2;
}
.compartir-producto p {
    margin: 0 !important;
    font-weight: 600;
    color: #495057;
    font-size: 0.92rem;
}
.compartir-producto a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 !important;
    background: transparent !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.compartir-producto a:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}
.compartir-producto a i {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1;
}
.compartir-producto a .icon-facebook-square { color: #1877F2 !important; }
.compartir-producto a .icon-whatsapp-square,
.compartir-producto a i.whats-verde { color: #25D366 !important; }

/* Descripción */
.taby {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 24px 24px 14px !important;
    margin: 0 0 24px !important;
}
.taby p,
.taby li {
    color: #343a40 !important;
    line-height: 1.6 !important;
}

/* Tablas insertadas desde CKEditor (campo descripción).
   Van sin clase .table, así que el reset global les quita
   padding y bordes y las columnas quedan pegadas. Se re-estilan
   SOLO dentro de .taby para no afectar a tablas de otras páginas. */
.taby table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
    background: #fff;
}
.taby table th,
.taby table td {
    border: 1px solid #dee2e6 !important;
    padding: 10px 14px !important;
    text-align: left;
    vertical-align: top;
    color: #343a40 !important;
    line-height: 1.5 !important;
}
.taby table th {
    background: #f8f9fa;
    font-weight: 700;
}
.taby table tbody tr:nth-child(even) td {
    background: #fbfbfc;
}
/* En móvil, si la tabla es ancha permitimos scroll horizontal
   sin romper el ancho del contenedor. */
@media (max-width: 575.98px) {
    .taby table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* Vídeo */
.centra-video {
    margin: 0 0 24px !important;
}
.centra-video .embed-responsive {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

/* Botones inferiores */
.botones-bottom {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px !important;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin: 0 0 32px !important;
}
.botones-bottom a:first-child {
    color: #0057b4 !important;
    font-weight: 600;
    text-decoration: none !important;
}
.botones-bottom a:first-child:hover { text-decoration: underline !important; }
.botones-bottom .btn-success {
    padding: 10px 22px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    background: #198754 !important;
    border-color: #198754 !important;
}

/* Sección "Materiales relacionados" */
.nuevo-relacionados { margin-top: 8px; }
.relacionados-wrap {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0 !important;
    margin: 0 0 24px !important;
}
.titulo-relacionados {
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    color: #0057b4 !important;
    margin: 0 0 18px !important;
    padding-bottom: 0;
    border-bottom: 0;
}
@media (max-width: 991.98px) {
    .titulo-relacionados { font-size: 1.35rem !important; }
}
#relacionados {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}
@media (max-width: 767.98px) {
    #relacionados { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 419.98px) {
    #relacionados { grid-template-columns: 1fr; }
}
#relacionados .prod-rel {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
#relacionados .prod-rel:hover {
    border-color: #0057b4;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 87, 180, 0.10);
}
#relacionados .prod-rel > a:first-child {
    display: block;
    overflow: hidden;
    background: #fafbfc;
}
#relacionados .prod-rel img,
#relacionados .prod-rel .img-thumbnail {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fafbfc !important;
}
#relacionados .prod-rel h3 {
    margin: 0 !important;
    padding: 12px 14px 14px !important;
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    flex: 1;
    display: flex;
    align-items: flex-start;
    border-top: 1px solid #f1f3f5;
}
#relacionados .prod-rel h3 a {
    color: #0057b4 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}
#relacionados .prod-rel h3 a:hover {
    text-decoration: underline !important;
}

/* Responsive: en móvil la info baja debajo de la imagen */
@media (max-width: 991.98px) {
    .padd-producto { padding: 16px !important; }
    .info-producto { padding-top: 18px; }
    .tit-producto h1 { font-size: 1.35rem !important; }
}
