:root {
    --loy-green: #4caf50;
    --loy-green-dark: #43a047;
    --loy-bg: #f5f5f5;
    --loy-text: #212121;
    --loy-muted: #757575;
    --loy-border: #e0e0e0;
    --loy-card: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--loy-bg);
    color: var(--loy-text);
}

.storefront-navigation-shell {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--loy-bg);
}

.storefront-navigation-shell > .topbar,
.storefront-navigation-shell > .catalog-toolbar,
.storefront-navigation-shell > .topbar-search-panel {
    position: relative;
    top: auto;
}

/* ===========================
   BARRA SUPERIOR
=========================== */

.topbar {
    height: 56px;
    background: var(--loy-green);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.topbar-menu {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-menu .material-symbols-outlined {
    font-size: 27px;
}

.topbar-category {
    flex: 1;
    min-width: 0;
    position: relative;
}

.topbar-category-button {
    max-width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

#topbarCategoryTitle {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topbar-category-arrow {
    flex-shrink: 0;
    font-size: 21px;
    transition: transform .2s ease;
}

.topbar-category-button[aria-expanded="true"]
.topbar-category-arrow {
    transform: rotate(180deg);
}

.topbar-category-list {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    width: 300px;
    max-width: calc(100vw - 28px);
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .22);
    z-index: 1200;
}

.topbar-category-list.active {
    display: block;
}

.topbar-category-option {
    width: 100%;
    min-height: 42px;
    display: block;
    padding: 9px 12px;
    border: 0;
    border-radius: 7px;
    background: #fff;
    color: var(--loy-text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.topbar-category-option:hover,
.topbar-category-option.selected {
    background: #edf7ee;
    color: var(--loy-green-dark);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.topbar-icon-button,
.topbar-cart {
    width: 46px;
    height: 46px;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}

.topbar-icon-button:hover,
.topbar-cart:hover {
    background: rgba(255, 255, 255, .15);
}

.topbar-icon-button .material-symbols-outlined,
.topbar-cart .material-symbols-outlined {
    font-size: 29px;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid var(--loy-green);
    border-radius: 999px;
    background: #f44336;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform .2s ease;
}

.cart-badge.show {
    transform: scale(1);
}

/* ===========================
   BUSCADOR SUPERIOR
=========================== */

.topbar-search-panel {
    display: none;
    position: sticky;
    top: 56px;
    z-index: 950;
    padding: 9px 14px;
    background: #fff;
    border-bottom: 1px solid var(--loy-border);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .10);
}

.topbar-search-panel.active {
    display: block;
}

.topbar-search-box {
    width: 100%;
    max-width: 900px;
    height: 46px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    border: 1px solid #cfcfcf;
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
}

.topbar-search-icon {
    margin-left: 13px;
    color: var(--loy-muted);
    font-size: 24px;
}

.topbar-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--loy-text);
    font-size: 16px;
}

.topbar-search-close {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--loy-muted);
    cursor: pointer;
}

.topbar-search-close:hover {
    background: #f1f1f1;
}

/* ===========================
   LAYOUT
=========================== */

.store-layout {
    max-width: 1600px;
    margin: 8px auto;
    padding: 0 12px 20px;
}

.store-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.catalog {
    min-width: 0;
}

.catalog-no-results {
    display: none;
    margin-bottom: 12px;
    padding: 18px;
    border-radius: 7px;
    background: #fff;
    color: var(--loy-muted);
    text-align: center;
}

/* ===========================
   PRODUCTOS
=========================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(170px, 1fr)
    );
    gap: 12px;
}

.product-card {
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    cursor: pointer;
    transition:
        transform .16s ease,
        box-shadow .16s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .14);
}

.product-image {
    height: 170px;
    position: relative;
    background: #f3f3f3;
}

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

.product-no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--loy-green);
}

.product-no-image .material-symbols-outlined {
    font-size: 72px;
}

.product-name-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px;
    background: rgba(0, 0, 0, .48);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.product-info {
    padding: 10px;
}

.product-price {
    margin-bottom: 8px;
    color: var(--loy-green);
    font-size: 16px;
    font-weight: 700;
}

.buy-button {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: var(--loy-green);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .12s ease;
}

.buy-button:hover {
    background: var(--loy-green-dark);
}

.booking-button {
    text-decoration: none;
}

.buy-button:active {
    transform: scale(.96);
}

.buy-button .material-symbols-outlined {
    font-size: 22px;
}

/* ===========================
   CARRITO
=========================== */

