/* FDI Carrinho e Checkout Premium - WooCommerce Blocks */

body.page-id-7,
body.page-id-8 {
  background:
    radial-gradient(circle at 10% 8%, rgba(123,47,190,.09), transparent 25%),
    radial-gradient(circle at 90% 14%, rgba(0,170,255,.06), transparent 24%),
    linear-gradient(180deg, #FCFAFF 0%, #FFFFFF 48%, #F8F3FF 100%) !important;
  overflow-x: hidden !important;
}

body.page-id-7 .entry-content,
body.page-id-8 .entry-content,
body.page-id-7 .single-content,
body.page-id-8 .single-content {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.page-id-7 .wp-block-woocommerce-cart,
body.page-id-8 .wp-block-woocommerce-checkout {
  width: min(1240px, calc(100vw - 32px)) !important;
  max-width: 1240px !important;
  margin: 34px auto 64px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  font-family: 'Nunito', sans-serif !important;
}

body.page-id-7 .wp-block-woocommerce-cart::before,
body.page-id-8 .wp-block-woocommerce-checkout::before {
  display: block;
  margin: 0 0 22px;
  padding: 30px 34px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 10% 12%, rgba(255,255,255,.18), transparent 24%),
    linear-gradient(135deg, #2E1048 0%, #7B2FBE 100%);
  color: #FFFFFF;
  box-shadow: 0 22px 60px rgba(61,26,110,.14);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: .01em;
}

body.page-id-7 .wp-block-woocommerce-cart::before {
  content: 'Seu carrinho';
}

body.page-id-8 .wp-block-woocommerce-checkout::before {
  content: 'Finalizar compra';
}

/* Layout principal dos Woo Blocks */
body.page-id-7 .wp-block-woocommerce-filled-cart-block,
body.page-id-8 .wp-block-woocommerce-checkout {
  gap: 24px !important;
}

body.page-id-7 .wp-block-woocommerce-filled-cart-block,
body.page-id-8 .wc-block-components-sidebar-layout {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.page-id-7 .wc-block-components-sidebar-layout,
body.page-id-8 .wc-block-components-sidebar-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px) !important;
  gap: 24px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.page-id-7 .wc-block-components-main,
body.page-id-8 .wc-block-components-main,
body.page-id-7 .wc-block-components-sidebar,
body.page-id-8 .wc-block-components-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Cards base */
body.page-id-7 .wc-block-components-main,
body.page-id-8 .wc-block-components-main,
body.page-id-7 .wc-block-components-sidebar,
body.page-id-8 .wc-block-components-sidebar,
body.page-id-7 .wp-block-woocommerce-cart-items-block,
body.page-id-7 .wp-block-woocommerce-cart-totals-block,
body.page-id-8 .wp-block-woocommerce-checkout-fields-block,
body.page-id-8 .wp-block-woocommerce-checkout-totals-block,
body.page-id-7 .wp-block-woocommerce-product-collection,
body.page-id-7 .wc-block-cart__empty-cart__title,
body.page-id-7 .wp-block-woocommerce-empty-cart-block {
  border-radius: 28px !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(123,47,190,.10) !important;
  box-shadow: 0 18px 48px rgba(61,26,110,.07) !important;
  box-sizing: border-box !important;
}

body.page-id-7 .wp-block-woocommerce-cart-items-block,
body.page-id-8 .wp-block-woocommerce-checkout-fields-block,
body.page-id-8 .wc-block-components-main {
  padding: 26px !important;
}

body.page-id-7 .wp-block-woocommerce-cart-totals-block,
body.page-id-8 .wp-block-woocommerce-checkout-totals-block,
body.page-id-7 .wc-block-components-sidebar,
body.page-id-8 .wc-block-components-sidebar {
  padding: 24px !important;
  position: sticky !important;
  top: 96px !important;
}

/* Tipografia e títulos */
body.page-id-7 h1,
body.page-id-7 h2,
body.page-id-7 h3,
body.page-id-8 h1,
body.page-id-8 h2,
body.page-id-8 h3,
body.page-id-7 .wc-block-components-title,
body.page-id-8 .wc-block-components-title,
body.page-id-7 .wc-block-cart__totals-title,
body.page-id-8 .wc-block-components-checkout-step__title {
  color: #3D1A6E !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: .01em !important;
}

body.page-id-7 .wc-block-components-title,
body.page-id-8 .wc-block-components-title,
body.page-id-8 .wc-block-components-checkout-step__title {
  font-size: clamp(1.55rem, 2.2vw, 2.15rem) !important;
  line-height: 1.12 !important;
}

body.page-id-7 p,
body.page-id-8 p,
body.page-id-7 .wc-block-components-product-name,
body.page-id-8 .wc-block-components-product-name,
body.page-id-7 .wc-block-components-totals-item__label,
body.page-id-8 .wc-block-components-totals-item__label,
body.page-id-7 .wc-block-components-totals-item__value,
body.page-id-8 .wc-block-components-totals-item__value {
  color: #514963 !important;
  font-family: 'Nunito', sans-serif !important;
}

/* Correção de estouro geral */
body.page-id-7 *,
body.page-id-8 * {
  box-sizing: border-box !important;
  max-width: 100%;
}

body.page-id-7 table,
body.page-id-8 table,
body.page-id-7 .wc-block-cart-items,
body.page-id-8 .wc-block-components-order-summary,
body.page-id-7 .wc-block-components-panel,
body.page-id-8 .wc-block-components-panel {
  width: 100% !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

body.page-id-7 .wc-block-cart-items__row,
body.page-id-7 .wc-block-components-order-summary-item,
body.page-id-8 .wc-block-components-order-summary-item {
  border-color: rgba(123,47,190,.10) !important;
}

body.page-id-7 .wc-block-cart-items__row,
body.page-id-8 .wc-block-components-order-summary-item {
  background: #FFFFFF !important;
}

body.page-id-7 .wc-block-cart-item__image img,
body.page-id-8 .wc-block-components-order-summary-item__image img {
  border-radius: 16px !important;
  background: #FFFFFF !important;
  box-shadow: 0 8px 24px rgba(61,26,110,.05) !important;
}

body.page-id-7 .wc-block-components-product-name,
body.page-id-8 .wc-block-components-product-name {
  color: #3D1A6E !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

/* Campos */
body.page-id-7 input,
body.page-id-7 select,
body.page-id-7 textarea,
body.page-id-8 input,
body.page-id-8 select,
body.page-id-8 textarea,
body.page-id-7 .wc-block-components-text-input input,
body.page-id-8 .wc-block-components-text-input input,
body.page-id-8 .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
  min-height: 48px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(123,47,190,.16) !important;
  background: #FFFFFF !important;
  color: #3D1A6E !important;
  box-shadow: none !important;
}

body.page-id-7 input:focus,
body.page-id-8 input:focus,
body.page-id-8 textarea:focus,
body.page-id-8 select:focus {
  border-color: rgba(123,47,190,.45) !important;
  outline: 3px solid rgba(123,47,190,.10) !important;
}

body.page-id-7 label,
body.page-id-8 label,
body.page-id-8 .wc-block-components-text-input label,
body.page-id-8 .wc-block-components-combobox label {
  color: #6C647D !important;
  font-weight: 700 !important;
}

/* Botões do fluxo */
body.page-id-7 .wc-block-components-button,
body.page-id-8 .wc-block-components-button,
body.page-id-7 button,
body.page-id-8 button,
body.page-id-7 .wp-element-button,
body.page-id-8 .wp-element-button {
  min-height: 50px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #7B2FBE 0%, #9C52DE 100%) !important;
  color: #FFFFFF !important;
  border: 0 !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: 0 14px 32px rgba(123,47,190,.24) !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
}

body.page-id-7 .wc-block-components-button:hover,
body.page-id-8 .wc-block-components-button:hover,
body.page-id-7 button:hover,
body.page-id-8 button:hover,
body.page-id-7 .wp-element-button:hover,
body.page-id-8 .wp-element-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 18px 40px rgba(123,47,190,.32) !important;
}

body.page-id-7 .wc-block-cart__submit-button,
body.page-id-8 .wc-block-components-checkout-place-order-button {
  width: 100% !important;
  min-height: 56px !important;
  font-size: 1rem !important;
}

/* Resumo do pedido */
body.page-id-7 .wc-block-components-totals-wrapper,
body.page-id-8 .wc-block-components-totals-wrapper {
  border-color: rgba(123,47,190,.11) !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

body.page-id-7 .wc-block-components-totals-footer-item,
body.page-id-8 .wc-block-components-totals-footer-item {
  border-top: 1px solid rgba(123,47,190,.13) !important;
  margin-top: 12px !important;
  padding-top: 18px !important;
}

body.page-id-7 .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.page-id-8 .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.page-id-7 .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.page-id-8 .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: #3D1A6E !important;
  font-size: 1.12rem !important;
  font-weight: 950 !important;
}

/* Cupom */
body.page-id-7 .wc-block-components-panel__button,
body.page-id-8 .wc-block-components-panel__button {
  color: #3D1A6E !important;
  background: rgba(123,47,190,.06) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

/* Cross-sells / novo na loja */
body.page-id-7 .wp-block-woocommerce-product-collection,
body.page-id-7 .wp-block-woocommerce-empty-cart-block {
  margin-top: 24px !important;
  padding: 26px !important;
}

body.page-id-7 .wp-block-woocommerce-product-collection h2,
body.page-id-7 .wp-block-woocommerce-empty-cart-block h2 {
  color: #3D1A6E !important;
  font-size: clamp(1.75rem, 3vw, 2.55rem) !important;
}

body.page-id-7 .wp-block-post-title a {
  color: #3D1A6E !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.45rem !important;
  line-height: 1.1 !important;
  text-decoration: none !important;
}

body.page-id-7 .wc-block-grid__product,
body.page-id-7 .wp-block-post {
  border-radius: 22px !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFAFF 100%) !important;
  border: 1px solid rgba(123,47,190,.10) !important;
  box-shadow: 0 12px 30px rgba(61,26,110,.05) !important;
  padding: 16px !important;
}

/* Mensagens */
body.page-id-7 .wc-block-components-notice-banner,
body.page-id-8 .wc-block-components-notice-banner {
  border-radius: 18px !important;
  border-color: rgba(123,47,190,.14) !important;
  background: #FAF7FF !important;
  color: #3D1A6E !important;
}

/* Vazio */
body.page-id-7 .wp-block-woocommerce-empty-cart-block {
  text-align: center !important;
}

body.page-id-7 .wc-block-cart__empty-cart__title {
  padding: 34px !important;
  margin-bottom: 22px !important;
}

/* Checkout steps */
body.page-id-8 .wc-block-components-checkout-step {
  padding: 22px 0 !important;
  border-color: rgba(123,47,190,.10) !important;
}

body.page-id-8 .wc-block-components-checkout-step__heading {
  align-items: center !important;
}

body.page-id-8 .wc-block-components-checkout-step__container {
  padding-left: 0 !important;
}

body.page-id-8 .wc-block-components-checkout-step__content {
  padding-top: 10px !important;
}

/* Garante que nada vaze na sidebar */
body.page-id-7 .wc-block-components-sidebar > *,
body.page-id-8 .wc-block-components-sidebar > *,
body.page-id-7 .wp-block-woocommerce-cart-totals-block > *,
body.page-id-8 .wp-block-woocommerce-checkout-totals-block > * {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 980px) {
  body.page-id-7 .wc-block-components-sidebar-layout,
  body.page-id-8 .wc-block-components-sidebar-layout {
    display: block !important;
  }

  body.page-id-7 .wc-block-components-sidebar,
  body.page-id-8 .wc-block-components-sidebar,
  body.page-id-7 .wp-block-woocommerce-cart-totals-block,
  body.page-id-8 .wp-block-woocommerce-checkout-totals-block {
    position: static !important;
    margin-top: 22px !important;
  }

  body.page-id-7 .wp-block-woocommerce-cart::before,
  body.page-id-8 .wp-block-woocommerce-checkout::before {
    padding: 24px 22px !important;
    border-radius: 24px !important;
  }
}

@media (max-width: 680px) {
  body.page-id-7 .wp-block-woocommerce-cart,
  body.page-id-8 .wp-block-woocommerce-checkout {
    width: calc(100vw - 20px) !important;
    margin-top: 22px !important;
  }

  body.page-id-7 .wp-block-woocommerce-cart-items-block,
  body.page-id-8 .wp-block-woocommerce-checkout-fields-block,
  body.page-id-8 .wc-block-components-main,
  body.page-id-7 .wp-block-woocommerce-cart-totals-block,
  body.page-id-8 .wp-block-woocommerce-checkout-totals-block,
  body.page-id-7 .wc-block-components-sidebar,
  body.page-id-8 .wc-block-components-sidebar,
  body.page-id-7 .wp-block-woocommerce-product-collection,
  body.page-id-7 .wp-block-woocommerce-empty-cart-block {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  body.page-id-7 .wc-block-cart-items__row,
  body.page-id-8 .wc-block-components-order-summary-item {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  body.page-id-7 .wc-block-cart-item__wrap,
  body.page-id-8 .wc-block-components-order-summary-item__description {
    min-width: 0 !important;
  }

  body.page-id-7 .wc-block-components-button,
  body.page-id-8 .wc-block-components-button,
  body.page-id-7 button,
  body.page-id-8 button {
    width: 100% !important;
  }
}
