/* ==========================================================================
   GVB-SPES — Cart / Checkout (WooCommerce Blocks) + Account/Login (classic)
   Money path: parity + safe UX improvements only.
   ========================================================================== */

.gvb-page-hero--slim { padding: 30px var(--container-pad) 26px; }
.gvb-page-body { padding-top: 30px; padding-bottom: 56px; }

/* --------------------------------------------------------------------------
   WC BLOCKS — shared components
   -------------------------------------------------------------------------- */
/* Primary action buttons (checkout link, place order) */
.wc-block-components-button:not(.is-link) {
  background: var(--teal);
  color: #fff;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  padding: 14px 28px;
  transition: background var(--ease), box-shadow var(--ease);
}
.wc-block-components-button:not(.is-link):hover {
  background: var(--teal-d);
  box-shadow: var(--sh-h);
  color: #fff;
}

/* Inputs / selects / textareas */
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="url"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-select .components-custom-select-control__button,
.wc-block-components-textarea {
  border: 1px solid var(--border-d);
  border-radius: var(--r-s);
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
}
.wc-block-components-text-input input:focus,
.wc-block-components-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0, 154, 140, .15);
}
.wc-block-components-text-input label,
.wc-block-components-combobox label { font-family: var(--font-body); color: var(--text-m); }

/* Checkbox / radio accents */
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
  background: var(--teal);
  border-color: var(--teal);
}
.wc-block-components-radio-control__option { font-family: var(--font-body); }
.wc-block-components-radio-control__input:checked { border-color: var(--teal); background: radial-gradient(var(--teal) 40%, transparent 45%); }

/* Notices */
.wc-block-components-notice-banner {
  border-radius: var(--r-s);
  font-size: .88rem;
  /* robust flex layout so the status icon never overlaps the message text */
  display: flex;
  align-items: center;
  column-gap: 10px;
}
.wc-block-components-notice-banner > svg {
  flex: 0 0 auto;
  align-self: center;
  height: 1.6em;
  width: 1.6em;
}
.wc-block-components-notice-banner > .wc-block-components-notice-banner__content {
  flex: 1 1 auto;
  padding-left: 0;
}
.wc-block-components-notice-banner.is-info { border-color: var(--teal); }

/* Totals / order summary */
.wc-block-components-totals-wrapper,
.wc-block-components-totals-item { font-family: var(--font-body); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--teal-dd);
}

/* --------------------------------------------------------------------------
   CART (blocks)
   -------------------------------------------------------------------------- */
.wp-block-woocommerce-cart { font-family: var(--font-body); }
.wc-block-cart-items { border: none; }
.wc-block-cart-items th {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-m);
}
.wc-block-cart-items .wc-block-cart-item__image img {
  border-radius: var(--r-s);
  border: 1px solid var(--border);
}
.wc-block-components-product-name {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
}
.wc-block-components-product-name:hover { color: var(--teal); }
.wc-block-cart-item__prices,
.wc-block-cart-item__total .wc-block-components-product-price {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--teal-d);
}
.wc-block-components-quantity-selector {
  border: 1px solid var(--border-d);
  border-radius: var(--r-s);
}
.wc-block-components-quantity-selector::after { border: none; }
.wc-block-cart-item__remove-link { color: var(--text-m); font-size: .78rem; }
.wc-block-cart-item__remove-link:hover { color: #b23b3b; }

/* Cart sidebar (summary) as a card; sticky on desktop */
.wc-block-cart .wc-block-cart__sidebar,
.wc-block-checkout .wc-block-components-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  box-shadow: var(--sh-xs);
  padding: 20px 22px !important;
}
@media (min-width: 922px) {
  .wc-block-cart .wc-block-cart__sidebar,
  .is-large.wc-block-checkout .wc-block-components-sidebar {
    position: sticky;
    top: 96px;
  }
}

/* Empty cart: center + brand the CTA */
.wc-block-cart__empty-cart__title { font-family: var(--font-head); color: var(--text); }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__products .wc-block-grid__product {
  border: 1px solid var(--border);
  border-radius: var(--r-l);
}

/* --------------------------------------------------------------------------
   CHECKOUT (blocks)
   -------------------------------------------------------------------------- */
.wc-block-checkout__form { font-family: var(--font-body); }
.wc-block-components-checkout-step__heading .wc-block-components-title {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--text);
}
.wc-block-components-checkout-step__description { color: var(--text-m); font-size: .85rem; }

