/*
  css/woocommerce-extra.css
  --------------------------------------------------------------------------
  Este arquivo é ADICIONAL — não substitui nem modifica style.css, form.css
  ou responsive.css originais. Estiliza a página dedicada do evento
  (page-eventos.php, seção .e55-evento-pagina) e o formulário de compra do
  WooCommerce (dropdown de variação, preço, botão) dentro dela, seguindo a
  mesma identidade visual "e55-*" já usada no resto do site.

  Ajuste cores/fontes aqui livremente sem risco de afetar o restante do site.
*/

.e55-evento-pagina {
  padding: 100px 0;
}

/* Mensagens de confirmação/erro do WooCommerce nesta página (ex: "produto adicionado ao carrinho") */
.e55-evento-pagina .woocommerce-message,
.e55-evento-pagina .woocommerce-error,
.e55-evento-pagina .woocommerce-info {
  display: block;
  padding: 16px 20px;
  margin-bottom: 28px;
  border-radius: 8px;
  background: var(--e55-blush);
  border-left: 4px solid var(--e55-wine);
  list-style: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
}

.e55-evento-pagina .woocommerce-message a {
  margin-left: 12px;
  color: var(--e55-wine);
  font-weight: 700;
  text-decoration: underline;
}

.e55-evento-pagina__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.e55-evento-pagina__imagem img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

.e55-evento-pagina__descricao {
  margin: 20px 0 28px;
  color: var(--e55-muted);
}

.e55-evento-pagina__descricao p {
  margin-bottom: 12px;
}

.e55-evento-pagina__preco {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 28px;
  color: var(--e55-wine);
}

.e55-evento-pagina__preco del {
  opacity: 0.5;
  margin-right: 8px;
  font-size: 1.3rem;
}

@media (max-width: 782px) {
  .e55-evento-pagina__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------------------------------------------------------------------
   Formulário do WooCommerce (dropdown de variação + botão)
   --------------------------------------------------------------------- */

.e55-evento-pagina__cta .variations_form {
  max-width: 380px;
}

/* Remove a aparência de tabela padrão do WooCommerce, mantendo só o conteúdo */
.e55-evento-pagina__cta table.variations {
  width: 100%;
  border: none;
  margin: 0 0 4px;
}

.e55-evento-pagina__cta table.variations tr,
.e55-evento-pagina__cta table.variations td {
  border: none;
  padding: 0;
  background: none;
}

.e55-evento-pagina__cta table.variations td.label {
  display: block;
  padding-bottom: 8px;
}

.e55-evento-pagina__cta table.variations td.label label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #2b2b2b;
}

.e55-evento-pagina__cta table.variations td.value {
  display: block;
}

.e55-evento-pagina__cta table.variations select {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: #2b2b2b;
  appearance: auto;
  cursor: pointer;
}

.e55-evento-pagina__cta table.variations select:focus {
  outline: none;
  border-color: var(--e55-wine);
}

.e55-evento-pagina__cta a.reset_variations {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  color: var(--e55-wine);
  text-decoration: underline;
}

/* Preço da variação selecionada (some antes de escolher uma opção) */
.e55-evento-pagina__cta .woocommerce-variation-price {
  margin: 16px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--e55-wine);
}

.e55-evento-pagina__cta .woocommerce-variation-price .price {
  font-size: 1em;
}

.e55-evento-pagina__cta .woocommerce-variation-availability {
  margin-bottom: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
}

/* Linha com quantidade + botão, lado a lado */
.e55-evento-pagina__cta .woocommerce-variation-add-to-cart,
.e55-evento-pagina__cta .cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.e55-evento-pagina__cta .quantity {
  margin: 0;
}

.e55-evento-pagina__cta .quantity .qty,
.e55-evento-pagina__cta .quantity input[type="number"] {
  width: 64px;
  padding: 13px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
}

/* Botão "Adicionar ao carrinho" no mesmo estilo do .e55-btn usado no resto do site */
.e55-evento-pagina__cta .single_add_to_cart_button.button,
.e55-evento-pagina__cta .add_to_cart_button.button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 26px !important;
  margin: 0 !important;
  border: 1px solid var(--e55-wine) !important;
  border-radius: 4px !important;
  background: var(--e55-wine) !important;
  color: #fff !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: -0.15px;
  text-decoration: none;
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
}

.e55-evento-pagina__cta .single_add_to_cart_button.button:hover,
.e55-evento-pagina__cta .add_to_cart_button.button:hover {
  transform: translateY(-2px);
  background: #4c1c38 !important;
  border-color: #4c1c38 !important;
  box-shadow: 0 8px 18px #57368026;
}

.e55-evento-pagina__cta .single_add_to_cart_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------------------------------------------------------------------
   4) Página de Carrinho e Checkout (usam o wrapper padrão .woocommerce)
   --------------------------------------------------------------------- */

