﻿.badge-status {
    padding: 0.45em 0.7em;
    font-size: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

.status-pending {
    background: #ffc107;
    color: #000;
}

.status-paid {
    background: #198754;
    color: #fff;
}

.status-shipped {
    background: #0d6efd;
    color: #fff;
}

.status-cancelled {
    background: #dc3545;
    color: #fff;
}
.page-item.active .page-link {
    pointer-events: none;
    cursor: default;
    background-color: #0d6efd;
    color: #fff;
}

/* ================================
   PRODUCT GRID
================================ */
/*.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}
*/
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
}

/* ================================
   CARD SIMPLE (HOME / DESTACADOS)
================================ */
/*.card-producto {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

    .card-producto:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }
*/
/* ================================
   CARD CATÁLOGO (CON FILTROS)
================================ */
.card-product {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    flex-grow: 1; /* 🔑 ocupa todo el alto disponible */
}

    .card-product:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }
.card-actions {
    margin-top: auto; /* 🔥 empuja hacia abajo */
    display: flex;
    gap: .5rem;
}

    /* ================================
   CARD BODY FLEX
================================ */
    .card-product .card-body,
    .card-producto .card-body {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

    /* ================================
   BOTÓN PEGADO ABAJO
================================ */
    .card-product .btn,
    .card-producto .btn {
        margin-top: auto;
    }

/* ================================
   IMAGE CONTAINER (ESTÁNDAR ÚNICO)
================================ */
.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
}

    /* Imagen */
    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        opacity: 0;
        transition: transform .35s ease, opacity .3s ease;
    }

/* Hover imagen */
.card-producto:hover .product-image img,
.card-product:hover .product-image img {
    transform: scale(1.04);
}

/* ================================
   SKELETON
================================ */
.product-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( 90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63% );
    animation: skeleton 1.4s infinite;
}

@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: 200px 0;
    }
}

.product-image.loaded::before {
    display: none;
}

.product-image.loaded img {
    opacity: 1;
}

