/**
 * Module: Modern Order Summary
 * Trigger: .is-modern-order-summary
 * Style: Skeleton Replica (Compact, 48px Images, Pill Container)
 */

/* =========================================
   1. CONTAINER (Pill Effect & Base Color)
   ========================================= */
.is-modern-order-summary .wc-block-components-order-summary {
    background-color: var(--wp--preset--color--custom-gris-contraste) !important;
    border-radius: 12px;
    padding: 1.25rem;
}

/* =========================================
   2. REMOVALS (Limpieza)
   ========================================= */
.is-modern-order-summary .wc-block-components-product-metadata,
.is-modern-order-summary .wc-block-components-product-metadata__description,
.is-modern-order-summary .wc-block-components-order-summary-item__quantity,
.is-modern-order-summary .wc-block-components-order-summary-item__individual-prices {
    display: none !important;
}

/* =========================================
   3. IMAGES (66px Height - 2:3 Aspect Ratio)
   ========================================= */
.is-modern-order-summary .wc-block-components-order-summary-item__image {
    width: 44px !important;
    /* Calculado: 66px de alto * (2/3) */
    height: 66px !important;
    flex: 0 0 44px !important;
    /* Bloquea el ancho, evita que flexbox lo estire o encoja */
    border-radius: 6px;
    /* Radio pequeño como el skeleton */
    overflow: hidden;
    /* Espacio entre imagen y texto */
    position: relative;
}

.is-modern-order-summary .wc-block-components-order-summary-item__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    /* Asegura que la imagen llene el contenedor sin deformarse */
    aspect-ratio: 2 / 3 !important;
    /* Proporción vertical */
}

/* =========================================
   4. LAYOUT ITEMS (Compact Rows)
   ========================================= */
.is-modern-order-summary .wc-block-components-order-summary-item {
    display: flex;
    align-items: center !important;
    justify-content: space-between;

    /* Espaciado vertical idéntico al skeleton */

    border-bottom: 1px solid var(--wp--preset--color--accent-3);

    /* Línea separadora muy sutil */
}

/* Quitar borde del último item */
.is-modern-order-summary .wc-block-components-order-summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Contenedor de Textos (Título + Categoría) */
.is-modern-order-summary .wc-block-components-order-summary-item__description {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 0.5rem;
    /* Espacio antes del precio */
}

/* =========================================
   5. TYPOGRAPHY (Title & Category)
   ========================================= */

/* Título del Producto */
.is-modern-order-summary .wc-block-components-product-name {
    font-family: var(--wp--preset--font-family--raleway);
    font-size: var(--wp--preset--font-size--small) !important;
    /* 0.875rem / 14px */
    font-weight: 600 !important;
    color: var(--wp--preset--color--accent-3) !important;
    /* Blanco Suave */
    line-height: 1.2;
    margin: 0 0 4px 0 !important;
    /* Pequeño margen abajo para la categoría */
}

/* Categoría (Inyectada vía PHP) */
.vortex-checkout-item-category {
    display: block;
    font-family: var(--wp--preset--font-family--raleway);
    font-size: 12px;
    /* Un poco más pequeño que el título */
    color: var(--wp--preset--color--custom-gris-claro) !important;
    /* Gris Claro */
    font-weight: 500;
    line-height: 1;
    text-transform: capitalize;
}

/* =========================================
   6. PRICE (Right Aligned)
   ========================================= */
.is-modern-order-summary .wc-block-components-order-summary-item__total-price {
    font-family: var(--wp--preset--font-family--raleway);
    font-weight: 700;
    color: var(--wp--preset--color--accent-3) !important;
    font-size: var(--wp--preset--font-size--small) !important;
    white-space: nowrap;
    /* Que no se rompa el precio */
    margin-left: auto;
    /* Empujar a la derecha */
}