/* CFV Packaging UI - alinhado com WooCommerce/Storefront (v2 com disponibilidade dentro da 1ª coluna) */

.cfv-pkg-wrap{
  margin: 18px 0 10px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.cfv-pkg-title{
  margin: 0 0 6px;
  font-size: 1.0em;
  line-height: 1.25;
}

.cfv-pkg-help{
  margin: 0 0 12px;
  opacity: 1;
  font-size: 13px;
}

.cfv-pkg-status{
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.03);
}
.single-product input[type="number"].cfv-pkg-qty {
    background: #f2f2f2 !important;
    appearance: auto;
}
td.cfv-pkg-col-qty {
    display: flex;
    justify-content: center;
    justify-self: center;
}
form.cart.cfv-pkg-mismatch .cfv-pkg-status{
  border-color: rgb(143 75 228);
  box-shadow: 0 0 0 3px #8f4be43d;
  font-size: 14px;
}

/* Tabela */
.cfv-pkg-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: transparent;
}

.cfv-pkg-table thead th{
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
}

.cfv-pkg-table td{
  padding: 12px 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.cfv-pkg-table tbody tr:last-child td{
  border-bottom: 0;
}

/* Colunas */
.cfv-pkg-col-name{
  width: auto;
}

.cfv-pkg-col-qty{
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

/* Nome + imagem */
.cfv-pkg-name-wrap{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cfv-pkg-thumb{
  width: 46px;
  height: auto;
  border-radius: 10px;
  flex: 0 0 auto;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

a.cfv-pkg-name{
  display: inline-block;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: break-spaces;
  white-space: nowrap;
  max-width: 100%;
}

a.cfv-pkg-name:hover{
  text-decoration: underline;
}

/* Disponibilidade agora é texto secundário dentro da 1ª coluna */
.cfv-pkg-col-availability{
  margin: 6px 0 0;
  font-size: .92em;
  opacity: .85;
  line-height: 1.3;
}

.cfv-pkg-oos{
  font-weight: 700;
}

/* Input quantidade */
.cfv-pkg-qty{
  width: 92px;
  max-width: 100%;
  padding: .45em .55em;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  line-height: 1.2;
  font-size: 1em;
  text-align: center;
}

.cfv-pkg-qty:focus{
  outline: none;
  border-color: rgba(0,0,0,.35);
  box-shadow: 0 0 0 3px rgba(0,0,0,.10);
}

.cfv-pkg-qty:disabled{
  opacity: .6;
  cursor: not-allowed;
  background: rgba(0,0,0,.03);
}

/* Quantidade bloqueada no carrinho */
.cfv-locked-qty{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
}

/* Label para linhas de embalagem no carrinho */
.cfv-packaging-item-label{
  opacity: .85;
}
.single-product table.cfv-pkg-table {
    border-spacing: 5px;
    width: 100%;
    border-collapse: separate;
    -webkit-border-vertical-spacing: 0;
}
/* Responsivo: em mobile, linhas tipo “cartão” e quantidade em linha própria */
@media (max-width: 640px){
  .cfv-pkg-wrap{
    padding: 14px;
  }

  .cfv-pkg-table thead{
    display: none;
  }

  .cfv-pkg-table,
  .cfv-pkg-table tbody,
  .cfv-pkg-table tr,
  .cfv-pkg-table td{
    display: block;
    width: 100%;
  }

  .cfv-pkg-table tr{
    margin: 0 0 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(255,255,255,.85);
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }

  .cfv-pkg-table td{
    border: 0;
    padding: 0;
  }

  /* Primeira coluna com nome + disponibilidade */
  .cfv-pkg-col-name{
    padding: 0 0 10px;
    border-bottom: 1px dashed rgba(0,0,0,.12);
    margin-bottom: 10px;
  }

  /* Segunda coluna (quantidade) com label */
  .cfv-pkg-col-qty{
    text-align: left;
  }

  .cfv-pkg-col-qty::before{
    content: "Quantidade";
    display: block;
    font-weight: 600;
    opacity: .75;
    margin-bottom: 6px;
  }

  .cfv-pkg-qty{
    width: 100%;
    text-align: center;
  }

  /* Evitar overflow do link no mobile */
  a.cfv-pkg-name{
    white-space: normal;
  }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce){
  .cfv-pkg-wrap,
  .cfv-pkg-thumb,
  .cfv-pkg-qty{
    transition: none !important;
  }
}
