/*
  UltraCell — proprietário do catálogo horizontal compacto
  Build: 20-82-shell-layout-navigation-consolidation

  Arquivo proprietário de componente. As camadas históricas abaixo foram
  preservadas na ordem original para reduzir requisições sem alterar a cascata.
  Os arquivos-fonte permanecem no repositório para rollback e auditoria.
*/

/* ===== fonte preservada: css/v20-65-horizontal-client-catalog.css ===== */
/*
  Ultracell V20.65 — Catálogo horizontal do cliente
  Build: 20-65-horizontal-client-catalog

  Escopo estrito:
  - preserva integralmente o menu inferior existente;
  - altera somente a grade e os cards do catálogo móvel do cliente;
  - mantém foto à esquerda e informações/ações à direita;
  - preserva nomes completos, variações, preço, estoque e carrinho;
  - não altera ADM, D1, R2, pedidos ou regras de negócio.
*/

@media (max-width: 760px) {
  body.v19-store-mobile-active .v19-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 10px 10px 20px !important;
    align-items: stretch !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 170px !important;
    display: grid !important;
    grid-template-columns: 98px minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    align-items: stretch !important;
    border: 1px solid rgba(226, 232, 240, .96) !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .075) !important;
    overflow: hidden !important;
    contain: layout paint !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-media {
    width: 98px !important;
    min-width: 98px !important;
    height: 100% !important;
    min-height: 170px !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    align-self: stretch !important;
    display: grid !important;
    place-items: center !important;
    position: relative !important;
    border-radius: 0 !important;
    border-right: 1px solid rgba(226, 232, 240, .92) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    overflow: hidden !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-media img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-premium-label {
    left: 6px !important;
    right: 6px !important;
    bottom: 7px !important;
    top: auto !important;
    max-width: calc(100% - 12px) !important;
    min-height: 20px !important;
    padding: 4px 6px !important;
    border-radius: 999px !important;
    font-size: 8.5px !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-info {
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 10px 11px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "name name"
      "meta meta"
      "price stock"
      "variant variant"
      "actions actions" !important;
    gap: 6px 8px !important;
    align-content: start !important;
    background: transparent !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-name {
    grid-area: name !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    color: #101828 !important;
    font-size: clamp(13.5px, 4vw, 16px) !important;
    line-height: 1.16 !important;
    font-weight: 1000 !important;
    letter-spacing: -.025em !important;
    display: block !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-meta {
    grid-area: meta !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    color: #667085 !important;
    font-size: clamp(9.5px, 2.9vw, 11px) !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-stars {
    display: none !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-price {
    grid-area: price !important;
    min-width: 0 !important;
    margin: 1px 0 0 !important;
    align-self: center !important;
    color: #101828 !important;
    font-size: clamp(19px, 5.8vw, 24px) !important;
    line-height: 1 !important;
    font-weight: 1000 !important;
    letter-spacing: -.045em !important;
    white-space: nowrap !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-stock {
    grid-area: stock !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 25px !important;
    margin: 0 !important;
    align-self: center !important;
    justify-self: end !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    font-size: clamp(9px, 2.7vw, 11px) !important;
    line-height: 1 !important;
    font-weight: 1000 !important;
    white-space: nowrap !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-variant {
    grid-area: variant !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-variant span,
  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-variant select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-add-row {
    grid-area: actions !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(72px, 82px) minmax(0, 1fr) !important;
    gap: 7px !important;
    align-items: center !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-qty {
    min-width: 0 !important;
    width: 100% !important;
    height: 40px !important;
    border-radius: 14px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-qty button {
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 0 !important;
    font-size: 18px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-qty output {
    min-width: 0 !important;
    font-size: 14px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-add {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
    padding: 0 9px !important;
    font-size: clamp(11.5px, 3.4vw, 14px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.v19-store-mobile-active .v19-load-more {
    grid-column: 1 / -1 !important;
    width: calc(100% - 2px) !important;
    margin: 2px auto 0 !important;
  }

  body.v19-store-mobile-active .v19-empty {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 350px) {
  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card {
    grid-template-columns: 86px minmax(0, 1fr) !important;
    min-height: 166px !important;
    border-radius: 19px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-media {
    width: 86px !important;
    min-width: 86px !important;
    min-height: 166px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-info {
    padding: 9px 8px 10px !important;
    gap: 5px 6px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-name {
    font-size: 13px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-price {
    font-size: 18px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-add-row {
    grid-template-columns: 68px minmax(0, 1fr) !important;
    gap: 6px !important;
  }
}

@media (min-width: 390px) and (max-width: 760px) {
  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card {
    grid-template-columns: 108px minmax(0, 1fr) !important;
    min-height: 178px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-media {
    width: 108px !important;
    min-width: 108px !important;
    min-height: 178px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-info {
    padding: 11px 11px 12px !important;
  }
}

/* Preserva integralmente as aparências premium configuradas no ADM. */
@media (max-width: 760px) {
  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card.v19-premium-full .v19-product-media {
    background: radial-gradient(circle at 45% 20%, rgba(255,255,255,.38), transparent 28%), linear-gradient(145deg, var(--v19-premium-main), var(--v19-premium-second)) !important;
    color: var(--v19-premium-text) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card.v19-premium-full .v19-product-info {
    background: linear-gradient(180deg, var(--v19-premium-soft), #ffffff 72%) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card.v19-premium-border {
    border: 3px solid var(--v19-premium-main) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 10px 24px rgba(15,23,42,.075) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card.v19-premium-border .v19-product-media,
  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card.v19-premium-banner .v19-product-media {
    background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.22), transparent 25%), linear-gradient(145deg, #111827, #293244) !important;
    color: #ffffff !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card.v19-premium-border .v19-product-info,
  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card.v19-premium-banner .v19-product-info {
    background: #ffffff !important;
  }

  body.v19-store-mobile-active .v19-product.v20-65-horizontal-product-card .v19-product-media {
    padding-bottom: 0 !important;
  }
}


/* ===== fonte preservada: css/v20-66-compact-horizontal-client-catalog.css ===== */
/*
  Ultracell V20.66 — Catálogo horizontal compacto do cliente
  Build: 20-69-d1-integrity-catalog-consistency

  Escopo estrito:
  - preserva o menu inferior existente;
  - mantém a estrutura horizontal criada na V20.65;
  - reduz altura, imagem, espaçamentos e controles dos cards móveis;
  - não corta nomes e não altera regras de negócio.
*/

@media (max-width: 760px) {
  body.v19-store-mobile-active .v19-grid {
    gap: 7px !important;
    padding: 7px 8px 18px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card {
    min-height: 142px !important;
    grid-template-columns: 84px minmax(0, 1fr) !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .065) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-media {
    width: 84px !important;
    min-width: 84px !important;
    min-height: 142px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-media.is-dark {
    background:
      radial-gradient(circle at 45% 20%, rgba(255, 255, 255, .24), transparent 28%),
      linear-gradient(145deg, #111827, #293244) !important;
    color: #ffffff !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-photo-placeholder {
    display: block;
    color: inherit;
    font-size: 11px;
    line-height: 1.08;
    font-weight: 1000;
    letter-spacing: -.01em;
    text-align: center;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-media img {
    padding: 5px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-premium-label {
    left: 4px !important;
    right: 4px !important;
    bottom: 5px !important;
    max-width: calc(100% - 8px) !important;
    min-height: 18px !important;
    padding: 3px 4px !important;
    font-size: 7.5px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-info {
    padding: 7px 8px 8px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "name name"
      "meta meta"
      "price stock"
      "variant actions" !important;
    gap: 4px 6px !important;
    align-content: center !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-name {
    font-size: clamp(12.5px, 3.55vw, 14px) !important;
    line-height: 1.12 !important;
    letter-spacing: -.02em !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-meta {
    font-size: clamp(8.5px, 2.35vw, 9.5px) !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-price {
    margin: 0 !important;
    font-size: clamp(18px, 4.9vw, 20px) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-stock {
    min-height: 22px !important;
    padding: 4px 7px !important;
    font-size: clamp(8px, 2.2vw, 9px) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant {
    align-self: center !important;
    justify-self: start !important;
    max-width: 78px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant span,
  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant select {
    width: auto !important;
    max-width: 78px !important;
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    padding: 0 7px !important;
    font-size: 9.5px !important;
    text-overflow: ellipsis !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-add-row {
    width: auto !important;
    justify-self: end !important;
    grid-template-columns: 64px minmax(88px, 104px) !important;
    gap: 5px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-qty {
    height: 34px !important;
    border-radius: 11px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-qty button {
    min-height: 32px !important;
    font-size: 16px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-qty output {
    font-size: 12px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-add {
    min-height: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
    padding: 0 8px !important;
    font-size: clamp(10px, 2.8vw, 11.5px) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card.v19-premium-border {
    border-width: 2px !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 6px 16px rgba(15,23,42,.065) !important;
  }
}

@media (max-width: 350px) {
  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    min-height: 136px !important;
    border-radius: 14px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-media {
    width: 76px !important;
    min-width: 76px !important;
    min-height: 136px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-info {
    padding: 6px 7px 7px !important;
    gap: 3px 5px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-name {
    font-size: 12.25px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-meta {
    font-size: 8px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-add-row {
    grid-template-columns: 60px minmax(82px, 92px) !important;
    gap: 4px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant,
  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant span,
  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant select {
    max-width: 66px !important;
  }
}

@media (max-width: 330px) {
  body.v19-store-mobile-active .v19-grid {
    padding-inline: 6px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-media {
    width: 72px !important;
    min-width: 72px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-info {
    padding-inline: 6px !important;
    gap: 3px 4px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant,
  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant span,
  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-variant select {
    max-width: 58px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-add-row {
    grid-template-columns: 58px minmax(76px, 86px) !important;
    gap: 4px !important;
  }
}

@media (min-width: 390px) and (max-width: 760px) {
  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card {
    grid-template-columns: 88px minmax(0, 1fr) !important;
    min-height: 144px !important;
  }

  body.v19-store-mobile-active .v19-product.v20-66-compact-horizontal-product-card .v19-product-media {
    width: 88px !important;
    min-width: 88px !important;
    min-height: 144px !important;
  }
}



/* V20.74 — tela inicial desktop por categorias priorizadas, sem contagens */
@media (min-width: 761px) {
  .desktop-premium-main-content {
    width: 100%;
    min-width: 0;
  }

  .desktop-category-home,
  .desktop-catalog-results {
    display: grid;
    gap: 18px;
  }

  .desktop-category-home-head,
  .desktop-catalog-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 20px 22px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.95));
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
  }

  .desktop-category-home-head h2,
  .desktop-catalog-results-head h2 {
    margin: 3px 0 5px;
    color: #101827;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.1;
  }

  .desktop-category-home-head p,
  .desktop-catalog-results-head p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
  }

  .desktop-category-kicker,
  .desktop-catalog-results-head > div > span {
    color: #f97316;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
  }


  .desktop-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
  }

  .desktop-category-card {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 13px;
    min-height: 98px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 17px;
    background: #fff;
    color: #111827;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  }

  .desktop-category-card:hover,
  .desktop-category-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, .58);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .11);
    outline: none;
  }

  .desktop-category-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 15px;
    color: #f97316;
    background: linear-gradient(145deg, #fff7ed, #ffedd5);
    border: 1px solid rgba(249, 115, 22, .18);
  }

  .desktop-category-icon svg {
    width: 30px;
    height: 30px;
  }

  .desktop-category-copy {
    display: grid;
    align-content: center;
    gap: 0;
    min-width: 0;
  }

  .desktop-category-copy strong {
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    line-height: 1.2;
    text-overflow: ellipsis;
  }


  .desktop-category-arrow {
    color: #94a3b8;
    font-size: 28px;
    line-height: 1;
    transition: transform .18s ease, color .18s ease;
  }

  .desktop-category-card:hover .desktop-category-arrow,
  .desktop-category-card:focus-visible .desktop-category-arrow {
    color: #f97316;
    transform: translateX(3px);
  }

  .desktop-back-categories {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid #d7dee8;
    border-radius: 11px;
    background: #fff;
    color: #1e293b;
    font-weight: 850;
    cursor: pointer;
  }

  .desktop-back-categories:hover,
  .desktop-back-categories:focus-visible {
    border-color: #f97316;
    color: #c2410c;
    outline: none;
  }

  .desktop-premium-search-wrap input {
    min-width: 260px;
  }
}

@media (min-width: 1180px) {
  .desktop-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