body.woocommerce-cart article,
body.woocommerce-checkout article {
  padding: 0;
}

body.woocommerce-cart article > h1,
body.woocommerce-checkout article > h1 {
  max-width: 1040px;
  margin: 60px auto 0;
  padding: 0 24px;
  font: 600 clamp(28px, 4vw, 40px)/1.15 var(--e55-serif);
  color: var(--e55-ink);
}

body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 100px;
  font-family: 'Poppins', sans-serif;
  color: var(--e55-ink);
}

/* Mensagens (cupom aplicado, erro, item removido etc.) */
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-error,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-error,
body.woocommerce-checkout .woocommerce-info {
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: 8px;
  background: var(--e55-blush);
  border-left: 4px solid var(--e55-wine);
  list-style: none;
  font-size: 0.9rem;
}

body.woocommerce-cart .woocommerce-message a,
body.woocommerce-checkout .woocommerce-message a {
  color: var(--e55-wine);
  font-weight: 600;
}

/* Tabela de itens do carrinho */
body.woocommerce-cart table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}

body.woocommerce-cart table.shop_table thead th {
  padding: 14px 12px;
  border-bottom: 2px solid var(--e55-ink);
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}

body.woocommerce-cart table.shop_table td {
  padding: 18px 12px;
  border-bottom: 1px solid var(--e55-line);
  vertical-align: middle;
}

body.woocommerce-cart table.shop_table td.product-thumbnail img {
  width: 72px;
  height: auto;
  border-radius: 8px;
}

body.woocommerce-cart table.shop_table td.product-name a {
  color: var(--e55-ink);
  font-weight: 600;
  text-decoration: none;
}

body.woocommerce-cart table.shop_table .product-remove a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--e55-blush);
  color: var(--e55-wine) !important;
  font-size: 16px;
}

body.woocommerce-cart .quantity .qty {
  width: 64px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--e55-line);
  text-align: center;
  font-family: 'Poppins', sans-serif;
  transition: .25s;
}

body.woocommerce-cart .quantity .qty:focus {
  outline: none;
  border-color: var(--e55-wine);
  box-shadow: 0 0 0 3px #b1005820;
}

/* Cupom de desconto */
body.woocommerce-cart .coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

body.woocommerce-cart .coupon .input-text {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--e55-line);
  font-family: 'Poppins', sans-serif;
  transition: .25s;
}

/* Mesmo padrão de foco usado no formulário da Hero (.e55-form-input:focus) */
body.woocommerce-cart .coupon .input-text:focus {
  outline: none;
  border-color: var(--e55-wine);
  box-shadow: 0 0 0 3px #b1005820;
}

/* Botões (Atualizar carrinho, Finalizar compra, etc.) */
body.woocommerce-cart .button,
body.woocommerce-checkout .button,
body.woocommerce-checkout #place_order {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px !important;
  margin: 0 !important;
  border: 1px solid var(--e55-wine) !important;
  border-radius: 4px !important;
  background: var(--e55-wine) !important;
  color: #fff !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: -.1px;
  text-decoration: none;
  cursor: pointer;
  transition: .3s;
  white-space: nowrap;
}

body.woocommerce-cart .button:hover,
body.woocommerce-checkout .button:hover,
body.woocommerce-checkout #place_order:hover {
  transform: translateY(-2px);
  background: #4c1c38 !important;
  border-color: #4c1c38 !important;
  box-shadow: 0 8px 18px #57368026;
}

body.woocommerce-cart .button.disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

/* Caixa "Totais do carrinho" (lado direito) */
body.woocommerce-cart .cart_totals {
  max-width: 420px;
  margin-left: auto;
  padding: 28px;
  background: var(--e55-blush);
  border-radius: 12px;
  box-shadow: 0 10px 30px #b1005812;
}

body.woocommerce-cart .cart_totals h2 {
  margin: 0 0 16px;
  font: 600 22px/1.2 var(--e55-serif);
}

body.woocommerce-cart .cart_totals table.shop_table td,
body.woocommerce-cart .cart_totals table.shop_table th {
  border-bottom: 1px solid var(--e55-line);
  padding: 12px 0;
  font-size: .9rem;
}

body.woocommerce-cart .cart_totals table.shop_table th {
  font-weight: 500;
  color: var(--e55-muted);
}

/* Linha "Total" com mais destaque que o Subtotal (peso normal acima) */
body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
  border-top: 2px solid var(--e55-ink);
  border-bottom: none;
  padding-top: 14px;
}

body.woocommerce-cart .cart_totals .order-total th {
  font-size: 1rem;
  font-weight: 700;
  color: var(--e55-ink);
}

