.shop-page {
    min-height: 100vh;
    color: var(--demader-text);
    background: var(--demader-background);
}

.shop-page .header {
    position: static;
    background: var(--demader-surface);
    border-bottom: 1px solid var(--demader-border);
}

.shop-page .header__container {
    display: flex;
    width: min(1120px, calc(100% - 2rem));
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto;
    padding: .8rem 0;
}

.shop-page .header__container nav {
    margin-left: auto;
}

.shop-nav-link,
.shop-back-link {
    color: var(--demader-action-secondary);
    font-weight: 700;
    text-decoration: none;
}

.shop-nav-link:hover,
.shop-back-link:hover {
    text-decoration: underline;
}

.header__shop-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 42px;
    padding: .55rem .85rem;
    border: 1px solid rgba(84, 47, 32, .24);
    border-radius: 999px;
    color: var(--demader-action-secondary);
    background: var(--demader-surface);
    font-size: .8rem;
    font-weight: 750;
    text-decoration: none;
}

.header__shop-count {
    display: inline-grid;
    min-width: 1.5rem;
    height: 1.5rem;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--demader-action);
    font-size: .72rem;
}

.shop-shell,
.checkout-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 3.5rem auto;
}

.shop-eyebrow {
    margin: 0 0 .45rem;
    color: var(--demader-action);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.shop-shell h1,
.checkout-shell h1,
.payment-result h1 {
    margin: 0;
    color: var(--demader-dark);
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.1;
}

.shop-intro {
    max-width: 690px;
    margin: 1rem 0 2rem;
    color: var(--demader-text-secondary);
    line-height: 1.65;
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    align-items: start;
    gap: 2rem;
}

.shop-items {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-item {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--demader-border);
    border-radius: 14px;
    background: var(--demader-surface);
}

.shop-item--without-image {
    grid-template-columns: minmax(0, 1fr) auto;
}

.shop-item > img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--demader-surface-raised);
}

.shop-item__details h2 {
    margin: 0 0 .4rem;
    font-size: 1.1rem;
}

.shop-item__details p,
.shop-item__details small {
    display: block;
    margin: .2rem 0;
    color: var(--demader-text-secondary);
}

.shop-item__unavailable {
    color: var(--demader-error) !important;
}

.shop-item__actions {
    display: grid;
    justify-items: end;
    gap: .7rem;
}

.shop-quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--demader-border);
    border-radius: 8px;
    overflow: hidden;
}

.shop-quantity__button,
.shop-quantity__value {
    min-width: 36px;
    min-height: 36px;
    border: 0;
    color: var(--demader-dark);
    background: var(--demader-surface);
    font: inherit;
}

.shop-quantity__button {
    cursor: pointer;
}

.shop-quantity__value {
    font-weight: 700;
}

.shop-summary {
    position: sticky;
    top: 1.5rem;
    padding: 1.35rem;
    border: 1px solid var(--demader-border);
    border-radius: 16px;
    background: var(--demader-surface);
    box-shadow: 0 12px 35px rgba(36, 28, 24, .06);
}

.shop-summary h2 {
    margin: 0 0 1.2rem;
}

.shop-summary > p {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: .8rem 0;
}

.shop-summary__total {
    padding-top: .9rem;
    border-top: 1px solid var(--demader-border);
    font-size: 1.08rem;
}

.shop-summary__note {
    display: block !important;
    color: var(--demader-text-secondary);
    font-size: .82rem;
    line-height: 1.5;
}

.shop-button {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: .75rem 1rem;
    border: 0;
    border-radius: 8px;
    color: white;
    background: var(--demader-action-secondary);
    font: inherit;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.shop-button:hover:not(:disabled) {
    background: var(--demader-action-secondary-hover);
}

.shop-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.shop-button--secondary {
    width: auto;
    padding-inline: 1.25rem;
}

.shop-back-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
}

.shop-message {
    min-height: 1.4rem;
    margin: 0 0 1rem;
    color: var(--demader-info);
    font-weight: 650;
}

.shop-message--notice {
    min-height: 0;
    padding: .75rem 1rem;
    border: 1px solid var(--demader-border);
    border-left: 4px solid var(--demader-action);
    border-radius: 10px;
    color: var(--demader-dark);
    background: var(--demader-surface);
}

.shop-empty {
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--demader-border-strong);
    border-radius: 14px;
    background: var(--demader-surface);
    text-align: center;
}

.shop-empty p {
    color: var(--demader-text-secondary);
}

.shop-toast {
    position: fixed;
    z-index: 1000;
    right: 1rem;
    bottom: 1rem;
    max-width: min(360px, calc(100% - 2rem));
    padding: .9rem 1.1rem;
    border-radius: 10px;
    color: white;
    background: var(--demader-dark);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease;
}

.shop-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.shop-toast__link {
    color: white;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: .15em;
}

.producto-card__purchase {
    display: grid;
    gap: .45rem;
    margin: .7rem 0 0;
    padding: .9rem;
    border: 1px solid var(--demader-border);
    border-radius: 12px;
    background: var(--demader-surface);
}

.producto-card__price {
    margin: 0;
    color: var(--page-ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.producto-card__buy {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1rem;
    border: 0;
    border-radius: 8px;
    color: white;
    background: var(--demader-action-secondary);
    font: 750 .82rem/1.2 var(--page-sans);
    cursor: pointer;
}

.producto-card__buy:hover,
.producto-card__buy:focus-visible {
    background: var(--demader-action-secondary-hover);
}

.producto-card__availability,
.producto-card__unavailable {
    margin: 0;
    color: var(--demader-text-secondary);
    font-size: .75rem;
    line-height: 1.5;
}

.producto-card__add-to-cart {
    width: 100%;
    margin: .5rem 0 0;
    color: var(--demader-action-secondary);
    background: transparent;
}

.producto-card__add-to-cart:hover {
    background: var(--demader-surface-raised);
}

@media (max-width: 760px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-summary {
        position: static;
    }
}

@media (max-width: 520px) {
    .shop-shell,
    .checkout-shell {
        width: min(100% - 1.2rem, 1120px);
        margin: 2rem auto;
    }

    .shop-item {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: start;
    }

    .shop-item--without-image {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .shop-item > img {
        width: 72px;
        height: 72px;
    }

    .shop-item__actions {
        grid-column: 2;
        grid-template-columns: 1fr auto;
        justify-items: start;
        align-items: center;
    }
}