/* Payment methods */
.wc-block-components-payment-method-label { font-family: var(--font-head); font-weight: 700; color: var(--text); }
.wc-block-components-radio-control-accordion-option {
  border-color: var(--border);
}
.wc-block-components-radio-control-accordion-content { font-size: .85rem; color: var(--text-b); }

/* Place order button: full-width, prominent */
.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
  width: 100%;
  padding: 16px 28px;
  font-size: .9rem;
}

/* Return-to-cart link */
.wc-block-components-checkout-return-to-cart-button { color: var(--teal); }

/* --------------------------------------------------------------------------
   ACCOUNT (classic) — vertical nav card + content card
   -------------------------------------------------------------------------- */
.woocommerce-account .woocommerce {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
  flex: 0 0 230px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 12px 18px;
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-b);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background var(--ease), color var(--ease);
}
.woocommerce-account .woocommerce-MyAccount-navigation li:last-child a { border-bottom: none; }
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { background: var(--teal-ul); color: var(--teal); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  background: var(--teal-ul);
  color: var(--teal);
  font-weight: 700;
  border-left-color: var(--teal);
}
.woocommerce-account .woocommerce-MyAccount-content {
  flex: 1;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  box-shadow: var(--sh-xs);
  padding: 26px 28px;
}
@media (max-width: 921px) {
  .woocommerce-account .woocommerce { flex-direction: column; }
  .woocommerce-account .woocommerce-MyAccount-navigation { flex: 1 1 auto; width: 100%; }
  .woocommerce-account .woocommerce-MyAccount-content { width: 100%; padding: 20px 18px; }
}

/* Orders table */
.woocommerce-account table.shop_table {
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  border-collapse: separate;
  border-spacing: 0;
  font-size: .85rem;
}
.woocommerce-account table.shop_table th {
  background: var(--teal-ul);
  font-family: var(--font-head);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-b);
}
.woocommerce-account table.shop_table th,
.woocommerce-account table.shop_table td { border-bottom: 1px solid var(--border); padding: 10px 12px; }
.woocommerce-account table.shop_table tr:last-child td { border-bottom: none; }

