.cesto-page {
  background: #f0f0f0;
  min-height: auto;
  padding: 1.5rem 0 1rem;
}

.cesto-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-cesto .navbar-pc,
.page-cesto .navbar-mobile {
  display: none !important;
}

/* ── Colunas ── */
.cesto-main { display: flex; flex-direction: column; gap: 1.5rem; }
.cesto-main-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.cesto-col-left { display: flex; flex-direction: column; gap: 1rem; }
.cesto-col-right { position: static; }

/* ── Secções ── */
.cesto-section {
  background: #fff;
  border-radius: 0;
  border: 1px solid #eee;
  padding: 1rem;
  width: 100%;
}

.cesto-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 1rem;
}

.cesto-section-title svg { width: 20px; height: 20px; color: #FFB800; }

/* ── Select All ── */
.cesto-produtos-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.cesto-produtos-actions { display: flex; align-items: center; gap: 6px; }
.cesto-action-link { background: none; border: none; font-size: 0.75rem; font-weight: 600; color: #FFB800; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; font-family: inherit; }
.cesto-action-link:hover { color: #e6a500; }
.cesto-action-link svg { width: 14px; height: 14px; }
.cesto-select-all-wrap { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.cesto-select-all-label { font-size: 0.78rem; color: #666; font-weight: 500; }

/* ── Empty State ── */
.cesto-empty { display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem; text-align: center; }
.cesto-empty-icon { width: 48px; height: 48px; color: #ccc; margin-bottom: 0.75rem; }
.cesto-empty-texto { font-size: 0.9rem; color: #999; margin: 0 0 1rem; }
.cesto-empty-link { font-size: 0.85rem; color: #FFB800; text-decoration: none; font-weight: 600; }
.cesto-empty-link:hover { color: #e6a500; }

/* ── Busca ── */
.cesto-busca-wrap { display: flex; align-items: center; gap: 8px; padding: 0.4rem 0.75rem; border: none; background: #f5f5f5; margin-bottom: 0.5rem; }
.cesto-busca-icon { width: 16px; height: 16px; color: #999; flex-shrink: 0; }
.cesto-busca-input { flex: 1; border: none; outline: none; font-size: 0.82rem; font-family: inherit; color: #333; background: transparent; }
.cesto-busca-input::placeholder { color: #aaa; }
.cesto-busca-clear { display: none; align-items: center; justify-content: center; width: 18px; height: 18px; background: none; border: none; cursor: pointer; color: #999; flex-shrink: 0; padding: 0; }
.cesto-busca-clear:hover { color: #333; }
.cesto-busca-clear svg { width: 14px; height: 14px; }

/* ── Paginação ── */
.cesto-paginacao { display: flex; align-items: center; justify-content: center; gap: 3px; margin-top: 0.5rem; flex-wrap: wrap; }
.cesto-pag-btn { min-width: 32px; height: 32px; padding: 0 0.5rem; border: 1px solid #333; background: #333; font-size: 0.75rem; font-weight: 600; cursor: pointer; border-radius: 0; font-family: inherit; transition: all 0.15s; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.cesto-pag-btn:hover:not(:disabled):not(.cesto-pag-ativo) { background: #FFB800; border-color: #FFB800; color: #000; }
.cesto-pag-btn:disabled { background: #888; color: #bbb; border-color: #888; cursor: not-allowed; }
.cesto-pag-ativo { background: #FFB800; color: #000; border-color: #FFB800; font-weight: 700; }
.cesto-pag-dots { font-size: 0.75rem; color: #bbb; padding: 0 2px; min-width: 20px; text-align: center; flex-shrink: 0; }

/* ── Encomendas ── */
.cesto-encomendas-lista { display: flex; flex-direction: column; }
.cesto-encomenda { background: #fff; border-bottom: 1px solid #eee; }
.cesto-encomenda:last-child { border-bottom: none; }
.cesto-encomenda-linha { display: flex; align-items: center; gap: 10px; padding: 0.6rem 0.85rem; }
.cesto-encomenda-id { font-size: 0.85rem; font-weight: 700; color: #333; }
.cesto-encomenda-tipo { font-size: 0.6rem; font-weight: 700; padding: 2px 6px; background: #FFB800; color: #000; text-transform: uppercase; letter-spacing: 0.03em; }
.cesto-encomenda-status { font-size: 0.6rem; font-weight: 700; padding: 2px 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.cesto-btn-detalhes { margin-left: auto; font-size: 0.7rem; font-weight: 700; color: #333; text-decoration: none; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.cesto-btn-detalhes svg { width: 12px; height: 12px; }
.cesto-encomenda-prioridade { display: flex; align-items: center; gap: 6px; padding: 0.4rem 0.6rem; background: #fce4ec; border-left: 3px solid #c62828; margin-bottom: 0.6rem; font-size: 0.75rem; font-weight: 600; color: #c62828; }
.cesto-prioridade-icon svg { width: 14px; height: 14px; color: #c62828; }

/* ── Estado ── */
.cesto-encomenda-estado { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 0.4rem; }
.cesto-estado-item { font-size: 0.7rem; font-weight: 600; color: #bbb; }
.cesto-estado-ok { color: #2e7d32; }
.cesto-estado-ativo { color: #e65100; }
.cesto-encomenda-estado svg { width: 12px; height: 12px; color: #2e7d32; }
.cesto-encomenda-data { display: flex; flex-direction: column; gap: 2px; font-size: 0.68rem; color: #999; }

/* ── Aviso de Multa ── */

/* ── Checkbox ── */
.cesto-check { display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.cesto-check-input { display: none; }
.cesto-check-box { width: 18px; height: 18px; border: 2px solid #ccc; border-radius: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.cesto-check-input:checked + .cesto-check-box { background: #FFB800; border-color: #FFB800; }
.cesto-check-input:checked + .cesto-check-box::after { content: ''; width: 6px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }

/* ── Produtos ── */
.cesto-carrinho { display: flex; flex-direction: column; gap: 0.4rem; }
.cesto-produto { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; background: #fff; border-radius: 0; }
.cesto-produto-img { width: 42px; height: 42px; border-radius: 0; overflow: hidden; flex-shrink: 0; background: #fff; display: flex; align-items: center; justify-content: center; }
.cesto-produto-img img { width: 100%; height: 100%; object-fit: contain; }
.cesto-produto-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cesto-produto-linha-nome { display: flex; align-items: center; justify-content: space-between; }
.cesto-produto-nome { font-size: 0.82rem; font-weight: 600; color: #333; margin: 0; }
.cesto-produto-apagar { background: none; border: none; cursor: pointer; padding: 4px; color: #ccc; transition: color 0.2s; }
.cesto-produto-apagar:hover { color: #e74c3c; }
.cesto-produto-apagar svg { width: 16px; height: 16px; }
.cesto-produto-preco-linha { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cesto-produto-preco { font-size: 0.8rem; font-weight: 700; color: #FFB800; }
.cesto-produto-preco-old { font-size: 0.72rem; color: #aaa; text-decoration: line-through; }
.cesto-produto-desconto { font-size: 0.6rem; font-weight: 700; color: #fff; background: #e74c3c; padding: 1px 5px; border-radius: 0; white-space: nowrap; }
.cesto-produto-qty { display: flex; align-items: center; gap: 8px; }
.cesto-qty-btn { width: 24px; height: 24px; border: none; border-radius: 0; background: #f5f5f5; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: #333; transition: all 0.2s; }
.cesto-qty-btn:hover:not(:disabled) { background: #e0e0e0; }
.cesto-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cesto-qty-val { font-size: 0.9rem; font-weight: 700; min-width: 20px; text-align: center; }

/* ── Resumo Card ── */
.cesto-resumo-card { background: #fff; border: 1px solid #eee; border-radius: 0; padding: 1rem; }
.cesto-resumo-titulo { font-size: 0.9rem; font-weight: 700; color: #222; margin: 0 0 1rem; }
.cesto-resumo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.cesto-resumo-linha { display: flex; justify-content: space-between; font-size: 0.85rem; color: #666; }
.cesto-resumo-total { font-size: 1rem; font-weight: 700; color: #333; padding-top: 6px; border-top: 1px solid #eee; margin-top: 4px; }
.cesto-resumo-total span:last-child { color: #FFB800; font-size: 1.1rem; }
.cesto-finalizar-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 1rem; background: #FFB800; color: #000; border: none; border-radius: 0; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.cesto-finalizar-btn:hover:not(.cesto-btn-disabled) { background: #e6a500; }
.cesto-btn-disabled { background: #ccc; color: #888; cursor: not-allowed; }
.cesto-finalizar-btn svg { width: 18px; height: 18px; }

/* ── Responsive ── */
@media screen and (max-width: 1023px) {
  .cesto-main-grid { grid-template-columns: 1fr; }
}
@media screen and (min-width: 768px) {
  .cesto-header-mobile { display: none; }
  .cesto-page { padding: 2rem 0 1rem; }
}
@media screen and (max-width: 767px) {
  .page-cesto .header-pc,
  .page-cesto .header-mobile,
  .page-cesto .footer-pc,
  .page-cesto .footer-mobile,
  .page-cesto .scroll-to-top { display: none !important; }
  .cesto-page { padding: 30px 0 220px; min-height: 100vh; background: #fff; }
  .cesto-container { padding: 0; }
  .cesto-main-grid { gap: 0; }
  .cesto-section { border-radius: 0; border-left: none; border-right: none; margin: 0; padding: 0; border: none; }
  .cesto-endereco-section { border-top: none; margin: 0; }
  .cesto-busca-wrap { border: none; margin: 0; }
  .cesto-col-left .cesto-busca-wrap { display: none; }
  .cesto-carrinho { gap: 0; }
  .cesto-produto { padding: 0.6rem 1rem; background: #fff; }

  .cesto-header-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid #eee;
  }
  .cesto-header-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f0f0f0;
  }
  .cesto-header-voltar {
    background: #222;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    color: #fff;
    border-radius: 0;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .cesto-header-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    flex: 1;
  }
  .cesto-header-selectall { display: flex; align-items: center; gap: 6px; cursor: pointer; margin-left: auto; }
  .cesto-header-selectall .cesto-check-box { width: 16px; height: 16px; }
  .cesto-header-selectall .cesto-select-all-label { font-size: 0.75rem; color: #666; font-weight: 500; }
  .cesto-header-limpar {
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFB800;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-family: inherit;
  }
  .cesto-header-limpar svg { width: 14px; height: 14px; }
  .cesto-header-mobile .cesto-busca-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 1rem;
    background: #f5f5f5;
    margin: 0 0.75rem 0.5rem;
  }
  .cesto-header-mobile .cesto-busca-icon { width: 16px; height: 16px; color: #999; flex-shrink: 0; }
  .cesto-header-mobile .cesto-busca-input { flex: 1; border: none; outline: none; font-size: 0.82rem; font-family: inherit; color: #333; background: transparent; }
  .cesto-header-mobile .cesto-busca-input::placeholder { color: #aaa; }
  .cesto-header-mobile .cesto-busca-clear { display: none; align-items: center; justify-content: center; width: 18px; height: 18px; background: none; border: none; cursor: pointer; color: #999; flex-shrink: 0; padding: 0; }

  .cesto-paginacao { display: none; }
  .cesto-section-title,
  .cesto-produtos-header { display: none !important; }
  .cesto-col-right .cesto-resumo-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0.75rem 1rem;
    max-height: 45vh;
    overflow-y: auto;
  }
  .cesto-col-right .cesto-resumo-titulo {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #222;
    margin: 0;
  }
  .cesto-col-right .cesto-resumo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
  }
  .cesto-col-right .cesto-resumo-linha {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #555;
  }
  .cesto-col-right .cesto-resumo-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
    color: #222;
    border-top: 1px solid #eee;
    padding-top: 6px;
    margin-top: 2px;
  }
  .cesto-col-right .cesto-resumo-total span:last-child {
    color: #FFB800;
  }
  .cesto-col-right .cesto-finalizar-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    margin: 0;
  }
}
