/* Checkout refinements. Keep this file last so existing desktop layouts stay intact. */
.po-service-mobile-price, .po-checkout-mobile-total { display: none; }
.po-checkout-v2 [hidden] { display: none !important; }
.po-payment-page { width: min(100% - 32px, 570px); margin: 34px auto 60px; }
.po-payment-back { display: inline-block; color: #c4b7d4; padding: 12px 0; text-decoration: none; }
.po-payment-card { background: linear-gradient(145deg,#19141e,#101116); border: 1px solid #322838; border-radius: 24px; padding: 30px; box-shadow: 0 20px 80px #0003; }
.po-payment-card h1 { font-size: clamp(24px,5vw,32px); letter-spacing: -.6px; margin: 12px 0; color: #fff; }
.po-payment-card header p, .po-payment-help { color: #ada6b7; font-size: 14px; line-height: 1.7; }
.po-payment-amount { display: grid; gap: 9px; margin: 26px 0; padding: 24px; text-align: center; background: #b241ed0c; border: 1px solid #b241ed30; border-radius: 18px; color: #bdb0ca; }
.po-payment-amount strong { color: #fff; font-size: 42px; line-height: 1.1; letter-spacing: -1.5px; }
.po-payment-amount small { font-size: 12px; }
.po-payment-summary { margin: 0 0 24px; }
.po-payment-summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #ffffff0d; font-size: 13px; }
.po-payment-summary dt { color: #a9a2b0; flex-shrink: 0; }
.po-payment-summary dd { color: #eee5f5; margin: 0; text-align: right; overflow-wrap: anywhere; }
.po-payment-summary code { font-size: 12px; }
.po-payment-status { padding: 16px; border: 1px solid #a87ce144; background: #a87ce10a; border-radius: 12px; margin-bottom: 20px; }
.po-payment-status strong { color: #e5d6f5; font-size: 14px; }
.po-payment-status p { font-size: 13px; color: #c0b6c9; line-height: 1.6; margin: 8px 0 0; }
.po-payment-status.is-success { border-color: #6ee7b744; background: #6ee7b70a; }
.po-payment-status.is-success strong { color: #6ee7b7; }
.po-payment-page .po-payment-primary, .po-payment-page .po-payment-check { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; border-radius: 12px; font-size: 14px; margin-top: 10px; white-space: normal; }
.po-payment-page [hidden] { display: none !important; }
.po-payment-help { font-size: 12px; margin-top: 22px; }
.po-payment-time { color: #8d8198; font-size: 10px; }
.po-payment-page button:disabled { opacity: .6; cursor: wait; }
.po-payment-page :focus-visible, .po-checkout-v2 :focus-visible { outline: 2px solid #d9a9fb; outline-offset: 3px; }

@media (max-width: 1023px) {
    /* Avoid input zoom; preserve natural vertical scrolling on small screens. */
    body input:not([type=checkbox]):not([type=radio]), body select, body textarea { font-size: 16px; max-width: 100%; }
    .po-container { min-width: 0; }
    .po-container .po-btn, .po-container .po-btn-secondary { min-height: 44px; }
    .po-service-page { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
    .po-service-page > .po-service-header, .po-service-page .po-service-header-main, .po-service-page > .po-service-order-grid { display: contents; }
    .po-service-page .po-service-breadcrumb { order: 0; margin: 0; flex-wrap: wrap; font-size: 11px; gap: 6px; }
    .po-service-page .po-service-error { order: 1; }
    .po-service-page .po-service-code-line { order: 2; margin: 0; }
    .po-service-page .po-service-header h1 { order: 3; font-size: 25px; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
    .po-service-page .po-service-order-card { order: 4; padding: 18px; border-radius: 18px; margin: 0; }
    .po-service-mobile-price { display: flex; gap: 12px; justify-content: space-between; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid #ffffff12; }
    .po-service-mobile-price span { display: grid; gap: 5px; font-size: 11px; color: #a8a0b3; }
    .po-service-mobile-price span:last-child { text-align: right; }
    .po-service-mobile-price strong { color: #f5e9fc; font-size: 19px; }
    .po-service-page .po-service-section-heading { margin-bottom: 16px; }
    .po-service-page .po-service-section-heading h2 { font-size: 18px; margin: 6px 0; }
    .po-service-page .po-service-section-heading .po-eyebrow { display: none; }
    .po-service-page .po-service-section-heading p { font-size: 12px; line-height: 1.5; }
    .po-service-page .po-service-input-group input { font-size: 16px; min-height: 52px; }
    .po-service-page .po-service-price-card { order: 5; margin: 0; padding: 20px; }
    .po-service-page .po-service-facts { order: 6; margin: 0; }
    .po-service-page .po-service-info-card { order: 7; margin: 0; padding: 20px; }
    .po-service-page .po-service-description { order: 8; font-size: 13px; line-height: 1.7; margin: 0; }
    body.po-checkout-open { overflow: hidden; }
    body .po-checkout-overlay { padding: 0; align-items: stretch; }
    body .po-checkout-overlay.open .po-checkout-v2 { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; display: flex; flex-direction: column; margin: 0; }
    .po-checkout-v2 .po-checkout-header { flex: 0 0 auto; padding: max(10px,env(safe-area-inset-top)) 14px 10px; gap: 12px; }
    .po-checkout-v2 .po-checkout-header h2 { font-size: 20px; line-height: 1.2; }
    .po-checkout-v2 .po-checkout-header .po-eyebrow { display: none; }
    .po-checkout-v2 #checkoutSubtitle { display: none; }
    .po-checkout-v2 .po-checkout-close { width: 44px; height: 44px; flex-shrink: 0; }
    .po-checkout-v2 .po-checkout-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px; scrollbar-width: thin; scrollbar-color: #64516f #111217; }
    .po-checkout-v2 .po-checkout-body::-webkit-scrollbar { width: 5px; }
    .po-checkout-v2 .po-checkout-body::-webkit-scrollbar-thumb { background: #64516f; border-radius: 10px; }
    .po-checkout-v2 .po-checkout-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
    .po-checkout-v2 .po-checkout-column { min-width: 0; }
    .po-checkout-v2 .po-checkout-panel { padding: 14px; border-radius: 14px; }
    .po-checkout-v2 .po-checkout-order-panel > .po-checkout-panel-heading { display: none; }
    .po-checkout-v2 .po-checkout-service-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; }
    .po-checkout-v2 .po-checkout-service-copy { gap: 4px; }
    .po-checkout-v2 .po-checkout-service-copy strong { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
    .po-checkout-v2 .po-checkout-service-code { padding: 5px 7px; font-size: 10px; border-radius: 7px; }
    .po-checkout-v2 .po-checkout-device-card { margin-top: 12px; padding: 12px 0 0; border: 0; border-top: 1px solid #ffffff12; border-radius: 0; background: transparent; }
    .po-checkout-v2 .po-checkout-device-header { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; font-size: 10px; }
    .po-checkout-v2 .po-checkout-identifier { font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; user-select: all; }
    .po-checkout-v2 .po-checkout-device-card p { margin-top: 6px; font-size: 11px; line-height: 1.5; color: #9c95a5; }
    .po-checkout-v2 .po-checkout-panel-heading { align-items: center; margin-bottom: 8px; gap: 10px; }
    .po-checkout-v2 .po-checkout-panel-heading h3 { font-size: 14px; }
    .po-checkout-v2 .po-checkout-payment-panel .po-checkout-panel-kicker { display: none; }
    .po-checkout-v2 .po-checkout-tier-badge { padding: 4px 7px; font-size: 9px; }
    #checkoutModal .po-checkout-pricing > div { gap: 12px; padding: 7px 0; }
    #checkoutModal .po-checkout-pricing .total { margin-top: 4px; padding: 9px 0 0; }
    #checkoutModal .po-checkout-pricing .total strong { font-size: 21px; }
    #checkoutModal .po-checkout-loading, #checkoutModal .po-checkout-error { margin-bottom: 8px; padding: 9px 10px; font-size: 12px; line-height: 1.5; }
    #checkoutModal .po-checkout-wallet-v2 { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; }
    #checkoutModal .po-checkout-wallet-item { gap: 4px; }
    #checkoutModal .po-checkout-wallet-item strong { font-size: 15px; }
    #checkoutModal .po-checkout-wallet-after { text-align: right; }
    #checkoutModal .po-checkout-wallet-arrow { width: 24px; height: 24px; transform: none; }
    #checkoutModal .po-checkout-promo-panel { margin-top: 10px; padding: 12px 14px; }
    #checkoutModal .po-checkout-promo-heading { margin-bottom: 8px; }
    #checkoutModal .po-checkout-promo { grid-template-columns: minmax(0,1fr) 74px; gap: 8px; }
    #checkoutModal .po-checkout-promo input { height: 44px; padding: 0 10px; }
    #checkoutModal .po-checkout-promo .po-btn-secondary { display: inline-flex; align-items: center; justify-content: center; width: 74px; min-width: 0; height: 44px; min-height: 44px; padding: 0 10px; }
    .po-checkout-v2 .po-checkout-order-note { display: none; }
    .po-checkout-v2 .po-checkout-footer { flex: 0 0 auto; display: grid; gap: 9px; padding: 10px 14px max(10px,env(safe-area-inset-bottom)); }
    .po-checkout-v2 .po-checkout-footer-note { display: none; }
    .po-checkout-mobile-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #b8a9c5; font-size: 12px; }
    .po-checkout-mobile-total strong { font-size: 20px; color: #fff; }
    .po-checkout-v2 .po-checkout-footer-actions { width: 100%; display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 10px; }
    .po-checkout-v2 .po-checkout-footer-actions button { min-width: 0; width: 100%; min-height: 46px; height: auto; font-size: 14px; padding: 11px 8px; }
    .po-checkout-v2 .po-checkout-footer #checkoutBack { grid-row: 1; grid-column: 1; min-width: 0; }
    .po-checkout-v2 .po-checkout-footer #confirmOrder { grid-row: 1; grid-column: 2; min-width: 0; }
    .po-checkout-v2 .po-checkout-promo input { font-size: 16px; }
    .po-payment-page { margin: 14px auto 36px; }
    .po-payment-card { padding: 22px 18px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .po-checkout-overlay, .po-checkout-modal { transition: none !important; animation: none !important; }
}

/* Mobile catalogue: override the legacy inline layers without changing desktop. */
.po-shop-page .po-shop-filter-controls { display: contents; }
@media (max-width: 1023px) {
    .po-main .po-shop-page { padding-top: 16px !important; padding-bottom: 32px !important; }
    .po-main .po-shop-page [hidden] { display: none !important; }
    .po-main .po-shop-page .po-shop-header { display: block; padding: 0 !important; margin-bottom: 14px !important; border: 0; border-radius: 0 !important; background: none; box-shadow: none; }
    .po-main .po-shop-page .po-shop-header .po-eyebrow { display: none; }
    .po-main .po-shop-page .po-shop-header h1 { margin: 0 0 6px !important; font-size: 25px !important; line-height: 1.2 !important; letter-spacing: -.6px; }
    .po-main .po-shop-page .po-shop-header p { max-width: none !important; font-size: 12px !important; line-height: 1.5 !important; color: #a5a0ae; }
    .po-main .po-shop-page .po-shop-filter { position: static !important; display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; grid-template-rows: auto auto auto !important; gap: 8px !important; padding: 10px !important; border-radius: 14px !important; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .po-main .po-shop-page .po-shop-filter > * { margin: 0 !important; }
    .po-main .po-shop-page .po-shop-filter-controls { display: grid; grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
    .po-main .po-shop-page .po-shop-filter-controls > * { margin: 0 !important; }
    .po-main .po-shop-page .po-shop-filter[data-filter-enhanced] { grid-template-columns: minmax(0,1fr) auto !important; grid-template-rows: auto auto !important; row-gap: 0 !important; }
    .po-main .po-shop-page .po-shop-filter-controls:not([hidden]) { margin-top: 8px !important; }
    .po-main .po-shop-page .po-shop-filter[data-filter-enhanced] .po-shop-search { grid-column: 1 !important; }
    .po-main .po-shop-page #poShopFilterToggle { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 12px; border: 1px solid #ffffff18; border-radius: 9px; color: #e4d6ed; background: #a83bdc12; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
    .po-main .po-shop-page .po-shop-search { grid-column: 1 / -1 !important; grid-row: 1 !important; width: 100% !important; min-width: 0 !important; height: 46px !important; min-height: 46px !important; padding: 0 12px !important; }
    .po-main .po-shop-page #poShopSearch { height: 44px !important; min-height: 44px !important; margin: 0 !important; padding: 0 !important; font-size: 16px !important; }
    .po-main .po-shop-page .po-shop-shortcut { display: none !important; }
    .po-main .po-shop-page #poShopCategory, .po-main .po-shop-page #poShopGroup { width: 100% !important; min-width: 0 !important; height: 44px !important; min-height: 44px !important; padding: 0 24px 0 10px !important; font-size: 16px !important; font-weight: 500 !important; }
    .po-main .po-shop-page #poShopCategory { grid-column: 1 !important; grid-row: 1 !important; }
    .po-main .po-shop-page #poShopGroup { grid-column: 2 !important; grid-row: 1 !important; }
    .po-main .po-shop-page .po-shop-discount-filter { grid-column: 1 / -1 !important; grid-row: 2 !important; justify-self: stretch; width: 100% !important; min-height: 44px !important; gap: 10px !important; padding: 0 10px !important; cursor: pointer; }
    .po-main .po-shop-page .po-shop-discount-filter > span { font-size: 13px !important; }
    .po-main .po-shop-page .po-shop-result-bar { min-height: 44px !important; margin: 0 !important; padding: 0 2px !important; gap: 10px; }
    .po-main .po-shop-page #poShopResultCount { font-size: 12px !important; color: #aaa2b3; }
    .po-main .po-shop-page #poShopReset { min-height: 44px; padding: 0 6px; font-size: 12px !important; }
    .po-main .po-shop-page .po-shop-category { margin-top: 8px !important; }
    .po-main .po-shop-page .po-shop-category-heading { align-items: center !important; margin-bottom: 12px !important; padding-bottom: 10px !important; gap: 10px; }
    .po-main .po-shop-page .po-shop-category-heading h2 { font-size: 19px !important; line-height: 1.3 !important; letter-spacing: -.3px; }
    .po-main .po-shop-page .po-shop-category-heading p { display: none; }
    .po-main .po-shop-page .po-shop-category-heading > span { flex-shrink: 0; white-space: nowrap; padding: 5px 8px; font-size: 11px !important; }
    .po-main .po-shop-page .po-shop-group { margin-bottom: 18px !important; }
    .po-main .po-shop-page .po-shop-group-heading { margin-bottom: 10px !important; }
    .po-main .po-shop-page .po-shop-group-heading h3 { font-size: 13px !important; }
    .po-main .po-shop-page [data-shop-group][data-group-id="ungrouped"]:only-of-type > .po-shop-group-heading { display: none; }
    .po-main .po-shop-page .po-shop-grid { grid-template-columns: minmax(0,1fr) !important; gap: 10px !important; }
    .po-main .po-shop-page .po-shop-card { height: auto; border-radius: 14px !important; }
    .po-main .po-shop-page .po-shop-card:hover { transform: none !important; }
    .po-main .po-shop-page .po-shop-card-link { height: auto; min-height: 0 !important; grid-template-columns: minmax(0,1fr) !important; gap: 0 !important; padding: 14px !important; }
    .po-main .po-shop-page .po-shop-card-symbol { display: none; }
    .po-main .po-shop-page .po-shop-card-title-row strong { font-size: 15px !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
    .po-main .po-shop-page .po-shop-card-meta { margin-top: 6px !important; }
    .po-main .po-shop-page .po-shop-card-meta span { min-height: 22px !important; padding: 3px 6px !important; font-size: 10px !important; }
    .po-main .po-shop-page .po-shop-card-description { margin-top: 8px !important; margin-bottom: 10px; font-size: 12px !important; line-height: 1.5 !important; -webkit-line-clamp: 2 !important; }
    .po-main .po-shop-page .po-shop-card-bottom { margin-top: 0 !important; padding-top: 10px !important; gap: 8px !important; }
    .po-main .po-shop-page .po-shop-price { flex-wrap: wrap; max-width: 100%; gap: 6px !important; }
    .po-main .po-shop-page .po-shop-price strong { font-size: 20px !important; line-height: 1.2 !important; overflow-wrap: anywhere; }
    .po-main .po-shop-page .po-shop-price small { font-size: 11px !important; }
    .po-main .po-shop-page .po-shop-discount, .po-main .po-shop-page .po-shop-eta { min-height: 24px !important; padding: 4px 7px !important; font-size: 10px !important; }
    .po-main .po-shop-page .po-shop-view-service { font-size: 11px !important; min-height: 28px; }
    .po-main .po-shop-page .po-shop-empty { padding: 28px 18px; }
    .po-main .po-shop-page :focus-visible { outline: 2px solid #d9a9fb !important; outline-offset: 3px; }
}
@media (max-width: 359px) {
    .po-main .po-shop-page #poShopGroup { grid-column: 1 / -1 !important; grid-row: 2 !important; }
    .po-main .po-shop-page #poShopCategory { grid-column: 1 / -1 !important; }
    .po-main .po-shop-page .po-shop-discount-filter { grid-row: 3 !important; }
}
