/* ============================================
   DETALLE DE PRODUCTO
   (Extraído de detalle_producto.php: estilos
   inline del head + bloque de reseñas)
   ============================================ */

:root {
    --coto-red: #E20025;
    --coto-red-hover: #B42018;
    --coto-green: #00a524;
    --coto-gray: #51585e;
    --coto-light: #F2F2F2;
}
* { font-family: 'Poppins', sans-serif; }
body { background: #fff; color: var(--coto-gray); padding-top: 130px; }
@media (max-width: 767px) { body { padding-top: 135px; } }
.breadcrumb { background: none; padding: 1rem 0; font-size: 0.85rem; }
.breadcrumb a { color: var(--coto-gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--coto-red); }
.product-section { padding: 0.5rem 0 3rem; }
.gallery-wrap {
    background: var(--coto-light);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
}
.thumb-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.thumb-item {
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    padding: 4px;
    transition: border-color 0.2s;
}
.thumb-item.active { border-color: var(--coto-red); }
.thumb-item img { width: 100%; height: 100%; object-fit: contain; }
.main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
}
.main-image img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
}
.product-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}
.product-code {
    font-size: 0.8rem;
    color: #9DA1A7;
}
.price-display {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}
.price-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--coto-red);
}
.price-unit {
    font-size: 0.9rem;
    color: #9DA1A7;
}
.qty-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}
.qty-control label {
    font-weight: 500;
    margin-right: 0.5rem;
}
.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.qty-btn:hover { border-color: var(--coto-red); color: var(--coto-red); }
.qty-value {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
}
.btn-add-cart {
    background: var(--coto-red);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-add-cart:hover {
    background: var(--coto-red-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226,0,37,0.3);
}
.stock-info {
    font-size: 0.85rem;
    margin: 0.5rem 0;
}
.stock-info .in-stock { color: var(--coto-green); }
.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 0.85rem;
}
.info-item .label { color: #9DA1A7; }
.info-item .value { font-weight: 500; color: #212529; }
.info-grid { margin-top: 1.5rem; }
.badge-oferta {
    background: var(--coto-red);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-nuevo {
    background: #ff8100;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.description-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--coto-light);
    border-radius: 12px;
}
.description-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.description-section p { font-size: 0.9rem; line-height: 1.7; }
.related-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}
.related-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.rel-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1rem 0.75rem;
    transition: box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.rel-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.rel-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}
.rel-card .name {
    font-size: 0.85rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.rel-card .price {
    color: var(--coto-red);
    font-weight: 700;
    font-size: 1rem;
    margin: 0.25rem 0;
}
.rel-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--coto-red);
    border-radius: 8px;
    background: #fff;
    color: var(--coto-red);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}
.rel-add-cart:hover {
    background: var(--coto-red);
    color: #fff;
}
.rel-add-cart:active {
    transform: scale(0.97);
}
@media (max-width: 767px) {
    .gallery-wrap { flex-direction: column-reverse; }
    .thumb-list { flex-direction: row; }
    .main-image { min-height: 250px; }
    .product-name { font-size: 1.2rem; }
    .price-current { font-size: 2rem; }
}

/* ── Reseñas ── */
.star-rating i { transition: transform .15s; }
.star-rating i:hover { transform: scale(1.3); }
.resena-item { padding:1rem 0; border-bottom:1px solid #eee; }
.resena-item:last-child { border-bottom:none; }
.resena-item .stars { color:#ffc107; font-size:1.1rem; }
.resena-item .author { font-weight:600; font-size:0.9rem; }
.resena-item .date { font-size:0.8rem; color:#999; margin-left:0.5rem; }
.resena-item .comment { font-size:0.9rem; margin-top:0.3rem; color:#555; }

/* Skeleton loader for reviews */
.resena-skeleton { padding: 1rem 0; border-bottom: 1px solid #eee; }
.resena-skeleton:last-child { border-bottom: none; }
.resena-skeleton .skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skShimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}
.resena-skeleton .skeleton-line.stars { width: 120px; height: 18px; }
.resena-skeleton .skeleton-line.author { width: 160px; }
.resena-skeleton .skeleton-line.comment { width: 80%; }
@keyframes skShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}