.shopping-cart {
    height: calc(100vh - 126px);
    height: calc(100dvh - 126px);
    position: sticky;
    top: 118px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.shopping-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--loy-border);
    font-size: 22px;
    font-weight: 600;
}

.shopping-cart-clear {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--loy-muted);
    cursor: pointer;
}

.shopping-cart-clear:hover {
    background: #eee;
}

.shopping-cart-clear .material-symbols-outlined {
    font-size: 22px;
}

.shopping-cart-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.shopping-cart-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--loy-muted);
    text-align: center;
}

.shopping-cart-empty .material-symbols-outlined {
    margin-bottom: 12px;
    color: var(--loy-green);
    font-size: 60px;
}

.shopping-cart-items {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
}

.cart-item-name {
    overflow: hidden;
    color: var(--loy-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.cart-item-price {
    margin-left: 12px;
    color: var(--loy-green);
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.cart-quantity-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 2px;
}

.cart-quantity-control {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fafafa;
}

.cart-plus,
.cart-minus {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
}

.cart-plus:hover,
.cart-minus:hover {
    background: #f2f2f2;
}

.cart-plus .material-symbols-outlined,
.cart-minus .material-symbols-outlined {
    font-size: 13px;
}

.cart-item-quantity {
    width: 22px;
    color: #444;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.cart-remove {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    padding: 0;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #9e9e9e;
    cursor: pointer;
}

.cart-remove:hover {
    background: #f5f5f5;
    color: #d32f2f;
}

.cart-remove .material-symbols-outlined {
    font-size: 16px;
}

.shopping-cart-footer {
    flex-shrink: 0;
    padding: 18px;
    padding-bottom: calc(
        18px + env(safe-area-inset-bottom)
    );
    border-top: 1px solid var(--loy-border);
    background: #fff;
}

.checkout-button {
    width: 100%;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 4px;
    background: var(--loy-green);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease;
}

.checkout-button:hover {
    background: var(--loy-green-dark);
    color: #fff;
    text-decoration: none;
}

.checkout-title {
    font-size: 22px;
    font-weight: 700;
}

.checkout-total {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

/* ===========================
   CHECKOUT
=========================== */

.checkout-layout {
    width: 100%;
    max-width: 840px;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin: 24px auto 0;
}

.checkout-media-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
    gap: 24px;
    align-items: start;
}

.checkout-media-context {
    position: sticky;
    top: 72px;
    margin-top: 24px;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.checkout-media-player {
    display: grid;
    min-height: 240px;
    place-items: center;
    aspect-ratio: 16 / 9;
    color: #fff;
}

.checkout-media-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.checkout-media-player a {
    color: #fff;
    font-weight: 700;
}

.checkout-media-caption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
}

.checkout-media-caption a {
    color: var(--loy-green-dark);
    white-space: nowrap;
}

.checkout-media-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 0 16px 16px;
    background: #fff;
}

.checkout-media-product .product-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    min-width: 0;
    box-shadow: none;
}

.checkout-media-product .product-image {
    height: 76px;
}

.checkout-media-product .product-name-overlay {
    display: none;
}

.checkout-media-product .product-info {
    min-width: 0;
    padding: 10px 12px;
}

.checkout-media-product .product-info::before {
    display: block;
    overflow: hidden;
    margin-bottom: 4px;
    color: #1f2937;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    content: attr(data-product-name);
}

.checkout-media-product .buy-button {
    display: none;
}

.checkout-media-product-quantity {
    display: grid;
    gap: 3px;
    min-width: 64px;
    color: #4b5563;
    text-align: center;
}

.checkout-media-product-quantity strong {
    color: #111827;
    font-size: 18px;
}

.checkout-layout-media {
    grid-template-columns: 1fr;
    max-width: none;
    margin-top: 24px;
}

