:root {
    --socialite-blue: #0055E6;
    --socialite-white: #FFFFFF;
    --socialite-beige: #DFD5CC;
    --socialite-page: #eaf2fb;
    --socialite-dark: #1F2937;
}

@font-face {
    font-family: Inter;
    src: url('fonts/inter-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

body {
    --bs-body-font-family: Inter, 'Segoe UI', sans-serif;
    --bs-body-color: var(--socialite-dark);
    background-color: var(--socialite-page);
}

a {
    color: var(--socialite-blue);
}

.btn-primary {
    color: #fff;
    background-color: var(--socialite-blue);
    border-color: var(--socialite-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0047c2;
    border-color: #0047c2;
}

.btn-outline-primary {
    --bs-btn-color: var(--socialite-blue);
    --bs-btn-bg: var(--socialite-white);
    --bs-btn-border-color: var(--socialite-blue);
    --bs-btn-hover-color: var(--socialite-white);
    --bs-btn-hover-bg: var(--socialite-blue);
    --bs-btn-hover-border-color: var(--socialite-blue);
    --bs-btn-active-color: var(--socialite-white);
    --bs-btn-active-bg: #0047c2;
    --bs-btn-active-border-color: #0047c2;
    --bs-btn-disabled-color: var(--socialite-blue);
    --bs-btn-disabled-bg: var(--socialite-white);
    --bs-btn-disabled-border-color: var(--socialite-blue);
    color: var(--socialite-blue);
    background-color: var(--socialite-white);
    border-color: var(--socialite-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--socialite-blue);
    border-color: var(--socialite-blue);
    color: #fff;
}

.btn-primary,
.btn-outline-primary {
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

.socialite-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(0, 85, 230, 0.35);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.auth-section {
    padding: 3rem 0 4rem;
    min-height: 60vh;
}

.auth-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--socialite-dark);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.auth-link {
    font-size: 0.9rem;
}

.auth-link a {
    color: var(--socialite-blue);
    font-weight: 600;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: none;
}

/* Pantallas de cliente */
.cliente-section {
    padding: 2rem 0 4rem;
}

.cliente-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--socialite-dark);
    margin-bottom: 0.25rem;
}

.section-subtitle {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.product-image-placeholder {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.product-emoji {
    font-size: 3.5rem;
}

.product-name {
    font-weight: 700;
    color: var(--socialite-dark);
}

.product-price {
    font-weight: 700;
    color: var(--socialite-blue);
}

.carrito-placeholder {
    height: 90px;
}

.confirmacion-icon {
    font-size: 3rem;
    color: var(--socialite-blue);
    font-weight: 800;
}


.product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}


.site-footer {
    margin-top: auto;
}

.aviso-carrito {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}

.aviso-carrito:not(:empty) {
    padding: .75rem 1rem;
    color: #15583a;
    background: #f0fff5;
    border: 1px solid #73ad87;
    border-radius: .75rem;
    box-shadow: 0 .25rem .9rem #1c302421;
}

.socialite-actions-pair {
    justify-content: flex-start;
}

.password-field {
    position: relative;
}

.password-field > input {
    padding-inline-end: 3rem;
}

.password-toggle {
    position: absolute;
    inset-block: 0;
    inset-inline-end: .2rem;
    display: grid;
    place-items: center;
    width: 2.5rem;
    border: 0;
    border-radius: .375rem;
    background: transparent;
    color: var(--socialite-dark);
}

.password-toggle:hover {
    color: var(--socialite-blue);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--socialite-blue);
    outline-offset: -3px;
}

.password-toggle [data-eye-oculto],
.password-toggle[aria-pressed="true"] [data-eye-visible] {
    display: none;
}

.password-toggle[aria-pressed="true"] [data-eye-oculto] {
    display: block;
}

.password-field input::-ms-reveal {
    display: none;
}

.checkout-page {
    --checkout-border: #d4e0ee;
    padding-block: clamp(1.75rem, 4vw, 3rem);
}

.checkout-page > h1 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.checkout-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.checkout-progress ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    gap: .25rem;
    padding: .375rem .5rem;
    margin: 0;
    border: 1px solid var(--checkout-border);
    border-radius: 999px;
    background: var(--socialite-white);
    box-shadow: 0 2px 4px #102a4310;
}

