/* DIXAOne mobile layout refinements. Desktop rules remain untouched. */
.mobile-details-button { display: none; }
@media (max-width: 768px) {
  body.render-page .render-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 8px 9px;
  }
  body.render-page .render-topbar .site-links {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  body.render-page .render-topbar .site-links a {
    display: flex;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: 1px solid var(--theme-border, #30384c);
    border-radius: 10px;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
  }
  body.render-page .render-header-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  body.render-page .render-header-actions a {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--theme-border, #30384c);
    border-radius: 10px;
    font-size: 10px;
  }
  body:has(header.compact-header) main,
  body:has(header.compact-header) main.wrap,
  body:has(header.compact-header) .wrap,
  body:has(header.compact-header) .catalog,
  body:has(header.compact-header) .movies-main,
  body:has(header.compact-header) .discovery-main,
  body:has(header.compact-header) .cinema-intro,
  body:has(header.compact-header) .cinema-grid,
  body:has(header.compact-header) .movie-collection,
  body:has(header.compact-header) .movie-info,
  body:has(header.compact-header) .discovery,
  body:has(header.compact-header) .platform-wall,
  body:has(header.compact-header) .home-information,
  body:has(header.compact-header) .support-band,
  body:has(header.compact-header) .experience-section,
  body:has(header.compact-header) .dixa-trivia-section {
    width: 100%;
    max-width: 100%;
    padding-left: 9px;
    padding-right: 9px;
  }

  body header.compact-header {
    padding-left: 9px;
    padding-right: 9px;
  }
  body header.compact-header nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  body header.compact-header nav .header-primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  body header.compact-header nav .header-primary > a,
  body header.compact-header nav .header-primary > .explore-menu {
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 6px;
    border: 1px solid var(--theme-border, #30384c);
    border-radius: 11px;
    background: color-mix(in srgb, var(--theme-accent, #7c6af0) 8%, var(--theme-surface, #10131c));
    text-align: center;
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  body header.compact-header nav .header-primary > .explore-menu { display: block; }
  body header.compact-header nav .header-primary > .explore-menu > summary {
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
  }
  body header.compact-header nav .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding-top: 2px;
  }
  body header.compact-header nav .header-actions > *,
  body header.compact-header nav .header-actions .account-menu-host,
  body header.compact-header nav .header-actions .cart-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    font-size: 10px;
  }
  body header.compact-header nav .header-credit { min-height: 40px; }
  body header.compact-header nav .explore-panel { width: min(92vw, 390px); }
  body header.compact-header nav:has(.quick-account-panel:not([hidden])) { display: grid !important; }
  body header.compact-header nav:has(.quick-account-panel:not([hidden])) .header-primary { display: none !important; }

  body #catalogo #products,
  body #catalogo .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body #catalogo .card {
    position: relative;
    min-width: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 24px #0004, inset 0 1px #ffffff0b;
  }
  body #catalogo .card .image-wrap {
    position: relative;
    height: 88px;
    min-height: 88px;
    border-radius: 14px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 110%, #3a2d77a8, #0b111e 72%);
  }
  body #catalogo .card .product-image {
    display: block;
    width: 100%;
    height: 88px;
    padding: 9px 18px;
    object-fit: contain;
    object-position: center;
  }
  body #catalogo .card .platform-watermark { display: none; }
  body #catalogo .card .delivery-pill {
    position: absolute;
    top: 6px;
    left: 6px;
    right: auto;
    bottom: auto;
    max-width: calc(100% - 82px);
    padding: 4px 7px;
    border: 1px solid #8ca7d85c;
    border-radius: 999px;
    background: #080d19e8;
    color: #e2e8f0;
    font-size: 9px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body #catalogo .card .plan-details-button {
    position: absolute;
    z-index: 3;
    top: 6px;
    right: 6px;
    width: auto;
    min-width: 60px;
    min-height: 28px;
    padding: 4px 7px;
    border: 1px solid #a89aff70;
    border-radius: 999px;
    background: #111323ed;
    color: #f1efff;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
  }
  body #catalogo .card .plan-details-button .dixa-button-icon { display: none; }
  body #catalogo .card .mobile-details-button {
    position: absolute;
    z-index: 3;
    top: 6px;
    right: 6px;
    display: inline-flex;
    min-width: 60px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 4px 7px;
    border: 1px solid #a89aff70;
    border-radius: 999px;
    background: #111323ed;
    color: #f1efff;
    font-size: 9px;
    line-height: 1;
  }
  body #catalogo .card-content { padding: 9px 9px 10px; }
  body #catalogo .card .service-favorite,
  body #catalogo .card .category,
  body #catalogo .card .plan-label,
  body #catalogo .card > .plan-saving-highlight,
  body #catalogo .card > .wishlist-btn,
  body #catalogo .card .missing-balance-btn,
  body #catalogo .card .catalog-duration-options,
  body #catalogo .card .modality-selector,
  body #catalogo .card .platform-coupon,
  body #catalogo .card select,
  body #catalogo .card .card-content > p.muted,
  body #catalogo .card .catalog-card-actions .plan-details-button {
    display: none !important;
  }
  body #catalogo .card h3 {
    display: -webkit-box;
    min-height: 2.4em;
    max-height: 2.4em;
    margin: 0 0 5px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  body #catalogo .card .mobile-card-meta {
    display: grid;
    gap: 3px;
    min-height: 34px;
    margin: 0 0 6px;
    color: var(--theme-soft, #aab4c6);
    font-size: 9px;
    line-height: 1.35;
  }
  body #catalogo .card .mobile-card-meta span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  body #catalogo .card .row {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    margin: 0 0 7px;
  }
  body #catalogo .card .price {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
  }
  body #catalogo .card .price small { font-size: 9px; }
  body #catalogo .card .stock {
    min-width: 0;
    font-size: 8px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body #catalogo .card .catalog-card-actions,
  body #catalogo .card .catalog-card-primary-actions { display: block; width: 100%; }
  body #catalogo .card .catalog-card-primary-actions > .add {
    display: flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px 6px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body #catalogo .toolbar,
  body #catalogo .delivery-toolbar { gap: 8px; }
  body #catalogo .filters { gap: 5px; }
  body #catalogo .filters button { min-height: 36px; padding: 7px 8px; font-size: 10px; }

  body:has(header.compact-header) .home-information-content > section,
  body:has(header.compact-header) .movie-collection,
  body:has(header.compact-header) main > section[aria-labelledby],
  body:has(header.compact-header) main > section.movie-info {
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
  }
  body:has(header.compact-header) .movie-carousel { contain: layout paint; }

  .cart-dialog {
    width: calc(100vw - 12px);
    max-width: 100%;
    max-height: 94dvh;
    padding: 12px;
    border-radius: 18px;
    overscroll-behavior: contain;
  }
  .cart-dialog .dialog-head {
    top: -12px;
    margin: -12px -12px 8px;
    padding: 9px 12px;
    min-height: 54px;
  }
  .cart-dialog .dialog-head h2 { font-size: 19px; }
  .cart-dialog .cart-payment-only { padding: 7px 9px; margin-bottom: 6px; font-size: 11px; }
  .cart-dialog .cart-line {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 8px 0;
  }
  .cart-dialog .cart-line > img { width: 42px; height: 42px; }
  .cart-dialog .cart-line-info > strong { font-size: 13px; line-height: 1.2; }
  .cart-dialog .cart-line-info > small { font-size: 10px; line-height: 1.25; }
  .cart-dialog .cart-line > strong { font-size: 12px; }
  .cart-dialog .cart-line .cart-quantity { grid-column: 2 / -1; grid-row: 3; margin: 0; gap: 5px; }
  .cart-dialog .cart-line .cart-plan-facts { grid-column: 1 / -1; grid-row: 3; }
  .cart-dialog .cart-line .cart-quantity { grid-column: 1 / -1; grid-row: 4; }
  .cart-dialog .cart-quantity button { min-width: 30px; min-height: 30px; padding: 4px 8px; }
  .cart-plan-facts { margin: 4px 0 0; }
  .cart-plan-facts > summary { cursor: pointer; color: var(--theme-soft); font-size: 10px; line-height: 1.35; }
  .cart-plan-facts .purchase-quick-facts { margin: 6px 0; }
  .cart-dialog .cart-coupon { padding: 8px; margin-top: 8px; }
  .cart-dialog .cart-coupon label { margin-bottom: 5px; font-size: 11px; }
  .cart-dialog .cart-coupon-row { flex-direction: row; gap: 6px; }
  .cart-dialog .cart-coupon-row input { min-height: 36px; padding: 6px 8px; font-size: 12px; }
  .cart-dialog .cart-coupon-row button { width: auto; min-height: 36px; padding: 6px 9px; font-size: 11px; }
  .cart-dialog .cart-coupon small { display: none; }
  .cart-dialog .cart-coupon p { font-size: 10px; margin-top: 3px; }
  .cart-sticky-checkout {
    position: sticky;
    bottom: -12px;
    z-index: 7;
    margin: 8px -12px -12px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--theme-border, #45516a);
    background: color-mix(in srgb, var(--theme-surface, #101828) 96%, #080d18);
    box-shadow: 0 -8px 22px #03071299;
  }
  .cart-sticky-checkout .cart-total { margin: 0 0 6px; font-size: 17px; }
  .cart-sticky-checkout .cart-total strong { font-size: 19px; }
  .cart-sticky-checkout .cart-payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 0 0 6px; padding: 0; border: 0; }
  .cart-sticky-checkout .cart-payment-methods legend { grid-column: 1 / -1; padding: 0; font-size: 10px; }
  .cart-sticky-checkout .cart-payment-methods label { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 6px; border: 1px solid var(--theme-border); border-radius: 9px; font-size: 10px; }
  .cart-sticky-checkout .cart-payment-methods label small { display: none; }
  .cart-sticky-checkout .cart-payment-methods input { flex: 0 0 auto; margin: 0; }
  .cart-sticky-checkout .cart-wallet-summary,
  .cart-sticky-checkout #cart-payment-help { display: none; }
  .cart-sticky-checkout .cart-conditions { margin: 4px 0; font-size: 10px; }
  .cart-sticky-checkout .cart-conditions > summary { font-size: 10px; padding: 4px 0; }
  .cart-sticky-checkout .warranty-rules-semaphore { display: grid; gap: 5px; }
  .cart-sticky-checkout .warranty-rule-item { padding: 5px 7px; font-size: 10px; }
  .cart-sticky-checkout > .check { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 6px; font-size: 10px; line-height: 1.3; }
  .cart-sticky-checkout #cart-checkout { min-height: 42px; margin: 0; font-size: 13px; }
  .cart-sticky-checkout .cart-continue { display: none; }

  .ai-chat.ai-chat-discovery,
  .ai-chat { color: #e2e8f0; }
  .ai-chat-heading,
  .ai-chat-footer,
  .ai-chat-composer label,
  .ai-chat-composer small { color: #cbd5e1; }
  .ai-chat-log { color: #e2e8f0; }
  .ai-message-body p,
  .ai-message-content { color: #e2e8f0 !important; }
  .ai-chat-composer textarea {
    min-height: 54px;
    border: 1px solid #68799b;
    border-radius: 10px;
    background: #0b1220;
    color: #f8fafc;
  }
  .ai-chat-composer textarea::placeholder { color: #aab8cd; }
  .ai-chat-composer button { color: #fff; background: linear-gradient(100deg, #1766ff, #7040ef); }
  .movie-trailer-preview {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--theme-border, #43516c);
    border-radius: 13px;
    background: #05080f;
    color: #fff;
  }
  .movie-trailer-preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
  .movie-trailer-preview span { position: absolute; inset: auto 10px 10px; display: block; padding: 9px 12px; border-radius: 10px; background: #08101de8; text-align: center; font-weight: 700; }
  .movie-trailer-player[hidden] { display: none !important; }
  .movie-trailer-player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 0; border: 0; border-radius: 13px; background: #05080f; }
  .movie-trailer-fallback { display: block; min-height: 42px; margin-top: 8px; padding: 10px; border: 1px solid var(--theme-accent, #7c6af0); border-radius: 10px; text-align: center; color: #e2e8f0; }
}

/* Keep catalog cards shorter on phones without changing the surrounding layout. */
@media (max-width: 768px) {
  body #catalogo .card .image-wrap { height: 70px !important; min-height: 70px !important; }
  body #catalogo .card .product-image { height: 70px !important; padding: 5px 12px !important; }
  body #catalogo .card-content { padding: 7px !important; }
  body #catalogo .card h3 {
    min-height: 1.15em !important;
    max-height: 2.3em !important;
    margin: 0 0 4px !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
  }
  body #catalogo .card .mobile-card-meta {
    gap: 3px !important;
    min-height: 0 !important;
    margin: 3px 0 5px !important;
  }
  body #catalogo .card .mobile-card-meta .mobile-meta-item {
    min-height: 0 !important;
    gap: 5px !important;
    padding: 4px 6px !important;
    border-radius: 7px !important;
  }
  body #catalogo .card .mobile-card-meta .mobile-meta-icon { font-size: 11px !important; }
  body #catalogo .card .mobile-card-meta .mobile-meta-copy { gap: 0 !important; }
  body #catalogo .card .mobile-card-meta .mobile-meta-copy small { display: none !important; }
  body #catalogo .card .mobile-card-meta .mobile-meta-copy strong {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
  body #catalogo .card .row { gap: 3px !important; margin: 0 0 5px !important; }
  body #catalogo .card .price { font-size: 13px !important; line-height: 1.1 !important; }
  body #catalogo .card .price small { font-size: 8px !important; }
  body #catalogo .card .stock { font-size: 8px !important; }
  body #catalogo .card .catalog-card-primary-actions > .add {
    min-height: 32px !important;
    padding: 5px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
  }
}

/* Mobile card controls stay out of the service artwork. */
@media (max-width: 768px) {
  body #catalogo .card .delivery-pill {
    top: auto !important;
    right: auto !important;
    bottom: 5px !important;
    left: 5px !important;
    max-width: calc(100% - 42px) !important;
    padding: 3px 6px !important;
    font-size: 8px !important;
  }
  body #catalogo .card .mobile-details-button {
    top: 5px !important;
    right: 5px !important;
    width: 29px !important;
    min-width: 29px !important;
    height: 29px !important;
    min-height: 29px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 0 !important;
  }
  body #catalogo .card .mobile-details-button::after {
    content: "ⓘ";
    color: #f1efff;
    font-size: 15px;
    line-height: 1;
  }
}

/* Slightly taller service artwork on mobile cards. */
@media (max-width: 768px) {
  body #catalogo .card .image-wrap { height: 80px !important; min-height: 80px !important; }
  body #catalogo .card .product-image { height: 80px !important; }
}