/* ================================
   PLACEHOLDER
================================ */
.product-image.placeholder {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-image.placeholder::before {
        display: none;
    }

    .product-image.placeholder::after {
        content: "Sin imagen";
        font-size: .8rem;
        color: #adb5bd;
    }

/* ================================
   CARD BODY
================================ */
.card-product .card-body,
.card-producto .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.card-product h3,
.card-producto h3 {
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

/* ================================
   PRICE
================================ */
.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ================================
   FILTROS (COMPACTOS + STICKY)
================================ */
/*.filters-panel {
    position: sticky;
    top: 80px;
    z-index: 20;
    display: grid;
    grid-template-columns: 180px*/ /* Marca */
    /*140px*/ /* Precio (CLAVE) */
    /*auto*/ /* Checks */
    /*160px;*/ /* Ordenar */

    /*align-items: start;*/ /* 🔴 CLAVE: evita que el más alto mande */
    /*gap: .75rem;
    background: #fff;
    padding: .6rem .9rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}*/

/* ================================
   GRUPO PRECIO (NO EMPUJA ALTURA)
================================ */
/*.filter-group.price {
    max-width: 140px;
}*/

    /* Label del precio MÁS compacto */
    /*.filter-group.price label {
        font-size: .85rem;
        margin-bottom: .25rem;
        font-weight: 600;
    }*/

    /* Inputs Min / Max ULTRA compactos */
    /*.filter-group.price .input {
        height: 30px;
        padding: .25rem .5rem;
        font-size: .8rem;
    }*/

/* ================================
   RESTO DE GRUPOS
================================ */
/*.filter-group {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}*/

    /* ================================
   CHECKBOXES
================================ */
    /*.filter-group.checks {
        display: flex;
        flex-direction: column;
        gap: .4rem;
        padding-top: 1.8rem;*/ /* alinea con inputs */
    /*}

        .filter-group.checks label {
            font-size: .85rem;
            white-space: nowrap;
        }*/

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    .filters-panel {
        position: static;
        grid-template-columns: 1fr;
        box-shadow: none;
        padding: .5rem 0;
    }

    .filter-group.price {
        max-width: 100%;
    }
}

/* ================================
   BADGES
================================ */
.badge.success {
    background: #e6f7ee;
    color: #0f9d58;
    font-size: .75rem;
    padding: .25rem .5rem;
    border-radius: var(--radius-sm);
    width: fit-content;
}

/* ================================
   CART ICON
================================ */
.cart-icon {
    position: relative;
    font-size: 1.4rem;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--color-accent);
    color: #fff;
    font-size: .7rem;
    padding: 2px 6px;
    border-radius: 999px;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
/* =========================================
   PRODUCT DETAIL PAGE (AISLADO TOTAL)
========================================= */

.product-detail-page {
    padding: 2rem 1rem;
}

    /* GRID DESKTOP */
    .product-detail-page .product-detail-grid {
        display: grid;
        grid-template-columns: 420px 1fr;
        gap: 2.5rem;
        align-items: start;
    }

    /* CONTENEDOR IMAGEN */
    .product-detail-page .product-gallery-single {
        display: flex;
        justify-content: center;
    }

    /* CAJA IMAGEN */
    .product-detail-page .main-image {
        width: 100%;
        max-width: 420px;
        aspect-ratio: 1 / 1;
        background: #fff;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

        /* 🔴 FUERZA ANTI-CSS GLOBAL */
        .product-detail-page .main-image img {
            width: auto !important;
            height: 100% !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
            display: block !important;
            margin: auto !important;
        }

    /* INFO */
    .product-detail-page .product-info {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

        .product-detail-page .product-info h1 {
            font-size: 1.8rem;
            font-weight: 700;
        }

    .product-detail-page .price {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--color-primary);
    }

/* MOBILE */
@media (max-width: 768px) {
    .product-detail-page .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-detail-page .main-image {
        max-width: 360px;
        margin: 0 auto;
    }
}

/* =====================================
   CART PAGE – REDESIGN
===================================== */

.cart-page {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* ================================
   CART LIST
================================ */

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ================================
   CART ROW
================================ */

.cart-row {
    display: grid;
    /*este codigo de abajo es para cambiar el tamaño tmb de la imagen*/
    grid-template-columns: 110px 1fr 120px;
    gap: 1rem;
    align-items: center;
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}

    .cart-row:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

/* ================================
   IMAGE
================================ */

.cart-thumb {
    width:100px;
    height: 100px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius-sm);
}

/* ================================
   DETAILS
================================ */

.cart-details {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

    .cart-details h4 {
        font-size: .95rem;
        font-weight: 600;
        margin: 0;
    }

.unit-price {
    font-size: .85rem;
    color: #666;
}

/* ================================
   ACTIONS
================================ */

.cart-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

    .cart-actions input {
        width: 60px;
        padding: .3rem;
        font-size: .85rem;
        border-radius: var(--radius-sm);
        border: 1px solid #ddd;
    }

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: .8rem;
    cursor: pointer;
}

    .remove-btn:hover {
        text-decoration: underline;
    }

/* ================================
   LINE TOTAL
================================ */

.cart-line-total {
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary);
}

/* ================================
   RESUME
================================ */

.cart-resume {
    position: sticky;
    top: 90px;
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 260px; /* 🔑 límite vertical */
    justify-content: space-between; 
}

    .cart-resume h3 {
        margin: 0;
        font-size: 1.1rem;
    }

.resume-line {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {

    .cart-page {
        grid-template-columns: 1fr;
    }

    .cart-row {
        grid-template-columns: 60px 1fr;
    }

    .cart-line-total {
        grid-column: 1 / -1;
        text-align: right;
        margin-top: .5rem;
    }

    .cart-resume {
        position: static;
    }
}

/*MINI CART HEADER*/
.mini-cart {
    position: relative;
    font-size: 1.4rem;
    color: inherit;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: bold;
}
/* =====================================
   AUTH PAGES (LOGIN / REGISTER)
===================================== */

.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.auth-card {
    border: none;
    border-radius: var(--radius-lg);
    animation: fadeUp .4s ease;
}

    .auth-card h2 {
        font-weight: 700;
    }

.auth-btn {
    padding: .6rem;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .auth-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(0,0,0,.15);
    }

/* Input focus elegante */
.auth-card .form-control:focus {
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
}
/* AUTH LAYOUT */
.auth-container {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    animation: fadeUp .4s ease;
}

    /* INPUT */
    .auth-card .form-control {
        border-radius: .5rem;
    }

    /* BUTTON */
    .auth-card .btn-primary {
        border-radius: .6rem;
        font-weight: 600;
    }

/* ANIMATION */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
.fade-up {
    animation: fadeUp .4s ease;
}

.fade-in {
    animation: fadeIn .3s ease;
}
/* Animación */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.btn-primary {
    width: 100%;
    padding: .8rem;
}
/*PERFIL*/
/* ===============================
   PROFILE PAGE
================================ */
.profile-page {
    padding: 2rem 0;
}

.profile-card {
    border-radius: 14px;
}

/* Tabs */
.profile-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
}

    .profile-tabs .nav-link.active {
        color: var(--color-primary);
        font-weight: 600;
        border-bottom: 2px solid var(--color-primary);
    }

/* Tab content */
.tab-content {
    animation: fadeUp .35s ease;
}

/* Skeleton */
.skeleton-box {
    height: 160px;
    border-radius: 8px;
    background: linear-gradient( 90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63% );
    background-size: 400% 100%;
    animation: skeleton 1.4s infinite;
}

/* Animaciones */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*Sesiones lista*/
.session-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .session-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .session-card.current {
        border-left: 4px solid var(--primary);
        background: #f8fbff;
    }

.session-info small {
    font-size: 0.85rem;
}

.session-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
/*SISTEA DE RASTREO*/
/* ================================
   ORDER TIMELINE (ÚNICO Y DEFINITIVO)
================================ */

.order-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Paso base */
.timeline-step {
    display: flex;
    gap: 1rem;
    opacity: 0.35;
    transition: all .3s ease;
}

/* Contenedor del ícono */
.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #6c757d;
}

