/* TFD Diseña · carrito, checkout, «gracias» y «Mi cuenta» con la misma cara que dtf.tfdcustoms.com (Félix, 21-oct-2026:
 * «el cliente no tiene que darse cuenta de que tenemos algo en HTML y algo en WordPress»). Solo en esas páginas. */
body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-account {
  --tfd-noche: #0B2A4A; --tfd-noche-2: #123a63; --tfd-amarillo: #FFB100; --tfd-negro: #151413;
  --tfd-hueso: #F2F5F8; --tfd-texto: #1d2733; --tfd-suave: #5b6777; --tfd-borde: #dfe4ea; --tfd-radio: 14px;
  font-family: Montserrat, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--tfd-hueso);
  color: var(--tfd-texto);
}
body.woocommerce-cart .entry.content-bg, body.woocommerce-checkout .entry.content-bg, body.woocommerce-account .entry.content-bg {
  background: transparent; box-shadow: none;
}

/* Ancho y título de la página */
body .entry-content .wp-block-woocommerce-cart, body .entry-content .wp-block-woocommerce-checkout,
body.woocommerce-account .entry-content .woocommerce, body.woocommerce-order-received .entry-content .woocommerce {
  max-width: 1180px !important; width: auto !important; margin: 28px auto 48px !important; padding: 0 16px !important; box-sizing: border-box;
}
.wp-block-woocommerce-cart::before, .wp-block-woocommerce-checkout::before {
  display: block; margin: 0 0 18px; font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; color: var(--tfd-noche); letter-spacing: -.01em;
}
.wp-block-woocommerce-cart::before { content: "Tu carrito"; }
.wp-block-woocommerce-checkout::before { content: "Ya casi: completa tu orden"; }
body.woocommerce-order-received .wp-block-woocommerce-checkout::before { content: none; }

/* Tarjetas */
.wc-block-cart__main, .wc-block-checkout__main, .wc-block-cart__sidebar, .wc-block-checkout__sidebar,
body.woocommerce-account .woocommerce-MyAccount-content, body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-order-received .woocommerce-order {
  background: #fff; border: 1px solid var(--tfd-borde); border-radius: var(--tfd-radio); padding: 22px !important; box-sizing: border-box;
}
.wc-block-cart__sidebar, .wc-block-checkout__sidebar { box-shadow: 0 10px 30px rgba(11, 42, 74, .08); }
@media (min-width: 782px) {
  .wc-block-checkout__sidebar.is-sticky, .wc-block-cart__sidebar { top: 24px; }
}

/* Títulos y textos */
.wc-block-components-title, .wc-block-components-checkout-step__title, .wc-block-cart__totals-title,
body.woocommerce-order-received h2, body.woocommerce-account h2, .wc-block-components-checkout-order-summary__title-text,
.wc-block-components-order-summary .wc-block-components-panel__button {
  font-family: inherit !important; font-weight: 800 !important; color: var(--tfd-noche) !important; font-size: 20px !important; text-transform: none !important; letter-spacing: 0 !important;
}
.wc-block-cart-items__header, .wc-block-cart-items th { color: var(--tfd-suave); font-weight: 700; font-size: 12px; letter-spacing: .08em; }
.wc-block-components-product-name { font-weight: 700 !important; color: var(--tfd-noche) !important; text-decoration: none !important; font-size: 16px; }
.wc-block-components-product-details, .wc-block-components-product-metadata { color: var(--tfd-suave); font-size: 14px; }
.wc-block-components-product-details__name { font-weight: 700; color: var(--tfd-texto); }
.wc-block-cart-item__image img, .wc-block-components-order-summary-item__image img { border-radius: 10px; background: #1d1d1d; }
.wc-block-components-checkout-step__description, .wc-block-components-checkbox__label, .wc-block-components-totals-item__description { color: var(--tfd-suave); }
body.woocommerce-cart a, body.woocommerce-checkout a, body.woocommerce-account .woocommerce a { color: var(--tfd-noche); }

/* Campos */
.wc-block-components-text-input input, .wc-block-components-text-input textarea, .wc-block-components-combobox .components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select, .wc-block-components-textarea,
body.woocommerce-account .woocommerce input.input-text, body.woocommerce-account .woocommerce select {
  border: 1.5px solid var(--tfd-borde) !important; border-radius: 12px !important; background: #fff !important; min-height: 54px; font-family: inherit !important; color: var(--tfd-texto) !important; box-shadow: none !important;
}
.wc-block-components-text-input input:focus, .wc-block-components-combobox .components-combobox-control input:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus, body.woocommerce-account .woocommerce input.input-text:focus {
  border-color: var(--tfd-noche) !important; box-shadow: 0 0 0 3px rgba(255, 177, 0, .35) !important; outline: none !important;
}
.wc-block-components-text-input label, .wc-blocks-components-select__label { color: var(--tfd-suave) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] { border-radius: 6px; border: 1.5px solid var(--tfd-suave); }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked { background: var(--tfd-noche); border-color: var(--tfd-noche); }
.wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: #fff; }

/* Opciones de envío y de pago */
.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option {
  border: 1.5px solid var(--tfd-borde) !important; border-radius: 12px !important; margin-bottom: 10px !important; box-shadow: none !important; background: #fff;
}
.wc-block-components-radio-control__option-checked, .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control__option--checked-option-highlighted {
  border-color: var(--tfd-noche) !important; box-shadow: inset 4px 0 0 var(--tfd-amarillo) !important;
}
.wc-block-components-radio-control__input:checked { border-color: var(--tfd-noche) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--tfd-noche) !important; }
.wc-block-components-radio-control__label { font-weight: 700; color: var(--tfd-texto); }