.checkout-progress li {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.checkout-progress li + li::before {
    content: "";
    width: .35rem;
    height: .35rem;
    border-top: 1px solid #66738a;
    border-right: 1px solid #66738a;
    transform: rotate(45deg);
}

.checkout-step {
    display: block;
    border-radius: 999px;
    color: #556480;
    padding: .375rem clamp(.55rem, 1.5vw, 1.2rem);
    font-size: .9rem;
    font-weight: 600;
}

.checkout-step.complete {
    color: #09713a;
}

.checkout-step.active {
    color: white;
    background: var(--socialite-blue);
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.checkout-grid-cart {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.checkout-card {
    min-width: 0;
    background: var(--socialite-white);
    border: 1px solid var(--checkout-border);
    border-radius: 1rem;
    padding: clamp(1rem, 2vw, 1.75rem);
    box-shadow: 0 3px 9px #102a430d;
}

.checkout-card h2, .checkout-card-title {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 750;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.checkout-card .btn {
    padding-inline: 1rem;
}

.checkout-cart-item, .checkout-product, .checkout-summary-line {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.checkout-cart-item, .checkout-summary-line {
    border-bottom: 1px solid var(--checkout-border);
    padding-block: .75rem;
}

.checkout-cart-item {
    flex-wrap: wrap;
}

.checkout-product, .checkout-summary-name {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.checkout-thumbnail {
    display: grid;
    place-items: center;
    flex: none;
    width: 4rem;
    height: 3.25rem;
    border-radius: .65rem;
    overflow: hidden;
    background: #fff1da;
}

.checkout-cart-item .checkout-thumbnail {
    width: 5.5rem;
    height: 4.5rem;
}

.checkout-thumbnail .product-photo {
    object-fit: contain;
    min-width: 0;
    min-height: 0;
}

.checkout-quantity {
    display: flex;
    align-items: stretch;
    border: 1px solid #aabbd3;
    border-radius: .6rem;
}

.checkout-quantity > * {
    display: grid;
    place-items: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0 .25rem;
}

.checkout-quantity button {
    border: 0;
    border-radius: .5rem;
    color: var(--socialite-blue);
    background: transparent;
}

.checkout-quantity button:not(:disabled):hover {
    background: var(--socialite-page);
}

.checkout-quantity button:disabled {
    color: #74829b;
    opacity: .65;
}

.checkout-quantity span {
    border-inline: 1px solid var(--checkout-border);
    font-variant-numeric: tabular-nums;
}

.checkout-card .checkout-remove {
    color: #52627b;
    padding-inline: .25rem;
}

.checkout-remove:hover {
    text-decoration: underline;
}

.checkout-summary-items {
    margin-bottom: .75rem;
}

.checkout-totals {
    margin-bottom: .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--checkout-border);
}

.checkout-totals > div, .checkout-total {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.checkout-totals dt {
    font-weight: 400;
}

.checkout-totals dd {
    margin-bottom: .25rem;
    white-space: nowrap;
}

.checkout-total {
    font-size: 1.15rem;
    font-weight: 750;
    margin: 0;
}

.checkout-option {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 2.4rem;
    cursor: pointer;
}

.checkout-option .form-check-input {
    flex-shrink: 0;
    margin: 0;
}

.checkout-option .form-check-input:checked {
    background-color: var(--socialite-blue);
    border-color: var(--socialite-blue);
}

.checkout-card-example {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    font-size: .9rem;
    font-weight: 600;
}

.checkout-card-example > div:nth-child(-n + 2) {
    grid-column: 1 / -1;
}

.checkout-card-example .form-control {
    margin-top: .2rem;
    color: #586981;
    background-color: #f8fafc;
    font-weight: 400;
}

.checkout-payment-actions {
    align-items: stretch;
}

.checkout-payment-actions > .btn {
    flex: 1 1 0;
    border-radius: 999px;
}

@media (max-width: 991.98px) {
    .checkout-grid, .checkout-grid-cart {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .checkout-card .socialite-actions {
        align-items: stretch;
        flex-wrap: nowrap;
    }

    .checkout-card .socialite-actions > .btn {
        display: grid;
        place-items: center;
        min-width: 0;
        font-size: .875rem;
        padding-inline: .375rem;
    }

    .checkout-product {
        flex-basis: 100%;
    }

    .checkout-quantity {
        margin-right: auto;
    }
}
/* Aviso de conexión: visible durante el prerenderizado y oculto cuando el circuito conecta. */
.aviso-conexion {
    background-color: var(--socialite-blue);
    color: var(--socialite-white);
    font-size: 0.875rem;
    text-align: center;
    padding: 0.35rem 0.75rem;
}

body.interactivo .aviso-conexion {
    display: none;
}

/* Miniaturas de productos en Gestión de productos */
.product-thumb {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #d9e2f1;
    background: #eef2f8;
}

.product-thumb-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-style: dashed;
    border-width: 2px;
    border-color: #9db1d0;
    color: #5b6b84;
}

/* Ticket promedio y gráficos de reportes web */
.ticket-promedio {
    background: #ffffff;
    border: 1px solid #d9e2f1;
    border-radius: 0.75rem;
    padding: 1rem;
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: .5rem;
}

.ticket-promedio-importe {
    color: var(--socialite-blue);
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.ticket-promedio-leyenda {
    color: var(--socialite-dark);
    font-size: 0.85rem;
}

.barra-distribucion .progress {
    background: #e6ecf6;
    border-radius: 1rem;
    overflow: hidden;
}

.barra-distribucion .progress-bar {
    background: var(--socialite-blue);
    border-radius: 1rem;
    text-align: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.25rem;
}

.barra-horizontal-producto > div:first-child {
    min-width: 0;
    flex: 0 0 45%;
    max-width: 45%;
}

.barra-horizontal-producto .progress-bar {
    background: linear-gradient(90deg, #0055E6, #0047c2);
}

@media (max-width: 575.98px) {
    .barra-horizontal-producto .progress-bar { font-size: 0.75rem; }
    .barra-horizontal-producto > div:first-child { flex-basis: 55%; max-width: 55%; }
}


/* Cuenta y compra comparten la identidad, la tipografía y el fondo del sitio. */
.socialite-icon { flex-shrink: 0; vertical-align: middle; }
.account-page, .order-page { padding-top: 2.2rem; padding-bottom: 3rem; }
.account-heading { margin-bottom: 1.8rem; }
.account-heading h1, .order-page h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 750; margin-bottom: .35rem; }
.account-heading p, .order-detail-heading > p { color: #58667b; margin-bottom: 0; }
.account-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.account-sidebar, .account-panel, .order-card, .receipt-paper { background: #fff; border: 1px solid #d5e1f0; border-radius: 16px; box-shadow: 0 3px 12px #22385208; }
.account-sidebar { padding: 24px 16px; }
.account-identity { padding: 0 10px 20px; margin-bottom: 12px; border-bottom: 1px solid #d5e1f0; overflow-wrap: anywhere; }
.account-identity strong { display: block; font-size: 1.2rem; }
.account-identity span { color: #647188; }
.account-sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.account-sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 12px 10px; text-decoration: none; border-radius: 9px; color: #263448; border-left: 4px solid transparent; }
.account-sidebar nav a:hover, .account-sidebar nav a.active { background: #e7f0ff; color: var(--socialite-blue); }
.account-sidebar nav a.active { border-left-color: var(--socialite-blue); font-weight: 650; }
.account-main { min-width: 0; }
.account-panel { padding: 28px; }
.account-panel-heading { display: flex; gap: 15px; align-items: flex-start; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid #d5e1f0; }
.account-panel-heading > svg { color: var(--socialite-blue); margin-top: 2px; }
.account-panel-heading h2 { font-size: 1.45rem; font-weight: 750; margin-bottom: 5px; }
.account-panel-heading p { margin: 0; color: #647188; font-size: .95rem; }
.account-panel .form-control, .account-panel .form-select { min-height: 44px; }
.account-panel .row > label > span.text-body-secondary { display: none !important; margin-top: 4px; font-size: .8rem; }
.account-panel .row > label:focus-within > span.text-body-secondary { display: block !important; }
.account-panel .row > label, .account-panel .form-label { font-weight: 550; }
.account-panel form .socialite-actions, .account-form-actions { border-top: 1px solid #d5e1f0; padding-top: 22px; margin-top: 24px !important; }
.account-password-fields { max-width: 560px; }
.account-without-menu { max-width: 950px; margin: 0 auto; }
.account-orders-table th { font-size: .85rem; color: #5c6d83; background: #f6f9fe; border: 0; }
.account-orders-table td { padding-top: 16px; padding-bottom: 16px; }
.account-orders-table .table { margin-bottom: 0; }
.order-badge { display: inline-block; border-radius: 30px; padding: 5px 12px; font-size: .77rem; font-weight: 650; white-space: nowrap; vertical-align: middle; }
.order-badge.confirmed { color: #176d3b; background: #e0f6e7; }
.order-badge.pending { color: #875a06; background: #fff1d6; }
.order-badge.cancelled { color: #b42336; background: #ffe6e9; }
.address-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.address-card, .history-card { border: 1px solid #d5e1f0; border-radius: 12px; padding: 20px; }
.address-card p { color: #647188; margin: 8px 0 16px; }
.address-card .btn + .btn { margin-left: 6px; }
.history-card { margin-bottom: 15px; }
.history-card header, .history-card footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; }
.history-card header { padding-bottom: 14px; }
.history-card h3 { font-size: 1.05rem; font-weight: 650; margin: 0 0 5px; }
.history-card header p { margin: 0; color: #647188; font-size: .85rem; }
.history-card li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .9rem; }
.history-card footer { padding-top: 14px; border-top: 1px solid #e3ebf6; }
.account-empty { padding: 28px 10px; color: #647188; }
.order-detail-heading { margin-bottom: 22px; }
.order-detail-heading h1 { margin-bottom: 0; }
.order-detail-heading > p { margin-top: 8px; }
.order-card { padding: 26px; min-width: 0; }
.order-card h2 { font-size: 1.35rem; font-weight: 750; margin-bottom: 24px; }
.order-card h3 { font-weight: 650; }
.order-detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; margin-top: 22px; align-items: stretch; }
.order-confirmation-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; align-items: start; }
.order-success { text-align: center; margin-bottom: 24px; }
.order-success h1 { margin-top: 14px; }
.order-success > p { color: #58667b; font-size: 1.15rem; }
.success-check { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #d8f7e2; color: #178242; width: 62px; height: 62px; }
.order-confirmation-actions { justify-content: center; margin-top: 25px; }
.order-confirmation-actions > .btn { min-width: 180px; }
.order-products { margin-bottom: 12px; }
.order-products > li { display: flex; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid #e1e8f2; }
.order-products > li:first-child { padding-top: 0; }
.order-product-image { width: 88px; height: 78px; border-radius: 9px; background: #fff0d9; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; }
.order-product-image .product-photo { width: 100%; height: 100%; object-fit: contain; }
.order-product-name { flex: 1; min-width: 0; }
.order-product-name small { display: block; color: #647188; margin-top: 5px; font-size: .85rem; }
.order-totals { margin: 0; }
.order-totals > div { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; }
.order-totals dt { font-weight: 400; }
.order-totals dd { margin-bottom: 0; white-space: nowrap; }
.order-totals .grand-total { border-top: 1px solid #d5e1f0; padding-top: 14px; margin-top: 8px; font-size: 1.2rem; }
.order-totals .grand-total > * { font-weight: 750; }
.order-delivery-title { display: flex; align-items: center; gap: 14px; font-size: 1.15rem; margin-bottom: 20px; }
.order-pickup-note { background: #edf5ff; border-radius: 9px; margin-top: 18px; padding: 12px; font-size: .9rem; }
.order-payment { padding-top: 20px; margin-top: 22px; border-top: 1px solid #d5e1f0; }
.order-bottom-actions { margin-top: 24px; }
.order-timeline { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; margin: 0; padding: 0; }
.order-timeline li { position: relative; text-align: center; display: flex; align-items: center; flex-direction: column; gap: 8px; font-size: .95rem; }
.order-timeline li::before { content: ""; position: absolute; left: -50%; right: 50%; top: 27px; height: 3px; background: #dce3ed; }
.order-timeline li:first-child::before { display: none; }
.order-timeline li.complete::before { background: #70b78a; }
.timeline-dot { z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #edf0f5; color: #65738a; }
.complete .timeline-dot { color: #fff; background: #2ca15d; }
.order-timeline small { color: #647188; font-size: .77rem; }
.order-cancellation { max-width: 850px; border-color: #efbcc3; }
.receipt-page { max-width: 1050px; }
.receipt-heading { text-align: center; margin-bottom: 25px; }
.receipt-heading p { color: #647188; }
.receipt-paper { padding: 36px; }
.receipt-brand { font-weight: 800; color: var(--socialite-blue); font-size: 1.9rem; }
.receipt-top, .receipt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.receipt-top { padding-bottom: 22px; border-bottom: 1px solid #d5e1f0; }
.receipt-number { text-align: right; }
.receipt-number strong { font-size: 1.5rem; display: block; }
.receipt-meta { padding: 22px 0; font-size: .95rem; }
.receipt-meta p { margin-bottom: 4px; }
.receipt-table th { background: #e7f0fc; font-size: .9rem; }
.receipt-table td { padding-top: 13px; padding-bottom: 13px; }
.receipt-summary { max-width: 390px; margin-left: auto; margin-top: 16px; }
.receipt-note { margin-top: 28px; text-align: center; color: #647188; font-size: .8rem; }
.receipt-thanks { text-align: center; font-weight: 650; }
@media (max-width: 991px) {
    .account-grid { grid-template-columns: 210px minmax(0,1fr); gap: 16px; }
    .account-panel { padding: 22px; }
    .order-product-image { width: 65px; height: 65px; }
}
@media (max-width: 767px) {
    .account-page, .order-page { padding-top: 1.4rem; }
    .account-grid, .order-detail-grid, .order-confirmation-grid { grid-template-columns: minmax(0,1fr); }
    .account-sidebar { padding: 14px; }
    .account-identity { padding-bottom: 12px; }
    .account-sidebar nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
    .account-sidebar nav a { flex-shrink: 0; padding: 9px; font-size: .85rem; }
    .account-sidebar nav a svg { display: none; }
    .account-panel, .order-card { padding: 20px; }
    .address-grid { grid-template-columns: 1fr; }
    .order-timeline li { font-size: .72rem; padding: 0 3px; }
    .order-timeline small { font-size: .63rem; }
    .timeline-dot { width: 42px; height: 42px; }
    .order-timeline li::before { top: 20px; }
    .order-products > li { gap: 10px; font-size: .88rem; }
    .order-product-image { width: 58px; height: 60px; }
    .receipt-paper { padding: 20px; }
    .receipt-top { grid-template-columns: 1fr; gap: 12px; }
    .receipt-number { text-align: left; }
    .receipt-meta { grid-template-columns: 1fr; gap: 12px; }
    .receipt-table { min-width: 530px; }
    .order-confirmation-actions > .btn { min-width: 0; }
}
.account-panel .btn, .order-page .btn { border-radius: 999px; }
.address-card, .order-product-name, .history-card li { overflow-wrap: anywhere; }
.account-orders-table { position: relative; max-width: 100%; }
.account-order-mobile { border: 1px solid #d5e1f0; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.account-order-mobile header, .account-order-mobile footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.account-order-mobile p { color: #647188; font-size: .85rem; margin: 10px 0 15px; }

/* Long user content stays inside its card; full text remains in the title. */
.text-ellipsis { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; min-width:0; }
.checkout-grid > *, .order-card, .order-tracking .alert { min-width:0; }
.address-selector { position:relative; width:100%; min-width:0; }
.address-selected { display:block; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; padding-right:2.5rem; }
.address-options { position:absolute; top:100%; left:0; right:0; z-index:20; width:100%; min-width:0; max-height:240px; overflow-y:auto; overflow-x:hidden; background:white; border:1px solid #cbdaf0; border-radius:10px; box-shadow:0 12px 24px #15294b20; padding:5px; }
.address-options button { display:block; border:0; background:white; text-align:left; width:100%; min-width:0; padding:10px 12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-radius:6px; color:inherit; }
.address-options button:hover, .address-options button:focus-visible, .address-options button[aria-selected=true] { background:#eaf2fc; outline:2px solid #0055f5; outline-offset:-2px; }
.wallet-demo { text-align:center; margin-top:20px; padding:20px; background:#f8faff; border:1px solid #d5e2f4; border-radius:12px; }
.wallet-demo svg { display:block; width:190px; height:190px; max-width:100%; margin:12px auto; background:white; }
.wallet-demo p { margin:8px 0; }

/* The delivery/payment card determines the desktop row height. Only products scroll. */
.order-detail-grid > .order-products-card { contain:size; display:flex; flex-direction:column; min-height:0; }
.order-products-card > h2, .order-products-card > .order-totals { flex:0 0 auto; }
.order-detail-grid > .order-products-card > .order-products { flex:1 1 0; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; overscroll-behavior-y:contain; padding-right:8px; }
.order-products:focus-visible { outline:2px solid #0055f5; outline-offset:3px; border-radius:6px; }
@media(max-width:767px) {
    .order-detail-grid > .order-products-card { contain:none; }
    .order-detail-grid > .order-products-card > .order-products { flex:0 1 auto; max-height:340px; }
}

.order-products-card .order-products::-webkit-scrollbar { width:9px; }
.order-products-card .order-products::-webkit-scrollbar-track { background:#edf2fa; border-radius:8px; }
.order-products-card .order-products::-webkit-scrollbar-thumb { background:#9aafcb; border:2px solid #edf2fa; border-radius:8px; }
.order-products-card .order-products::-webkit-scrollbar-thumb:hover { background:#6784aa; }

.carrito-flotante {
    position: fixed;
    inset-inline-start: 1rem;
    inset-block-end: max(1rem, env(safe-area-inset-bottom));
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: calc(100vw - 2rem);
    box-shadow: 0 .25rem .9rem #1d2a3a36;
}

body:has(.carrito-flotante) .aviso-carrito { bottom: 4.5rem; }
body:has(.socialite-modal-backdrop) { overflow: hidden; }

.socialite-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1070;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 27, 48, .55);
}

.socialite-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100dvh - 2rem);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 27, 48, .28);
}

.socialite-modal-sm { max-width: 460px; }
.socialite-modal-lg { max-width: 780px; }
.socialite-modal-header, .socialite-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #e2eaf5;
}
.socialite-modal-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.socialite-modal-body { padding: 1.25rem 1.5rem; overflow-y: auto; }
.socialite-modal-footer { flex-wrap: wrap; justify-content: flex-end; border-bottom: 0; border-top: 1px solid #e2eaf5; }
.socialite-modal-centinela { position: absolute; width: 1px; height: 1px; overflow: hidden; }

.admin-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.admin-row-actions .btn { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.admin-estado { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.admin-estado-activo { background: #e3f6ea; color: #17653a; }
.admin-estado-inactivo { background: #f1f3f6; color: #5b6576; }

@media (max-width: 575px) {
    .socialite-modal-backdrop { align-items: flex-end; padding: .5rem; }
    .socialite-modal-header, .socialite-modal-body, .socialite-modal-footer { padding-inline: 1rem; }
    .socialite-modal-footer > .btn { flex: 1 1 auto; }
}