/* Texto */
.timeline-content {
    flex: 1;
}

    .timeline-content strong {
        display: block;
    }

/* ================================
   ESTADOS
================================ */

/* Paso COMPLETADO */
.timeline-step.completed {
    opacity: 1;
}

    .timeline-step.completed .timeline-icon {
        background: #198754; /* verde */
        color: #fff;
    }

/* Paso ACTUAL */
.timeline-step.active {
    opacity: 1;
}

    .timeline-step.active .timeline-icon {
        background: #0d6efd; /* azul */
        color: #fff;
    }

/* Pedido CANCELADO */
.timeline-step.cancelled {
    opacity: 1;
}

    .timeline-step.cancelled .timeline-icon {
        background: #dc3545; /* rojo */
        color: #fff;
    }

/* Texto secundario */
.timeline-content .text-muted {
    font-size: .85rem;
}

/* ===== DIRECCIONES ===== */
/* ===== MODAL BLazor PURO ===== */

.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 2000;
}

.modal-custom {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-card {
    background: #fff;
    width: 100%;
    max-width: 720px;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
}

.modal-body {
    padding: 1.25rem;
}

/*Spiner carga procesando pago*/
.checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.checkout-processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75); /* 🔥 fondo oscuro real */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-processing-box {
    background: #111;
    color: #fff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    text-align: center;
    min-width: 260px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

    .checkout-processing-box .spinner-border {
        width: 3rem;
        height: 3rem;
    }
/* ================================
   HORIZONTAL CATEGORY BAR
================================ */

.categories-menu {
    background: #fff;
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    animation: fadeUp .4s ease;
}

.categories-title {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* CONTENEDOR SCROLL */
.categories-scroll {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    padding-bottom: .4rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}

    .categories-scroll::-webkit-scrollbar {
        display: none; /* Chrome */
    }

/* CHIP */
.category-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border-radius: 999px;
    background: #f5f7fa;
    font-size: .9rem;
    cursor: pointer;
    transition: all .25s ease;
    scroll-snap-align: start;
    white-space: nowrap;
}

    /* Hover */
    .category-chip:hover {
        background: #e6edff;
        transform: translateY(-2px);
    }

    /* Activo */
    .category-chip.active {
        background: var(--color-primary);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 6px 18px rgba(13,110,253,.25);
    }

    /* Icon */
    .category-chip i {
        font-size: .9rem;
    }