.checkout-layout-media .checkout-summary {
    position: relative;
    top: auto;
}

.checkout-card {
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .10);
}

.checkout-form {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-payment-panel,
.checkout-payment-panel .checkout-card {
    min-width: 0;
}

.checkout-body {
    padding: 24px;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.checkout-field label {
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
    font-weight: 600;
}

.checkout-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    outline: none;
    font-size: 15px;
}

.checkout-input:focus {
    border-color: var(--loy-green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, .15);
}

.checkout-summary {
    position: relative;
    top: auto;
}

.checkout-payment-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 10px;
    color: #303a32;
}

.checkout-payment-total span {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.checkout-payment-total strong {
    color: #111827;
    font-size: clamp(24px, 5vw, 30px);
    line-height: 1;
}

.checkout-primary-action {
    padding: 0 20px;
}

.checkout-payment-selection {
    margin-top: 14px;
    padding: 16px 20px 2px;
    border-top: 1px solid #e4e9e5;
}

.checkout-pay-button {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    background: #19b84b;
    color: #fff;
    box-shadow: 0 6px 18px rgba(18, 111, 50, .25);
    cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

.checkout-pay-button:hover {
    background: #12a541;
    box-shadow: 0 8px 22px rgba(18, 111, 50, .3);
}

.checkout-pay-button:active {
    transform: scale(.99);
}

.checkout-pay-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.checkout-payment-methods {
    min-width: 0;
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.checkout-payment-methods legend {
    margin-bottom: 8px;
    color: #303a32;
    font-size: 15px;
    font-weight: 700;
}

.checkout-payment-option {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid #d7ddd8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.checkout-payment-option > span {
    min-width: 0;
}

.checkout-payment-option:has(input:checked) {
    border-color: #19a947;
    background: #f0fbf3;
    box-shadow: 0 0 0 2px rgba(25, 169, 71, .12);
}

.checkout-payment-option input {
    margin-top: 3px;
    accent-color: #19a947;
}

.checkout-payment-option strong,
.checkout-payment-option small {
    display: block;
}

.checkout-payment-option small {
    margin-top: 3px;
    color: #647067;
    line-height: 1.35;
}

.checkout-bank-transfer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid #b9dfc3;
    border-radius: 8px;
    background: #f4fbf6;
}

.checkout-bank-transfer-step {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 640px;
    display: grid;
    gap: 16px;
    margin: 0 auto;
}

.checkout-bank-transfer-step[hidden] {
    display: none;
}

.checkout-bank-transfer-step h2 {
    margin: 0 0 16px;
    color: #1f2937;
    font-size: 22px;
}

.checkout-bank-transfer-notes {
    grid-column: 1 / -1;
}

.checkout-proof-field {
    display: grid;
    gap: 8px;
}

.checkout-proof-field label {
    color: #303a32;
    font-weight: 700;
}

.checkout-proof-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #c8d2ca;
    border-radius: 6px;
    background: #fff;
}

.checkout-proof-field span,
.checkout-proof-field small {
    overflow-wrap: anywhere;
    color: #647067;
    font-size: 13px;
}

.checkout-bank-transfer[hidden] {
    display: none;
}

#mercadoPagoCardForm .checkout-field {
    margin-bottom: 0;
}

#mercadoPagoCardForm .checkout-field label {
    margin-bottom: 6px;
}

#mercadoPagoCardForm input:not([type="hidden"]),
#mercadoPagoCardForm select,
#mercadoPagoCardForm .form-control {
    width: 100%;
    height: 44px;
    min-height: 44px;
}

#mercadoPagoCardForm input:not([type="hidden"]),
#mercadoPagoCardForm select {
    padding: 0 10px;
}

#mercadoPagoCardForm .form-control {
    overflow: hidden;
}

#mercadoPagoCardForm .form-control iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.checkout-bank-transfer h3,
.checkout-bank-transfer > label,
.checkout-bank-transfer > input,
.checkout-bank-transfer > small,
.checkout-bank-transfer > .checkout-field-error {
    grid-column: 1 / -1;
}

.checkout-bank-transfer h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.checkout-bank-transfer div span,
.checkout-bank-transfer div strong {
    display: block;
}