/* Botones */
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button, .wc-block-components-button:not(.is-link):not(.wc-block-components-panel__button),
body.woocommerce-account .woocommerce .button, body.woocommerce-order-received .woocommerce .button {
  background: var(--tfd-amarillo) !important; color: var(--tfd-negro) !important; border: 0 !important; border-radius: 12px !important;
  font-family: inherit !important; font-weight: 800 !important; font-size: 18px !important; min-height: 56px; text-transform: none !important; letter-spacing: 0 !important;
  box-shadow: 0 6px 16px rgba(255, 177, 0, .28) !important;
}
.wc-block-cart__submit-button:hover, .wc-block-components-checkout-place-order-button:hover, .wc-block-components-button:not(.is-link):hover,
body.woocommerce-account .woocommerce .button:hover { filter: brightness(.95); }
.wc-block-components-checkout-return-to-cart-button { color: var(--tfd-noche) !important; font-weight: 700; }
.wc-block-components-quantity-selector { border-radius: 10px !important; border: 1.5px solid var(--tfd-borde) !important; }
.wc-block-cart-item__remove-link { color: var(--tfd-suave) !important; }

/* Totales */
.wc-block-components-totals-item { color: var(--tfd-texto); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label { font-weight: 800; color: var(--tfd-noche); font-size: 18px; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-weight: 800; color: var(--tfd-noche); font-size: 24px; }
.wc-block-components-panel__button { font-weight: 700 !important; color: var(--tfd-noche) !important; }
.wc-block-components-totals-coupon-link, .wc-block-components-totals-coupon__button { color: var(--tfd-noche) !important; }

/* Encabezado del tema en celular: el botón del menú se perdía (azul sobre azul) */
body.woocommerce-cart .menu-toggle-open, body.woocommerce-checkout .menu-toggle-open, body.woocommerce-account .menu-toggle-open { color: #fff !important; }

/* Mensajes */
.wc-block-components-notice-banner { border-radius: 12px !important; }

/* «Mi cuenta» */
body.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
body.woocommerce-account .woocommerce-MyAccount-navigation li a { display: block; padding: 12px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--tfd-noche); color: #fff; box-shadow: inset 4px 0 0 var(--tfd-amarillo); }

@media (max-width: 600px) {
  .wc-block-cart__main, .wc-block-checkout__main, .wc-block-cart__sidebar, .wc-block-checkout__sidebar { padding: 16px !important; border-radius: 12px; }
  .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { margin-top: 18px !important; }
}

/* ── Con más vida (Félix, 21-oct-2026: «demasiado plain») ── */
/* Franja azul arriba, como la portada de la web; las tarjetas montan sobre ella */
body.woocommerce-cart .content-area, body.woocommerce-checkout .content-area {
  background: linear-gradient(180deg, var(--tfd-noche) 0, var(--tfd-noche-2) 230px, var(--tfd-hueso) 230px) !important;
  margin-top: 0 !important; padding-top: 0 !important;
}
body .entry-content .wp-block-woocommerce-cart, body .entry-content .wp-block-woocommerce-checkout { margin-top: 0 !important; padding-top: 34px !important; }
.wp-block-woocommerce-cart::before, .wp-block-woocommerce-checkout::before { color: #fff; margin-bottom: 6px; }
.wp-block-woocommerce-cart::after, .wp-block-woocommerce-checkout::after {
  content: "✓ Pago seguro   ·   ✓ Hecho en Humacao, Puerto Rico   ·   ✓ Te escribimos por WhatsApp con tu número de orden";
  display: block; order: -1; white-space: pre-wrap; color: rgba(255,255,255,.78); font-size: 14px; font-weight: 600; margin: 0 0 22px;
}
body.woocommerce-order-received .wp-block-woocommerce-checkout::after { content: none; }
/* el texto de confianza va entre el título y las tarjetas */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { display: flex !important; flex-direction: column; }
.wp-block-woocommerce-cart::after, .wp-block-woocommerce-checkout::after { order: 0; }
.wp-block-woocommerce-cart > *, .wp-block-woocommerce-checkout > * { order: 1; }

/* Tarjetas con sombra, sobre la franja */
.wc-block-cart__main, .wc-block-checkout__main { box-shadow: 0 18px 40px rgba(11, 42, 74, .14); border: 0 !important; }

/* Pasos numerados con círculo amarillo */
.wc-block-checkout__main { counter-reset: tfd-paso; }
.wc-block-components-checkout-step__title::before {
  counter-increment: tfd-paso; content: counter(tfd-paso);
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 10px;
  border-radius: 999px; background: var(--tfd-amarillo); color: var(--tfd-negro); font-size: 15px; font-weight: 800; vertical-align: 2px;
}
.wc-block-components-checkout-step { border-bottom: 1px dashed var(--tfd-borde); padding-bottom: 8px; margin-bottom: 18px !important; }
.wc-block-components-checkout-step:last-of-type { border-bottom: 0; }
.wc-block-components-checkout-step__container::after { display: none !important; } /* la raya gris del tema */

/* Resumen en azul noche, el total en amarillo */
.wc-block-checkout__sidebar, .wc-block-cart__sidebar { background: var(--tfd-noche) !important; border: 0 !important; color: #fff; }
.wc-block-checkout__sidebar *, .wc-block-cart__sidebar * { color: #fff; border-color: rgba(255,255,255,.14) !important; }
.wc-block-checkout__sidebar .wc-block-components-order-summary, .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block { border: 0 !important; background: transparent !important; }
.wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title-text, .wc-block-cart__totals-title { color: #fff !important; }
.wc-block-checkout__sidebar .wc-block-components-product-details, .wc-block-checkout__sidebar .wc-block-components-product-metadata,
.wc-block-checkout__sidebar .wc-block-components-totals-item__description { color: rgba(255,255,255,.72) !important; }
.wc-block-checkout__sidebar .wc-block-components-product-name, .wc-block-cart__sidebar .wc-block-components-product-name { color: #fff !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value, .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { color: var(--tfd-amarillo) !important; }
.wc-block-checkout__sidebar .wc-block-components-sale-badge, .wc-block-cart__sidebar .wc-block-components-sale-badge {
  background: var(--tfd-amarillo) !important; color: var(--tfd-negro) !important; border: 0 !important; border-radius: 999px; font-weight: 800;
}
.wc-block-checkout__sidebar .wc-block-components-product-price__regular { color: rgba(255,255,255,.5) !important; }
.wc-block-checkout__sidebar .wc-block-components-order-summary-item__quantity { background: var(--tfd-amarillo) !important; color: var(--tfd-negro) !important; border: 0 !important; box-shadow: none !important; }
.wc-block-cart__sidebar .wc-block-components-panel__button, .wc-block-checkout__sidebar .wc-block-components-panel__button { color: #fff !important; }
.wc-block-cart__sidebar .wc-block-components-totals-coupon input, .wc-block-checkout__sidebar .wc-block-components-totals-coupon input { color: var(--tfd-texto) !important; }

/* Botón de pagar con flecha */
.wc-block-components-checkout-place-order-button .wc-block-components-button__text::after, .wc-block-cart__submit-button .wc-block-components-button__text::after { content: "  →"; }

@media (max-width: 600px) {
  body.woocommerce-cart .content-area, body.woocommerce-checkout .content-area {
    background: linear-gradient(180deg, var(--tfd-noche) 0, var(--tfd-noche-2) 210px, var(--tfd-hueso) 210px) !important;
  }
  .wp-block-woocommerce-cart::after, .wp-block-woocommerce-checkout::after { font-size: 13px; content: "✓ Pago seguro  ·  ✓ Hecho en Humacao  ·  ✓ Te escribimos por WhatsApp"; }
}
