/*
 * Painel desktop de pedidos e interação dos cards de produto.
 * Escopo deliberado: desktop (>= 769px); a versão mobile permanece intocada.
 */
@media (min-width:769px) {
  /* Sem botão + sobre a foto: a própria mídia já delega o clique ao quick-add real. */
  html body.sd-desktop.is-shop-view .shop-view .shop-layout .product-card-modern .pc-add-cutout,
  html body.sd-desktop.is-shop-view .shop-view .shop-layout .product-card-modern .pc-add-cutout .pc-add-button {
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
  html body.sd-desktop.is-shop-view .shop-view .shop-layout .product-card-modern .pc-media {
    cursor:pointer !important;
  }

  /* O carrinho usa a estrutura histórica do drawer de perfil; :has limita as regras ao pedido. */
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line),
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) {
    display:flex !important;
    position:fixed !important;
    inset:0 !important;
    z-index:3000 !important;
    align-items:stretch !important;
    justify-content:flex-end !important;
    width:100vw !important;
    height:100dvh !important;
    background:rgba(0, 0, 0, .18) !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay.hidden:has(> .drawer > .cart-line),
  html body.sd-desktop #overlay.sd-profile-overlay.hidden:has(> .drawer > .empty-cart) {
    display:none !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer.sd-drawer-lateral > .cart-line) > .drawer.profile-drawer.sd-drawer-lateral,
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer.sd-drawer-lateral > .empty-cart) > .drawer.profile-drawer.sd-drawer-lateral {
    display:flex !important;
    position:relative !important;
    top:auto !important;
    right:auto !important;
    flex-direction:column !important;
    box-sizing:border-box !important;
    width:min(430px,100vw) !important;
    min-width:0 !important;
    max-width:430px !important;
    height:100dvh !important;
    min-height:0 !important;
    max-height:100dvh !important;
    margin:0 !important;
    padding:28px 26px 30px !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    border:0 !important;
    border-radius:20px 0 0 20px !important;
    background:#fff !important;
    box-shadow:-16px 0 40px rgba(0, 0, 0, .18) !important;
    transform:none !important;
    animation:none !important;
    color:#000000 !important;
    font:400 14px/1.4 Inter,Arial,sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .drawer-head,
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .drawer-head {
    display:flex !important;
    flex:0 0 auto !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100% !important;
    min-height:42px !important;
    margin:0 0 14px !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .drawer-head h2,
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .drawer-head h2 {
    margin:0 !important;
    color:#000000 !important;
    font:600 20px/1.25 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .drawer-head .close,
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .drawer-head .close {
    position:static !important;
    display:grid !important;
    place-items:center !important;
    flex:0 0 34px !important;
    width:34px !important;
    height:34px !important;
    padding:0 !important;
    color:#000000 !important;
    background:#f2f2f2 !important;
    border:0 !important;
    border-radius:50% !important;
    font:400 21px/1 Arial,sans-serif !important;
    cursor:pointer !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer > .cart-line {
    display:grid !important;
    grid-template-columns:56px minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:12px !important;
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 0 14px !important;
    padding:12px !important;
    background:#faf9fc !important;
    border:1px solid #e9e9e9 !important;
    border-radius:12px !important;
    box-shadow:none !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .cart-line-thumb-wrap {
    display:block !important;
    width:56px !important;
    height:56px !important;
    overflow:hidden !important;
    border-radius:10px !important;
    background:#f2f2f2 !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .cart-line-thumb {
    display:block !important;
    width:56px !important;
    height:56px !important;
    object-fit:cover !important;
    border:0 !important;
    border-radius:10px !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .cart-line-copy {
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:4px !important;
    min-width:0 !important;
    color:#000000 !important;
    font:400 13px/1.35 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .cart-line-copy strong {
    display:block !important;
    max-width:100% !important;
    overflow-wrap:anywhere !important;
    color:#000000 !important;
    font:600 14px/1.3 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .cart-line-copy small {
    color:#000000 !important;
    font:400 13px/1.35 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .sd-cart-delivery {
    display:inline-flex !important;
    align-items:center !important;
    width:max-content !important;
    max-width:100% !important;
    margin-top:2px !important;
    padding:3px 8px !important;
    color:#000000 !important;
    background:#f2f2f2 !important;
    border:0 !important;
    border-radius:999px !important;
    font:500 11px/1.3 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .qty {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .qty button {
    display:grid !important;
    place-items:center !important;
    box-sizing:border-box !important;
    width:28px !important;
    height:28px !important;
    min-width:28px !important;
    padding:0 !important;
    color:#000000 !important;
    background:#f2f2f2 !important;
    border:0 !important;
    border-radius:8px !important;
    font:500 17px/1 Arial,sans-serif !important;
    cursor:pointer !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .qty b {
    min-width:14px !important;
    color:#000000 !important;
    text-align:center !important;
    font:600 13px/1 Inter,Arial,sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer > .settings-card {
    box-sizing:border-box !important;
    width:100% !important;
    margin:0 0 14px !important;
    padding:14px !important;
    color:#000000 !important;
    background:#faf9fc !important;
    border:1px solid #e9e9e9 !important;
    border-radius:12px !important;
    box-shadow:none !important;
    font:400 13px/1.45 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer > .settings-card > strong {
    color:#000000 !important;
    font:600 14px/1.35 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .upload-note {
    color:#000000 !important;
    font:400 13px/1.45 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .check-row {
    display:flex !important;
    align-items:flex-start !important;
    gap:9px !important;
    margin:9px 0 0 !important;
    color:#000000 !important;
    font:400 13px/1.4 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .check-row input {
    flex:0 0 16px !important;
    width:16px !important;
    height:16px !important;
    margin:1px 0 0 !important;
    accent-color:#000000 !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer > .totals {
    display:flex !important;
    flex-direction:column !important;
    gap:9px !important;
    box-sizing:border-box !important;
    width:100% !important;
    margin:0 0 16px !important;
    padding:14px 0 0 !important;
    border:0 !important;
    border-top:1px solid #ececec !important;
    background:transparent !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .total-row {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    color:#000000 !important;
    font:400 14px/1.35 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .total-row strong {
    flex:0 0 auto !important;
    max-width:48% !important;
    white-space:nowrap !important;
    color:#000000 !important;
    text-align:right !important;
    font:500 14px/1.35 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .total-row.final {
    margin-top:3px !important;
    padding-top:10px !important;
    color:#000000 !important;
    border-top:1px solid #ececec !important;
    font-weight:600 !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) .total-row.final strong {
    color:#000000 !important;
    font:700 16px/1.3 Inter,Arial,sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer #drawerCheckout,
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer #drawerClearCart {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
    width:100% !important;
    min-height:44px !important;
    margin:0 0 9px !important;
    padding:0 16px !important;
    border-radius:10px !important;
    font:600 14px/1 Inter,Arial,sans-serif !important;
    cursor:pointer !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer #drawerCheckout {
    color:#fff !important;
    background:#000000 !important;
    border:1px solid #000000 !important;
    box-shadow:0 4px 12px rgba(0, 0, 0, .18) !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .cart-line) > .drawer #drawerClearCart {
    color:#000000 !important;
    background:#fff !important;
    border:1px solid #f3f4f6 !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .empty-cart {
    box-sizing:border-box !important;
    width:100% !important;
    margin:0 0 16px !important;
    padding:18px !important;
    color:#000000 !important;
    background:#faf9fc !important;
    border:1px dashed #f3f4f6 !important;
    border-radius:14px !important;
    text-align:center !important;
    font:400 14px/1.5 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) > .drawer > .totals {
    display:flex !important;
    flex-direction:column !important;
    gap:9px !important;
    box-sizing:border-box !important;
    width:100% !important;
    margin:0 0 16px !important;
    padding:14px 0 0 !important;
    border:0 !important;
    border-top:1px solid #ececec !important;
    background:transparent !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .total-row {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    color:#000000 !important;
    font:400 14px/1.35 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .total-row strong {
    color:#000000 !important;
    text-align:right !important;
    font:500 14px/1.35 Inter,Arial,sans-serif !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .total-row.final {
    margin-top:3px !important;
    padding-top:10px !important;
    color:#000000 !important;
    border-top:1px solid #ececec !important;
    font-weight:600 !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay:has(> .drawer > .empty-cart) .total-row.final strong {
    color:#000000 !important;
    font:700 16px/1.3 Inter,Arial,sans-serif !important;
  }
}