.checkout-bank-transfer div span {
    color: #647067;
    font-size: 12px;
}

.checkout-bank-transfer > label {
    margin-top: 8px;
    font-weight: 700;
}

.checkout-bank-transfer > input {
    width: 100%;
    padding: 10px;
    border: 1px solid #c8d2ca;
    border-radius: 6px;
    background: #fff;
}

@media (max-width: 480px) {
    .checkout-bank-transfer {
        grid-template-columns: 1fr;
    }

    .checkout-bank-transfer > * {
        grid-column: 1;
    }

    .checkout-pay-label {
        gap: 5px;
        font-size: 16px;
    }
}

.checkout-field-error,
.checkout-payment-unavailable {
    margin: 4px 0 0;
    color: #b42318;
    font-size: 13px;
}

.checkout-pay-button:focus-visible,
.checkout-summary-toggle:focus-visible {
    outline: 3px solid #126f32;
    outline-offset: 3px;
}

.checkout-pay-button > .material-symbols-outlined {
    font-size: 25px;
}

.checkout-pay-label {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    font-size: clamp(17px, 4.5vw, 22px);
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
}

.checkout-security-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 10px 8px 0;
    color: #58615a;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.checkout-security-message .material-symbols-outlined {
    flex: 0 0 auto;
    color: #27823d;
    font-size: 19px;
}

.checkout-summary-toggle {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border: 0;
    border-bottom: 1px solid var(--loy-border);
    background: #fff;
    color: #263329;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.checkout-summary-toggle .material-symbols-outlined {
    transition: transform .2s ease;
}

.checkout-summary-toggle-copy strong,
.checkout-summary-toggle-copy small {
    display: block;
}

.checkout-summary-toggle-copy small {
    margin-top: 3px;
    color: #647067;
    font-size: 12px;
    font-weight: 600;
}

.checkout-summary-toggle[aria-expanded="false"] .material-symbols-outlined {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .checkout-pay-button,
    .checkout-summary-toggle .material-symbols-outlined {
        transition: none;
    }
}

.checkout-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}

.checkout-item:last-child {
    border-bottom: 0;
}

