/* =========================================================
   FICHA DEL PRODUCTO - ADMIN
   ========================================================= */

.admin-product-detail {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px 60px;
}


/* =========================================================
   HEADER
   ========================================================= */

.admin-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 25px;
    margin: 35px 0 25px;
}

.admin-product-header h4 {
    margin: 5px 0 4px;
    font-size: 1.7rem;
    font-weight: 700;
    color: #222;
}

.admin-product-header p {
    margin: 0;
    color: #6c757d;
    font-size: .95rem;
}

.admin-product-eyebrow {
    display: block;
    color: #048ABF;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.admin-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #dfe5ea;
    background: #fff;
    color: #444;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: all .2s ease;
}

.admin-back-button:hover {
    color: #048ABF;
    border-color: #048ABF;
    transform: translateY(-1px);
}


/* =========================================================
   FICHA PRINCIPAL
   ========================================================= */

.product-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 35px;
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
    border: 1px solid #edf0f2;
}


/* =========================================================
   GALERÍA
   ========================================================= */

.product-gallery {
    min-width: 0;
}

.product-carousel {
    overflow: hidden;
    border-radius: 16px;
    background: #f5f7f9;
}

.product-detail-image {
    display: block;
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.product-no-image {
    width: 100%;
    height: 430px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f7f9;
    border-radius: 16px;
    overflow: hidden;
}

.product-no-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Flechas del carrusel */

.product-carousel .carousel-control-prev,
.product-carousel .carousel-control-next {
    width: 45px;
    height: 45px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 15px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    opacity: .9;
}

.product-carousel .carousel-control-prev:hover,
.product-carousel .carousel-control-next:hover {
    background: rgba(0, 0, 0, .65);
}


/* =========================================================
   INFORMACIÓN DEL PRODUCTO
   ========================================================= */

.product-detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px 10px;
}

.product-detail-label {
    color: #048ABF;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.product-detail-title h1 {
    margin: 8px 0 18px;
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
    color: #202428;
}


/* Estado */

.product-status-row {
    margin-bottom: 25px;
}

.product-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
}

.product-status.active {
    background: #e8f7ef;
    color: #198754;
}

.product-status.inactive {
    background: #eef0f2;
    color: #6c757d;
}


/* Datos */

.product-data-list {
    border-top: 1px solid #e9ecef;
}

.product-data-item {
    padding: 18px 0;
    border-bottom: 1px solid #e9ecef;
}

.product-data-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: #6c757d;
    font-size: .85rem;
    font-weight: 600;
}

.product-data-label i {
    color: #048ABF;
}

.product-data-item strong {
    color: #292d32;
    font-size: 1rem;
}

.product-description p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}


/* =========================================================
   SECCIÓN VARIANTES
   ========================================================= */

.variants-section {
    margin-top: 45px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}

.section-header h5 {
    margin: 5px 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #222;
}

.section-header p {
    margin: 0;
    color: #777;
    font-size: .9rem;
}


/* =========================================================
   BOTÓN AGREGAR
   ========================================================= */

.add-variant-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 17px;
    background: #048ABF;
    color: #fff;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all .2s ease;
}

.add-variant-button:hover {
    background: #03769f;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(4, 138, 191, .2);
}


/* =========================================================
   TABLA
   ========================================================= */

.variants-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #edf0f2;
    box-shadow: 0 7px 22px rgba(0, 0, 0, .07);
    overflow: hidden;
}

.variants-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.variants-table {
    min-width: 950px;
    margin: 0;
    border: none;
    vertical-align: middle;
}

.variants-table thead {
    background: #f5f8fa;
}

.variants-table th {
    padding: 16px 15px;
    border: none;
    border-bottom: 1px solid #e4e9ed;
    color: #555;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}

.variants-table td {
    padding: 17px 15px;
    border-color: #edf0f2;
    color: #444;
    font-size: .9rem;
}

.variants-table tbody tr {
    transition: background-color .2s ease;
}

.variants-table tbody tr:hover {
    background-color: #f8fbfc;
}

.variants-table tbody tr:last-child td {
    border-bottom: none;
}


/* Código */

.variant-code {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 7px;
    background: #f1f4f6;
    color: #495057;
    font-family: monospace;
    font-size: .82rem;
    font-weight: 600;
}


/* Precio */

.variant-price {
    color: #048ABF;
    font-size: .95rem;
    font-weight: 700;
}


/* Valores inexistentes */

.empty-value {
    color: #999;
    font-size: .78rem;
    font-style: italic;
}


/* =========================================================
   ESTADO DE VARIANTE
   ========================================================= */

.variant-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 700;
}

.variant-status.active {
    color: #198754;
    background: #e8f7ef;
}

.variant-status.inactive {
    color: #6c757d;
    background: #eef0f2;
}


/* =========================================================
   ACCIONES
   ========================================================= */

.variant-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.variant-actions form {
    margin: 0;
}

.variant-edit-button,
.variant-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    transition: all .2s ease;
}

.variant-edit-button {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #856404;
    text-decoration: none;
}

.variant-edit-button:hover {
    background: #ffdf8a;
    color: #664d03;
}

.variant-delete-button {
    background: #fff;
    border: 1px solid #f1b8bd;
    color: #dc3545;
}

.variant-delete-button:hover {
    background: #dc3545;
    color: #fff;
}


/* =========================================================
   SIN VARIANTES
   ========================================================= */

.empty-variants {
    padding: 55px 25px;
    text-align: center;
}

.empty-variants-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef8fc;
    color: #048ABF;
    font-size: 1.5rem;
}

.empty-variants h6 {
    margin-bottom: 7px;
    font-size: 1.1rem;
    font-weight: 700;
}

.empty-variants p {
    margin-bottom: 20px;
    color: #777;
    font-size: .9rem;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991.98px) {

    .admin-product-detail {
        padding-left: 20px;
        padding-right: 20px;
    }

    .product-detail-card {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .product-detail-image,
    .product-no-image {
        height: 400px;
    }

    .product-detail-info {
        padding: 5px;
    }

    .product-detail-title h1 {
        font-size: 1.7rem;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .admin-product-detail {
        padding: 0 15px 45px;
    }

    .admin-product-header {
        flex-direction: column;
        align-items: flex-start;
        margin: 25px 0 20px;
        gap: 15px;
    }

    .admin-product-header h4 {
        font-size: 1.45rem;
    }

    .admin-back-button {
        width: 100%;
        justify-content: center;
    }

    .product-detail-card {
        padding: 15px;
        border-radius: 16px;
        gap: 20px;
    }

    .product-detail-image,
    .product-no-image {
        height: 300px;
    }

    .product-carousel .carousel-control-prev,
    .product-carousel .carousel-control-next {
        width: 38px;
        height: 38px;
        margin: 0 8px;
    }

    .product-detail-title h1 {
        font-size: 1.5rem;
    }

    .product-data-item {
        padding: 15px 0;
    }

    .variants-section {
        margin-top: 35px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .section-header h5 {
        font-size: 1.25rem;
    }

    .add-variant-button {
        width: 100%;
    }

    .variants-card {
        border-radius: 14px;
    }

    .variants-table {
        min-width: 900px;
    }

}


/* =========================================================
   MOBILE PEQUEÑO
   ========================================================= */

@media (max-width: 480px) {

    .product-detail-image,
    .product-no-image {
        height: 250px;
    }

    .product-detail-card {
        padding: 12px;
    }

    .product-detail-title h1 {
        font-size: 1.35rem;
    }

    .product-status {
        font-size: .75rem;
    }

    .section-header p {
        font-size: .82rem;
    }

}