/* Addresses */
.woocommerce-account .woocommerce-Addresses .woocommerce-Address { margin-bottom: 16px; }
.woocommerce-account .woocommerce-Address-title h3 { font-size: 1rem; }
.woocommerce-account .woocommerce-Address address {
  font-style: normal;
  color: var(--text-b);
  font-size: .88rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   LOGIN / REGISTER (classic form)
   -------------------------------------------------------------------------- */
.woocommerce-account:not(.logged-in) .woocommerce { display: block; }
.woocommerce form.woocommerce-form-login,
.woocommerce form.woocommerce-form-register {
  max-width: 440px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  box-shadow: var(--sh-s);
  padding: 28px 30px;
}
.woocommerce form .form-row label { font-size: .85rem; color: var(--text-b); font-weight: 600; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  border: 1px solid var(--border-d);
  border-radius: var(--r-s);
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
}
.woocommerce form .form-row input.input-text:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 154, 140, .15);
}
.woocommerce form .form-row .required { color: #b23b3b; }
.woocommerce .woocommerce-form-login .woocommerce-form-login__rememberme { margin-bottom: 10px; display: block; }
.woocommerce .lost_password { font-size: .8rem; }
.woocommerce .lost_password a { color: var(--teal); }

/* --------------------------------------------------------------------------
   THANK-YOU / ORDER RECEIVED
   -------------------------------------------------------------------------- */
.woocommerce-order .woocommerce-thankyou-order-received {
  background: var(--teal-ul);
  border: 1px solid var(--teal-l);
  border-radius: var(--r-l);
  color: var(--teal-dd);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 18px 22px;
  margin-bottom: 22px;
}
.woocommerce-order ul.woocommerce-thankyou-order-details {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.woocommerce-order ul.woocommerce-thankyou-order-details li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  padding: 10px 16px;
  font-size: .78rem;
  color: var(--text-m);
  margin: 0;
  border-right-width: 1px;
}
.woocommerce-order ul.woocommerce-thankyou-order-details li strong {
  display: block;
  font-family: var(--font-head);
  font-size: .9rem;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   EMPTY CART — coherent branded state (stock block looked foreign)
   -------------------------------------------------------------------------- */
.wc-block-cart__empty-cart__title,
.wp-block-woocommerce-empty-cart-block h2.wc-block-cart__empty-cart__title {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--text);
}
/* stock drawing icon -> brand-tinted, smaller */
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__image,
.wp-block-woocommerce-empty-cart-block img[alt=""] {
  max-width: 130px;
  opacity: .85;
  filter: hue-rotate(115deg) saturate(.8); /* stock purple -> teal family */
  margin-bottom: 6px;
}
/* "Browse store" button -> brand pill */
.wp-block-woocommerce-empty-cart-block .wp-block-button__link {
  background: var(--teal);
  color: #fff;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  padding: 13px 30px;
  transition: background var(--ease), box-shadow var(--ease);
}
.wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover {
  background: var(--teal-d);
  box-shadow: var(--sh-h);
}
/* "New in store" heading + product grid cards */
.wp-block-woocommerce-empty-cart-block h2 {
  font-family: var(--font-head);
  text-align: center;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  box-shadow: var(--sh-xs);
  overflow: hidden;
  padding: 0 0 12px;
  transition: box-shadow var(--ease), transform var(--ease);
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product:hover {
  box-shadow: var(--sh-m);
  transform: translateY(-2px);
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  font-size: .88rem;
  padding: 0 12px;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price {
  color: var(--teal-d);
  font-family: var(--font-head);
  font-weight: 700;
}
@media (max-width: 921px) {
  .wp-block-woocommerce-empty-cart-block .wc-block-grid__products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Empty-cart product grid: neutralize Woo's li widths inside our grid */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__products {
  display: grid !important;
  margin: 0;
  padding: 0;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link,
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product .add_to_cart_button {
  white-space: normal;
  writing-mode: horizontal-tb;
  width: calc(100% - 24px);
  margin: 0 auto;
  font-size: .72rem;
  padding: 10px 12px;
}
.wc-block-cart__empty-cart__image { color: var(--teal); }

/* Empty cart v2 — no stock icon, centered clinical composition */
.wc-block-cart__empty-cart__image { display: none !important; }
.wp-block-woocommerce-empty-cart-block {
  text-align: center;
}
.wp-block-woocommerce-empty-cart-block > .wp-block-columns,
.wp-block-woocommerce-empty-cart-block .wp-block-column {
  display: block;
  width: 100% !important;
  flex-basis: auto !important;
  text-align: center;
}
h2.wc-block-cart__empty-cart__title {
  font-size: 1.5rem;
  margin: 34px 0 6px;
}
.wp-block-woocommerce-empty-cart-block .wp-block-separator {
  border: none;
  height: 1px;
  background: var(--border);
  max-width: 320px;
  margin: 30px auto;
  opacity: 1;
}
.wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title) {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 22px;
}
.wp-block-woocommerce-empty-cart-block .wc-block-grid { margin-bottom: 20px; }

/* Brand icon above the empty-cart message — line-art cart matching the
   trust-section icon style, drawn in CSS so the page content stays a plain
   paragraph (editable in WP without touching the icon). */
.wp-block-woocommerce-empty-cart-block p.wp-block-paragraph.has-large-font-size::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  margin: 10px auto 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23009a8c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9.5' cy='20' r='1.5'/%3E%3Ccircle cx='17.5' cy='20' r='1.5'/%3E%3Cpath d='M2.5 3.5h2l2.6 12h11.2l1.9-8H6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* NIF under "Empresa" — the Additional Checkout Fields API always appends
   custom address fields after the phone; it exposes no ordering option yet,
   so the flex items are reordered visually. Applies to shipping AND billing
   forms (same component). Keyboard tab order still follows the DOM. */
.wc-block-components-address-form > .wc-block-components-address-form__address_1,
.wc-block-components-address-form > .wc-block-components-address-form__address_2,
.wc-block-components-address-form > .wc-block-components-address-form__address_2-toggle,
.wc-block-components-address-form > .wc-block-components-address-form__address_2-hidden-input,
.wc-block-components-address-form > .wc-block-components-address-form__postcode,
.wc-block-components-address-form > .wc-block-components-address-form__city,
.wc-block-components-address-form > .wc-block-components-address-form__state,
.wc-block-components-address-form > .wc-block-components-address-form__phone {
  order: 2;
}
.wc-block-components-address-form > .wc-block-components-address-form__gvbspes-tax-id {
  order: 1;
}

.gvb-secure-note {
  font-size: .78rem;
  color: var(--text-m);
  margin: 10px 2px 0;
}

.gvb-thankyou-back { margin: 26px 0 6px; }
