/* Genzaurra Cart & Checkout — WooCommerce Blocks and classic fallbacks */
.commerce-page {
  --commerce-ink: #11100f;
  --commerce-muted: #69635f;
  --commerce-line: rgba(17, 16, 15, 0.14);
  --commerce-card: rgba(255, 255, 255, 0.72);
  --commerce-violet: #7a61ff;
  position: relative;
  overflow: clip;
  padding: 78px 0 110px;
  background:
    radial-gradient(circle at 88% 10%, rgba(122, 97, 255, 0.10), transparent 25rem),
    radial-gradient(circle at 5% 54%, rgba(224, 205, 255, 0.20), transparent 26rem),
    #f7f3ee;
}

.commerce-page::before {
  position: absolute;
  top: 145px;
  right: -150px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(122, 97, 255, 0.14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.commerce-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  margin-bottom: 54px;
}

.commerce-hero__copy {
  max-width: 720px;
}

.commerce-hero h1 {
  max-width: 800px;
  margin: 16px 0 18px;
  font-size: clamp(52px, 6vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.commerce-hero__copy > p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--commerce-muted);
  font-size: 17px;
  line-height: 1.7;
}

.commerce-progress {
  display: flex;
  gap: 0;
  margin: 0 0 9px;
  padding: 0;
  list-style: none;
}

.commerce-progress li {
  position: relative;
  display: grid;
  min-width: 110px;
  gap: 7px;
  padding-top: 17px;
  border-top: 1px solid var(--commerce-line);
  color: #8c8580;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.commerce-progress li::before {
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border: 1px solid #aaa19b;
  border-radius: 50%;
  background: #f7f3ee;
  content: "";
}

.commerce-progress li span {
  font-size: 9px;
  letter-spacing: 0.16em;
}

.commerce-progress li.is-active,
.commerce-progress li.is-complete {
  border-color: var(--commerce-ink);
  color: var(--commerce-ink);
}

.commerce-progress li.is-active::before {
  border-color: var(--commerce-violet);
  background: var(--commerce-violet);
  box-shadow: 0 0 0 5px rgba(122, 97, 255, 0.12);
}

.commerce-progress li.is-complete::before {
  border-color: var(--commerce-ink);
  background: var(--commerce-ink);
}

.commerce-content {
  position: relative;
  z-index: 1;
}

.commerce-content__blocks,
.commerce-content__blocks > .wp-block-woocommerce-cart,
.commerce-content__blocks > .wp-block-woocommerce-checkout,
.commerce-content__blocks .wc-block-cart,
.commerce-content__blocks .wc-block-checkout {
  width: 100%;
  max-width: none;
}

/* WooCommerce Blocks layout */
.commerce-content .wc-block-cart,
.commerce-content .wc-block-checkout {
  gap: clamp(30px, 4vw, 62px);
  align-items: start;
}

.commerce-content .wc-block-cart__main,
.commerce-content .wc-block-checkout__main {
  width: calc(66% - 31px);
  padding-right: 0;
}

.commerce-content .wc-block-cart__sidebar,
.commerce-content .wc-block-checkout__sidebar {
  position: sticky;
  top: 28px;
  width: calc(34% - 31px);
  padding-left: 0;
}

.commerce-content .wc-block-components-sidebar-layout .wc-block-components-main {
  padding-right: 0;
}

.commerce-content .wc-block-components-sidebar {
  margin-top: 0;
}

/* Cart line items */
.commerce-content .wc-block-cart-items {
  border-collapse: separate;
  border-spacing: 0 12px;
}

.commerce-content .wc-block-cart-items thead th {
  padding: 0 18px 14px;
  border-bottom: 0;
  color: #726b66;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.commerce-content .wc-block-cart-items tbody tr,
.commerce-content .wc-block-components-order-summary-item {
  background: var(--commerce-card);
  box-shadow: inset 0 0 0 1px var(--commerce-line);
}

.commerce-content .wc-block-cart-items tbody td {
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 0;
}

.commerce-content .wc-block-cart-items tbody td:first-child {
  padding-left: 24px;
  border-radius: 22px 0 0 22px;
}

.commerce-content .wc-block-cart-items tbody td:last-child {
  padding-right: 24px;
  border-radius: 0 22px 22px 0;
}

.commerce-content .wc-block-cart-item__image,
.commerce-content .wc-block-components-order-summary-item__image {
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 52% 40%, rgba(122, 97, 255, 0.16), transparent 40%),
    #f0ebe6;
}

.commerce-content .wc-block-cart-item__image img,
.commerce-content .wc-block-components-order-summary-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.commerce-content .wc-block-cart-item__image {
  width: 104px;
}

.commerce-content .wc-block-components-product-name {
  color: var(--commerce-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

/* Descriptions make compact order summaries difficult to scan; names and prices remain. */
.commerce-content .wc-block-components-product-metadata__description {
  display: none;
}

.commerce-content .wc-block-components-product-details {
  color: var(--commerce-muted);
  font-size: 12px;
}

.commerce-content .wc-block-components-quantity-selector {
  min-height: 40px;
  border-color: var(--commerce-line);
  border-radius: 999px;
  background: #fff;
}

.commerce-content .wc-block-cart-item__remove-link {
  color: #756e69 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

/* Totals and checkout cards */
.commerce-content .wc-block-cart__sidebar,
.commerce-content .wc-block-checkout__sidebar,
.commerce-content .wc-block-checkout__main .wc-block-components-checkout-step {
  border: 1px solid var(--commerce-line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
}

.commerce-content .wc-block-cart__sidebar,
.commerce-content .wc-block-checkout__sidebar {
  overflow: hidden;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(31, 24, 20, 0.08);
}

.commerce-content .wc-block-checkout__main .wc-block-components-checkout-step {
  margin: 0 0 16px;
  padding: 25px 26px 22px;
}

.commerce-content .wc-block-components-checkout-step__heading {
  margin: 0 0 19px;
}

.commerce-content .wc-block-components-checkout-step__title,
.commerce-content .wc-block-components-title,
.commerce-content .wc-block-components-totals-wrapper strong {
  color: var(--commerce-ink);
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.025em;
}

.commerce-content .wc-block-components-checkout-step__description,
.commerce-content .wc-block-components-form .wc-block-components-text-input label,
.commerce-content .wc-block-components-checkbox__label,
.commerce-content .wc-block-components-radio-control__label {
  color: var(--commerce-muted);
}

.commerce-content .wc-block-components-text-input input,
.commerce-content .wc-block-components-combobox .wc-block-components-combobox-control input,
.commerce-content .wc-block-components-textarea {
  min-height: 54px;
  border: 1px solid #bcb4ae;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--commerce-ink);
}

.commerce-content .wc-block-components-text-input input:focus,
.commerce-content .wc-block-components-combobox .wc-block-components-combobox-control input:focus,
.commerce-content .wc-block-components-textarea:focus {
  border-color: var(--commerce-violet);
  box-shadow: 0 0 0 3px rgba(122, 97, 255, 0.12);
  outline: 0;
}

.commerce-content .wc-block-components-radio-control-accordion-option {
  margin: 8px 0;
  border: 1px solid var(--commerce-line);
  border-radius: 15px;
  background: #fff;
}

.commerce-content .wc-block-components-totals-wrapper {
  padding: 18px 0;
  border-color: var(--commerce-line);
}

.commerce-content .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.commerce-content .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-size: 20px;
  font-weight: 800;
}

.commerce-content .wc-block-components-order-summary {
  margin-bottom: 6px;
}

.commerce-content .wc-block-components-order-summary-item {
  margin: 10px 0;
  padding: 14px;
  border-radius: 17px;
}

.commerce-content .wc-block-components-order-summary-item__image {
  width: 70px;
  height: 82px;
}

/* Coupon is intentionally checkout-only. */
.woocommerce-cart .wp-block-woocommerce-cart-order-summary-coupon-form-block,
.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-coupon,
.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-panel--coupon {
  display: none !important;
}

.woocommerce-checkout .wc-block-components-totals-coupon {
  overflow: hidden;
  border: 1px solid var(--commerce-line);
  border-radius: 14px;
}

.commerce-content .wc-block-components-button,
.commerce-content .wp-element-button,
.commerce-content .button,
.commerce-content button[type="submit"] {
  min-height: 56px;
  border: 1px solid var(--commerce-ink);
  border-radius: 999px;
  background: var(--commerce-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 13px 30px rgba(53, 39, 115, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.commerce-content .wc-block-components-button:hover,
.commerce-content .wp-element-button:hover,
.commerce-content .button:hover,
.commerce-content button[type="submit"]:hover {
  transform: translateY(-2px);
  background: #2b2639;
  box-shadow: 0 17px 36px rgba(75, 54, 160, 0.25);
}

.commerce-content .wc-block-components-button:focus-visible,
.commerce-content .wp-element-button:focus-visible,
.commerce-content .button:focus-visible,
.commerce-content button[type="submit"]:focus-visible {
  outline: 3px solid rgba(122, 97, 255, 0.4);
  outline-offset: 3px;
}

.commerce-content .wc-block-components-checkout-place-order-button,
.commerce-content .wc-block-cart__submit-button {
  width: 100%;
}

.commerce-content .wc-block-components-validation-error,
.commerce-content .wc-block-components-notice-banner {
  border-radius: 14px;
}

/* Classic WooCommerce fallbacks */
.commerce-content .woocommerce-cart-form,
.commerce-content .cart-collaterals,
.commerce-content form.checkout,
.commerce-content .woocommerce-order {
  padding: 26px;
  border: 1px solid var(--commerce-line);
  border-radius: 24px;
  background: var(--commerce-card);
}

.commerce-content form.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 42px;
}

.commerce-content form.checkout #customer_details,
.commerce-content form.checkout #order_review,
.commerce-content form.checkout #order_review_heading {
  width: 100%;
}

.commerce-content form.checkout #order_review_heading {
  align-self: end;
  margin: 0;
}

.commerce-content .form-row input.input-text,
.commerce-content .form-row textarea,
.commerce-content .select2-container .select2-selection {
  min-height: 50px;
  border: 1px solid #bcb4ae;
  border-radius: 12px;
  background: #fff;
}

.commerce-content .woocommerce-error,
.commerce-content .woocommerce-info,
.commerce-content .woocommerce-message {
  border-radius: 14px;
  background: #fff;
}

.commerce-assurance {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 62px;
  border-top: 1px solid var(--commerce-line);
  border-bottom: 1px solid var(--commerce-line);
}

.commerce-assurance article {
  display: flex;
  min-height: 150px;
  gap: 18px;
  padding: 30px 25px;
  border-right: 1px solid var(--commerce-line);
}

.commerce-assurance article:last-child {
  border-right: 0;
}

.commerce-assurance article > span {
  padding-top: 3px;
  color: var(--commerce-violet);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.commerce-assurance strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.commerce-assurance p {
  margin: 0;
  color: var(--commerce-muted);
  font-size: 12px;
  line-height: 1.55;
}

.commerce-page--received .commerce-content__blocks {
  max-width: 920px;
  margin-inline: auto;
}

@media (max-width: 960px) {
  .commerce-page {
    padding-top: 60px;
  }

  .commerce-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 34px;
  }

  .commerce-progress {
    width: 100%;
  }

  .commerce-progress li {
    flex: 1;
    min-width: 0;
  }

  .commerce-content .wc-block-cart,
  .commerce-content .wc-block-checkout {
    display: block;
  }

  .commerce-content .wc-block-cart__main,
  .commerce-content .wc-block-checkout__main,
  .commerce-content .wc-block-cart__sidebar,
  .commerce-content .wc-block-checkout__sidebar {
    width: 100%;
  }

  .commerce-content .wc-block-cart__sidebar,
  .commerce-content .wc-block-checkout__sidebar {
    position: static;
    margin-top: 28px;
  }

  .commerce-content form.checkout {
    grid-template-columns: 1fr;
  }

  .commerce-assurance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commerce-assurance article:nth-child(2) {
    border-right: 0;
  }

  .commerce-assurance article:nth-child(-n+2) {
    border-bottom: 1px solid var(--commerce-line);
  }
}

@media (max-width: 600px) {
  .commerce-page {
    padding: 48px 0 76px;
  }

  .commerce-page::before {
    display: none;
  }

  .commerce-hero {
    gap: 28px;
    margin-bottom: 36px;
  }

  .commerce-hero h1 {
    margin: 12px 0 15px;
    font-size: clamp(42px, 13vw, 58px);
  }

  .commerce-hero__copy > p:last-child {
    font-size: 15px;
  }

  .commerce-progress li {
    font-size: 9px;
  }

  .commerce-content .wc-block-cart__sidebar,
  .commerce-content .wc-block-checkout__sidebar,
  .commerce-content .wc-block-checkout__main .wc-block-components-checkout-step,
  .commerce-content .woocommerce-cart-form,
  .commerce-content .cart-collaterals,
  .commerce-content form.checkout,
  .commerce-content .woocommerce-order {
    border-radius: 19px;
    padding: 18px;
  }

  /* Compact only the visible total rows. Do not change WooCommerce's parent
     layout: recent versions manage separate desktop and mobile summaries. */
  .commerce-content .wc-block-checkout__main
  .wp-block-woocommerce-checkout-order-summary-subtotal-block,
  .commerce-content .wc-block-checkout__main
  .wp-block-woocommerce-checkout-order-summary-shipping-block,
  .commerce-content .wc-block-checkout__main
  .wp-block-woocommerce-checkout-order-summary-total-block {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
  }

  .commerce-content .wc-block-checkout__main
  .wp-block-woocommerce-checkout-order-summary-subtotal-block
  > .wc-block-components-totals-wrapper,
  .commerce-content .wc-block-checkout__main
  .wp-block-woocommerce-checkout-order-summary-shipping-block
  > .wc-block-components-totals-wrapper,
  .commerce-content .wc-block-checkout__main
  .wp-block-woocommerce-checkout-order-summary-total-block
  > .wc-block-components-totals-wrapper {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 13px 0 !important;
  }

  .commerce-content .wc-block-checkout__main
  .wc-block-components-totals-item {
    min-height: 0 !important;
    margin: 0 !important;
  }

  .commerce-content .wc-block-checkout__main
  .wp-block-woocommerce-checkout-order-summary-block {
    min-height: 0 !important;
    height: auto !important;
  }

  /* Current WooCommerce versions render the complete mobile summary inside
     the main form. Hide the redundant collapsed desktop sidebar underneath. */
  .commerce-content .wc-block-checkout__sidebar {
    display: none !important;
  }

  .commerce-content .wc-block-cart-items tbody td {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .commerce-content .wc-block-cart-items {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
  }

  .commerce-content .wc-block-cart-items tbody tr {
    width: 100%;
    max-width: 100%;
  }

  .commerce-content .wc-block-cart-item__product {
    width: 100% !important;
    min-width: 0;
    padding-right: 14px;
    border-radius: 18px !important;
  }

  /* The item price is already displayed below its name on mobile. Hiding the
     duplicate line-total column prevents Woo Blocks from widening the row. */
  .commerce-content .wc-block-cart-items th.wc-block-cart-items__header-total,
  .commerce-content .wc-block-cart-item__total {
    display: none !important;
  }

  .commerce-content .wc-block-cart-item__wrap,
  .commerce-content .wc-block-cart-item__product > div {
    min-width: 0;
    max-width: 100%;
  }

  .commerce-content .wc-block-components-product-name,
  .commerce-content .wc-block-components-product-price {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .commerce-content .wc-block-cart-items tbody td:first-child {
    padding-left: 14px;
    border-radius: 18px 0 0 18px;
  }

  .commerce-content .wc-block-cart-items tbody td:last-child {
    padding-right: 14px;
    border-radius: 0 18px 18px 0;
  }

  .commerce-content .wc-block-cart-item__image {
    min-width: 64px;
    width: 72px;
  }

  .commerce-content .wc-block-components-product-name {
    font-size: 14px;
  }

  .commerce-assurance {
    grid-template-columns: 1fr;
    margin-top: 44px;
  }

  .commerce-assurance article,
  .commerce-assurance article:nth-child(2) {
    min-height: 0;
    padding: 22px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--commerce-line);
  }

  .commerce-assurance article:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .commerce-content .wc-block-components-button,
  .commerce-content .wp-element-button,
  .commerce-content .button,
  .commerce-content button[type="submit"] {
    transition: none;
  }
}