body.woocommerce-cart .cart_totals .order-total .amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--e55-wine);
}

/* Botão "Finalizar compra" ocupando toda a largura do card */
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
  width: 100%;
  margin-top: 8px !important;
}

/* ---------------------------------------------------------------------
   Checkout: campos de endereço/pagamento
   --------------------------------------------------------------------- */

body.woocommerce-checkout .col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 782px) {
  body.woocommerce-checkout .col2-set {
    grid-template-columns: 1fr;
  }

  body.woocommerce-cart .cart_totals,
  body.woocommerce-checkout #order_review {
    max-width: 100%;
    margin-left: 0;
    padding: 22px;
  }

  body.woocommerce-checkout .woocommerce-billing-fields,
  body.woocommerce-checkout .woocommerce-shipping-fields,
  body.woocommerce-checkout .woocommerce-additional-fields {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  body.woocommerce-cart table.shop_table.cart {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  body.woocommerce-cart table.shop_table td.product-thumbnail img {
    width: 56px;
  }
}

body.woocommerce-checkout h3 {
  margin: 0 0 20px;
  font: 600 24px/1.2 var(--e55-serif);
}

body.woocommerce-checkout .form-row {
  margin-bottom: 16px;
}

body.woocommerce-checkout label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .3px;
}

body.woocommerce-checkout input.input-text,
body.woocommerce-checkout select,
body.woocommerce-checkout textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--e55-line);
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  background: #fff;
  transition: .25s;
}

body.woocommerce-checkout input.input-text:focus,
body.woocommerce-checkout select:focus,
body.woocommerce-checkout textarea:focus {
  outline: none;
  border-color: var(--e55-wine);
  box-shadow: 0 0 0 3px #b1005820;
}

/* Cards em volta das seções "Informações de contato / Endereço de cobrança"
   e observações do pedido, no mesmo padrão de card usado no restante do site. */
body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .woocommerce-additional-fields {
  padding: 24px;
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid var(--e55-line);
  border-radius: 12px;
}

body.woocommerce-checkout .col-1 > *:last-child,
body.woocommerce-checkout .col-2 > *:last-child {
  margin-bottom: 0;
}

/* Título "Seu pedido" (fica fora de #order_review no template padrão do WooCommerce) */
body.woocommerce-checkout #order_review_heading {
  margin: 0 0 16px;
  font: 600 22px/1.2 var(--e55-serif);
  color: var(--e55-ink);
}

/* Resumo do pedido (tabela à direita) — mesmo tratamento de card do Total do Carrinho */
body.woocommerce-checkout #order_review {
  padding: 28px;
  background: var(--e55-blush);
  border-radius: 12px;
  box-shadow: 0 10px 30px #b1005812;
}

body.woocommerce-checkout table.shop_table {
  width: 100%;
  border-collapse: collapse;
}

body.woocommerce-checkout table.shop_table td,
body.woocommerce-checkout table.shop_table th {
  padding: 12px 0;
  border-bottom: 1px solid var(--e55-line);
  text-align: left;
  font-size: .9rem;
}

body.woocommerce-checkout table.shop_table th {
  font-weight: 500;
  color: var(--e55-muted);
}

/* Linha "Total" com mais destaque que o Subtotal (peso normal acima) */
body.woocommerce-checkout .order-total th,
body.woocommerce-checkout .order-total td {
  border-top: 2px solid var(--e55-ink);
  border-bottom: none;
  padding-top: 14px;
}

body.woocommerce-checkout .order-total th {
  font-size: 1rem;
  font-weight: 700;
  color: var(--e55-ink);
}

body.woocommerce-checkout .order-total .amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--e55-wine);
}

/* Métodos de pagamento (Pix, Cartão, etc. do Mercado Pago) */
body.woocommerce-checkout ul.wc_payment_methods {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

body.woocommerce-checkout ul.wc_payment_methods li.wc_payment_method {
  margin-bottom: 10px;
  padding: 14px 18px;
  border: 1px solid var(--e55-line);
  border-radius: 10px;
  background: #fff;
}

body.woocommerce-checkout ul.wc_payment_methods li.wc_payment_method label {
  display: inline;
  margin: 0 0 0 8px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* Estado selecionado (borda/fundo na cor da marca) — apenas reforço visual,
   não interfere na lógica de seleção do gateway. */
body.woocommerce-checkout ul.wc_payment_methods li.wc_payment_method:has(input.input-radio:checked) {
  border-color: var(--e55-wine);
  background: var(--e55-blush);
}

body.woocommerce-checkout .payment_box {
  margin-top: 12px;
  padding: 14px;
  background: var(--e55-cream);
  border-radius: 8px;
  font-size: .85rem;
  color: var(--e55-muted);
}

#place_order {
  width: 100%;
  margin-top: 12px !important;
}
