/*
 * Cart, checkout, account and order tracking. These pages have no board in the handoff, so they
 * reuse the design language: white panels with thin lines, teal primary button, 10px inputs.
 * Both the block (Cart/Checkout blocks) and the classic shortcode versions are covered.
 */

.page-content {
  padding-top: 24px;
}

.page-content--woo {
  max-width: 1080px;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--r-thumb);
  background: var(--mint);
  color: var(--body-strong);
  font-size: var(--text-base);
  list-style: none;
}

.woocommerce-error,
.wc-block-components-notice-banner.is-error {
  background: var(--promo-tint);
  color: var(--promo);
}

.woocommerce-message .button,
.woocommerce-info .button {
  margin-left: auto;
}

/* Form fields */
.woocommerce form .form-row,
.woocommerce-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
}

.woocommerce form .form-row label {
  font-size: var(--text-meta);
  font-weight: 600;
}

.woocommerce form .input-text,
.woocommerce form select,
.woocommerce-Input,
.woocommerce form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-input);
  font-size: var(--text-base);
}

.woocommerce form .input-text:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--teal-ring);
}

.required {
  color: var(--promo);
  text-decoration: none;
}

/* Buttons */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--surface);
  border-radius: var(--r-pill);
  background: var(--soft-fill);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 600;
}

.woocommerce .button.alt,
.woocommerce button[type="submit"].button,
.woocommerce .checkout-button,
#place_order,
.wc-block-components-button:not(.is-link):not(.wc-block-components-totals-coupon__button) {
  border-color: var(--teal-edge);
  background: var(--primary-fill);
  box-shadow: var(--shadow-btn);
  color: var(--on-dark);
  font-weight: 700;
}

.wc-block-components-button:not(.is-link) {
  min-height: 46px;
  border-radius: var(--r-pill);
}

.woocommerce .button:hover {
  transform: translateY(-1px);
}

/* Tables (classic cart, orders, order details) */
.shop_table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  font-size: var(--text-base);
}

.shop_table th,
.shop_table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--track);
  text-align: left;
  vertical-align: middle;
}

.shop_table thead th {
  color: var(--muted);
  font-size: var(--text-meta);
  font-weight: 600;
}

.shop_table img {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  object-fit: cover;
}

.shop_table .product-remove a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tab-track);
  color: var(--muted);
  font-size: 18px;
}

.cart-collaterals,
.woocommerce-checkout-review-order,
.woocommerce-order-details,
.woocommerce-customer-details,
.order-shipment {
  margin-top: 24px;
}

.cart_totals h2,
.woocommerce-order-details__title,
.woocommerce-column__title,
#order_review_heading,
.order-shipment h2 {
  margin-bottom: 12px;
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-price);
}

.order-shipment {
  padding: 18px 20px;
  border-radius: var(--r-card);
}

.order-shipment p {
  margin-bottom: 12px;
  color: var(--body);
}

/* Checkout block and cart block */
.wc-block-cart,
.wc-block-checkout {
  font-family: var(--font);
}

/* Cross-sells in the Cart block render through the Product Collection block. */
.wc-block-product .wp-block-post-title {
  font-size: var(--text-base) !important;
  font-weight: 600;
  line-height: 1.35;
}

.wc-block-product .wp-block-post-title a,
.wc-block-components-product-name {
  color: var(--ink);
  text-decoration: none;
}

.wc-block-components-product-button__button {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--surface);
  border-radius: var(--r-pill);
  background: var(--soft-fill);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-size: var(--text-meta);
  font-weight: 600;
  text-decoration: none;
}

.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block {
  border-color: var(--track);
}

.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select select {
  border-color: var(--line-strong) !important;
  border-radius: var(--r-md) !important;
}

.wc-block-components-text-input.is-active input:focus,
.wc-block-components-combobox .wc-block-components-combobox-control input:focus {
  border-color: var(--teal-ring) !important;
  box-shadow: 0 0 0 1px var(--teal-ring) !important;
}

.wc-block-components-radio-control__input:checked {
  border-color: var(--teal-to) !important;
}

.wc-block-components-radio-control__input:checked::before {
  background: var(--teal-to) !important;
}

.wc-block-components-product-name {
  font-weight: 600;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-weight: 800;
}

/* Account */
.woocommerce-account .page-content--woo .entry-content > .woocommerce {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.woocommerce-MyAccount-navigation a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-weight: 600;
}

.woocommerce-MyAccount-navigation .is-active a {
  background: var(--mint);
  color: var(--teal-strong);
}

.woocommerce-MyAccount-content,
.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-form-track-order,
.woocommerce-ResetPassword {
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-form-track-order,
.woocommerce-ResetPassword {
  max-width: 480px;
}

.u-columns.col2-set {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.u-columns h2 {
  margin-bottom: 12px;
  font-size: var(--text-xl);
}

/* Order received */
.woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  font-size: var(--text-meta);
  color: var(--muted);
}

.woocommerce-order-overview strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-base);
}

.woocommerce-thankyou-order-received {
  font-size: var(--text-lg);
  font-weight: 700;
}

@media (max-width: 767px) {
  .page-content {
    padding-top: 16px;
  }

  .woocommerce-account .page-content--woo .entry-content > .woocommerce,
  .u-columns.col2-set {
    grid-template-columns: minmax(0, 1fr);
  }

  .woocommerce-MyAccount-navigation ul {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .woocommerce-MyAccount-navigation a {
    white-space: nowrap;
  }

  .shop_table_responsive thead {
    display: none;
  }

  .shop_table_responsive tr,
  .shop_table_responsive td {
    display: block;
  }

  .shop_table_responsive td[data-title]::before {
    content: attr(data-title) ": ";
    color: var(--muted);
    font-weight: 600;
  }
}