.checkout-item-name {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.checkout-item-name span {
    margin-left: 4px;
    color: #777;
    font-weight: 600;
}

.checkout-item-price {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* ===========================
   ESTADOS Y ANIMACIONES
=========================== */

.empty {
    padding: 30px;
    background: #fff;
}

.shopping-cart.bump {
    animation: cart-bump .28s ease;
}

@keyframes cart-bump {

    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

/* ===========================
   CARRITO MÓVIL
=========================== */

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1990;
    visibility: hidden;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.cart-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* ===========================
   COMPRA RÁPIDA MÓVIL
=========================== */

.mobile-purchase-actions {
    display: none;
}

@keyframes mobile-purchase-update {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.035); }
}

.product-to-ticket {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    position: fixed;
    z-index: 1500;
    border: 2px solid #fff;
    border-radius: 12px;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    color: #19a944;
    font-size: 28px;
    box-shadow: 0 8px 22px rgba(18, 89, 42, .28);
    pointer-events: none;
    will-change: transform, opacity;
}

@media (max-width: 1100px) {

    .mobile-purchase-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        margin: 7px 10px 5px;
        padding: 0;
        background-color: #71c55b;
        border-radius: 4px;
        box-shadow: 0 5px 16px rgba(24, 102, 48, .22);
        overflow: hidden;
    }

    .mobile-purchase-action--ticket.is-updated {
        animation: mobile-purchase-update .28s ease;
    }

    .mobile-purchase-action {
        min-width: 0;
        min-height: 62px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 10px;
        border: 0;
        border-radius: 0;
        background-color: #71c55b;
        color: #fff;
        font: inherit;
        text-align: left;
        text-decoration: none;
        box-shadow: none;
        cursor: pointer;
        transition: background .2s ease, opacity .2s ease, transform .15s ease;
    }

    .mobile-purchase-action:hover,
    .mobile-purchase-action:focus {
        background-color: #71c55b;
        color: #fff;
        text-decoration: none;
    }

    .mobile-purchase-action:active {
        transform: scale(.985);
    }

    .mobile-purchase-action.is-disabled {
        background-color: #71c55b;
        cursor: default;
        opacity: .62;
    }

    .mobile-purchase-action--ticket {
        border-radius: 3px 0 0 3px;
    }

    .mobile-purchase-action--buy {
        border-left: 1px solid rgba(33, 33, 33, .18);
        border-radius: 0 3px 3px 0;
    }

    .mobile-purchase-action .material-symbols-outlined {
        flex: 0 0 auto;
        font-size: 22px;
    }

    .mobile-purchase-action-meta {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .mobile-purchase-action strong,
    .mobile-purchase-action small {
        display: block;
    }

    .mobile-purchase-action strong {
        font-size: 16px;
        letter-spacing: .035em;
        text-transform: uppercase;
    }

    .mobile-purchase-action small {
        overflow: hidden;
        margin-top: 2px;
        color: rgba(255, 255, 255, .92);
        font-size: 13px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-purchase-action:focus-visible {
        outline: 3px solid #fff;
        outline-offset: -4px;
        box-shadow: inset 0 0 0 1px #126f32;
    }

}

@media (max-width: 480px) {
    .checkout-pay-button {
        gap: 8px;
        padding-inline: 14px;
    }

    .checkout-pay-label {
        display: grid;
        gap: 2px;
        font-size: 16px;
        white-space: normal;
    }

    .checkout-pay-label > * {
        display: block;
    }
}

@media (max-width: 360px) {
    .mobile-purchase-action {
        gap: 5px;
        padding-inline: 7px;
    }

    .mobile-purchase-action .material-symbols-outlined {
        font-size: 23px;
    }

    .mobile-purchase-action strong { font-size: 14px; }
    .mobile-purchase-action small { font-size: 11px; }
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 1100px) {

    .store-content {
        grid-template-columns: 1fr;
    }

    .shopping-cart {
        width: min(420px, 100%);
        height: 100dvh;
        padding-bottom: env(safe-area-inset-bottom);
        position: fixed;
        top: 0;
        right: -100%;
        z-index: 2000;
        border-radius: 0;
        transition: right .25s ease;
    }

    .shopping-cart.active {
        right: 0;
    }
}

@media (max-width: 900px) {

    .checkout-media-page {
        display: block;
    }

    .checkout-media-context {
        top: 0;
        z-index: 20;
        margin-top: 12px;
        border-radius: 6px;
    }

    .checkout-media-player {
        min-height: 0;
        max-height: 42vh;
    }

    .checkout-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .checkout-form {
        gap: 12px;
    }

    .checkout-summary {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {

    .topbar {
        padding: 0 7px;
    }

    .topbar-menu {
        width: 38px;
    }

    .topbar-category-button {
        font-size: 16px;
    }

    .topbar-icon-button,
    .topbar-cart {
        width: 42px;
        height: 42px;
    }

    .topbar-actions {
        gap: 0;
    }

    .topbar-category-list {
        left: 0;
        right: auto;
        width: min(310px, calc(100vw - 16px));
        max-height: min(360px, calc(100dvh - 182px));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .topbar-category-option {
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .store-layout {
        margin-top: 8px;
        padding: 0 8px 16px;
    }

    .checkout-layout {
        gap: 12px;
        margin-top: 10px;
    }

    .checkout-body {
        padding: 18px;
    }

    .checkout-field {
        margin-bottom: 14px;
    }

    .checkout-field:last-child {
        margin-bottom: 0;
    }

    .checkout-payment-total {
        padding: 15px 16px 9px;
    }

    .checkout-primary-action {
        padding: 0 16px;
    }

    .checkout-payment-selection {
        margin-top: 11px;
        padding: 14px 16px 1px;
    }

    .checkout-security-message {
        margin-top: 7px;
        font-size: 12px;
    }

    .products-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
        gap: 8px;
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 8px;
    }

    .buy-button {
        height: 42px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .checkout-pay-button {
        gap: 6px;
        padding-inline: 10px;
    }

    .checkout-pay-label {
        font-size: 15px;
    }
}

/* ===========================
   IDENTIDAD DEL COMERCIO
=========================== */

.topbar {
    height: 62px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 164px;
    grid-template-areas: "menu store platform";
    column-gap: 10px;
    background: #fff;
    color: var(--loy-text);
    border-bottom: 1px solid var(--loy-border);
    box-shadow: 0 2px 12px rgba(25, 35, 28, .08);
}

.topbar-menu {
    grid-area: menu;
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--loy-text);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.topbar-menu:hover {
    background: #f0f6f1;
}

.topbar-menu-label {
    font-size: 14px;
}

.topbar-store {
    grid-area: store;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.topbar-store-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #edf7ee;
    color: var(--loy-green-dark);
}

.topbar-store-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.topbar-store-mark .material-symbols-outlined {
    font-size: 30px;
}

.topbar-store-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.08;
    overflow: hidden;
}

.topbar-store-copy strong {
    min-width: 0;
    overflow: hidden;
    color: #172019;
    font-size: clamp(16px, 2vw, 21px);
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-store-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.1;
    white-space: nowrap;
}

.topbar-store-heading strong {
    flex: 1 1 auto;
}

.topbar-store-copy small {
    color: var(--loy-muted);
    font-size: 11px;
    letter-spacing: .02em;
}

.topbar-store-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    white-space: nowrap;
}

.topbar-store-status,
.topbar-live-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #69726b;
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

.topbar-store-status i,
.topbar-live-badge i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #9ca39e;
}

.topbar-store-status--open {
    color: #277d34;
}

.topbar-store-status--open i {
    background: #35a849;
}

.topbar-store-status--closed {
    color: #a83a35;
}

.topbar-store-status--closed i,
.topbar-live-badge i {
    background: #e0483e;
}

.topbar-live-badge {
    color: #bd3029;
    font-weight: 800;
    letter-spacing: .04em;
}

.topbar-live-badge[hidden] {
    display: none;
}

.topbar-platform {
    grid-area: platform;
    width: 156px;
    height: 44px;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #28322b;
    opacity: .68;
    text-decoration: none;
    transition: opacity .2s ease;
}

.topbar-platform-lockup {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.topbar-platform:hover {
    opacity: .85;
}

.topbar-platform img {
    width: 28px;
    height: 38px;
    flex: 0 0 28px;
    object-fit: contain;
    filter: brightness(0) saturate(100%);
}

.topbar-platform span {
    font-size: 15px;
    font-weight: 750;
    letter-spacing: .055em;
    line-height: 1;
    white-space: nowrap;
}

.topbar-platform-lockup > span {
    transform: translateY(2px);
}

.catalog-toolbar {
    min-height: 48px;
    padding: 2px 14px;
    position: sticky;
    top: 62px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--loy-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.catalog-toolbar .topbar-category-button,
.catalog-toolbar .topbar-icon-button {
    color: var(--loy-text);
}

.catalog-toolbar .topbar-category {
    flex: 1;
}

.catalog-toolbar .topbar-category-list {
    top: 44px;
}

.topbar-search-panel {
    top: 110px;
}

/* ===========================
   DRAWER DEL COMERCIO
=========================== */

.store-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1990;
    background: rgba(15, 23, 18, .46);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.store-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.store-drawer {
    width: min(420px, 92vw);
    height: 100dvh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 12px 0 36px rgba(10, 20, 13, .18);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .28s;
}

.store-drawer.active {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
}

.store-drawer-header {
    padding: 20px 18px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--loy-border);
}

.store-drawer-identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.store-drawer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 10px;
    background: #f2f6f3;
    color: #147a47;
}

.store-drawer-logo img {
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
}

.store-drawer-logo [hidden] {
    display: none !important;
}

.store-hours {
    margin: 4px 0 0;
}

.store-hours div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 0;
}

.store-hours dt,
.store-hours dd {
    margin: 0;
    font-size: .88rem;
}

.store-hours dt {
    font-weight: 600;
}

.store-drawer-eyebrow {
    color: var(--loy-green-dark);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.store-drawer-header h2 {
    margin: 5px 0 0;
    color: #172019;
    font-size: 24px;
    line-height: 1.15;
}

.store-drawer-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f2f5f3;
    color: var(--loy-text);
    cursor: pointer;
}

.store-drawer-body {
    flex: 1;
    min-height: 0;
    padding: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.store-drawer-front {
    width: 100%;
    max-height: 230px;
    display: block;
    object-fit: cover;
    border-radius: 14px;
}

.store-drawer-description {
    margin: 16px 0 20px;
    color: #47534a;
    font-size: 15px;
    line-height: 1.6;
}

.store-drawer-section {
    padding: 18px 0;
    border-top: 1px solid #edf0ee;
}

.store-drawer-section h3 {
    margin: 0 0 8px;
    color: #263129;
    font-size: 15px;
}

.store-drawer-section p {
    margin: 0;
    color: #5d675f;
    font-size: 14px;
    line-height: 1.5;
}

.store-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.store-gallery img {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
    border-radius: 9px;
}

.store-detail {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
}

.store-detail > .material-symbols-outlined {
    color: var(--loy-green-dark);
    font-size: 24px;
}

.store-status {
    margin-bottom: 7px;
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f5e9;
    color: #287b32;
    font-size: 12px;
    font-weight: 700;
}

.store-action {
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.store-detail .store-action {
    width: fit-content;
    min-height: 38px;
    margin-top: 9px;
    padding: 8px 13px;
}

.store-action-primary {
    background: var(--loy-green-dark);
    color: #fff;
}

.store-action-whatsapp {
    background: #e7f8ed;
    color: #167a3c;
}

.store-action-secondary {
    border-color: #cfd8d1;
    color: #35423a;
}

.store-drawer-empty {
    padding: 28px 10px;
    color: var(--loy-muted);
    line-height: 1.5;
    text-align: center;
}

.store-drawer-footer {
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--loy-border);
    text-align: center;
}

.store-drawer-footer a {
    color: var(--loy-muted);
    font-size: 12px;
    text-decoration: none;
}

body.store-drawer-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .topbar {
        height: 50px;
        padding: 2px 9px;
        grid-template-columns: 38px minmax(0, 1fr) 112px;
        grid-template-areas: "menu store platform";
        column-gap: 5px;
    }

    .topbar-menu {
        width: 38px;
        height: 38px;
    }

    .topbar-store {
        width: 100%;
        justify-content: flex-start;
        gap: 5px;
    }

    .topbar-store-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 8px;
    }

    .topbar-store-copy strong {
        font-size: clamp(15px, 4.8vw, 18px);
    }

    .topbar-store-copy small {
        font-size: 10px;
        line-height: 1;
    }

    .topbar-store-meta {
        gap: 6px;
        margin-top: 1px;
    }

    .topbar-store-heading {
        gap: 6px;
    }

    .topbar-store-status,
    .topbar-live-badge {
        font-size: 9px;
    }

    .topbar-platform {
        width: 108px;
        height: 36px;
        align-self: center;
        justify-self: end;
    }

    .topbar-platform-lockup {
        gap: 5px;
    }

    .topbar-platform img {
        width: 22px;
        height: 29px;
        flex-basis: 22px;
    }

    .topbar-platform span {
        font-size: 11px;
        letter-spacing: .035em;
    }

    .catalog-toolbar {
        top: 50px;
        min-height: 46px;
        padding: 2px 8px;
    }

    .catalog-toolbar .topbar-category-button {
        padding-left: 5px;
        font-size: 15px;
    }

    .catalog-toolbar .topbar-icon-button,
    .catalog-toolbar .topbar-cart {
        width: 39px;
        height: 42px;
    }

    .catalog-toolbar .topbar-actions {
        gap: 0;
    }

    .topbar-search-panel { top: auto; }
}

@media (min-width: 641px) and (max-width: 900px) {
    .topbar {
        padding-inline: 14px;
        grid-template-columns: 44px minmax(0, 1fr) 140px;
    }

    .topbar-store {
        justify-content: flex-start;
    }

    .topbar-platform {
        width: 132px;
    }

    .topbar-platform img {
        width: 25px;
        height: 34px;
        flex-basis: 25px;
    }

    .topbar-platform span {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-drawer,
    .store-drawer-overlay {
        transition: none;
    }
}
