/*
 * 1. Quick view modal (YITH WooCommerce Quick View)
 * 2. Checkout page (fields, select2 and notices are shared with My account)
 * 3. My account page
 *
 * Selectors are prefixed (modal/content ids, body.woocommerce-checkout) on
 * purpose: they have to win over the plugin stylesheet, WooCommerce core and
 * gb-new-style.css.
 */

/* ==========================================================================
   1. Quick view modal
   ========================================================================== */

/* ---------- Overlay & positioning ---------- */

#yith-quick-view-modal.yith-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

#yith-quick-view-modal.yith-modal .yith-quick-view-overlay {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* The plugin centers the wrapper with inline left/top/width/height. */
#yith-quick-view-modal.yith-modal .yith-wcqv-wrapper {
  position: relative;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: 520px;
  height: auto !important;
  margin: 0;
  text-align: start;
}

#yith-quick-view-modal.yith-modal .yith-wcqv-wrapper .yith-wcqv-main {
  position: relative;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  padding: 0;
  overflow: hidden;
  border-radius: 24px !important;
  box-shadow: 0 40px 80px -24px rgba(23, 15, 51, 0.45) !important;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

#yith-quick-view-modal.yith-modal.open .yith-wcqv-wrapper .yith-wcqv-main {
  transform: none;
}

/* ---------- Close button ---------- */

#yith-quick-view-modal .yith-wcqv-head {
  top: 16px;
  right: auto;
  inset-inline-end: 16px;
  width: 40px;
  height: 40px;
}

#yith-quick-view-modal .yith-quick-view-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gb-white);
  color: var(--gb-heading);
  box-shadow: 0 6px 18px -6px rgba(23, 15, 51, 0.35);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

#yith-quick-view-modal .yith-quick-view-close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

#yith-quick-view-modal .yith-quick-view-close:hover,
#yith-quick-view-modal .yith-quick-view-close:focus-visible {
  background: var(--gb-primary);
  color: var(--gb-white);
  transform: rotate(90deg);
}

/* ---------- Layout ---------- */

#yith-quick-view-modal #yith-quick-view-content {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gb-light-border) transparent;
}

#yith-quick-view-modal #yith-quick-view-content div.product {
  height: auto !important;
}

#yith-quick-view-modal #yith-quick-view-content div[id^="product-"] {
  position: relative;
  display: block;
}

/* ---------- Image ---------- */

#yith-quick-view-modal #yith-quick-view-content div.images {
  position: relative;
  float: none;
  width: auto !important;
  margin: 0;
  padding: 0;
  aspect-ratio: 1 / 1;
  background: var(--gb-light-bg);
}

#yith-quick-view-modal #yith-quick-view-content div.images a {
  position: absolute;
  inset: 12px;
  display: block;
  height: auto;
  max-height: none;
  overflow: hidden;
  border-radius: 16px;
  cursor: zoom-in;
}

#yith-quick-view-modal #yith-quick-view-content div.images img {
  display: block;
  width: 100% !important;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: gb-qv-image 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#yith-quick-view-modal #yith-quick-view-content div.images a:hover img {
  transform: scale(1.06);
}

#yith-quick-view-modal #yith-quick-view-content span.onsale {
  position: absolute;
  top: 26px;
  right: auto;
  left: auto;
  inset-inline-start: 26px;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gb-tertiary);
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px -8px rgba(23, 15, 51, 0.5);
}

/* ---------- Summary ---------- */

#yith-quick-view-modal #yith-quick-view-content div.summary {
  float: none;
  width: auto !important;
  max-height: none;
  margin: 0;
  padding: 28px 22px 30px;
  overflow: visible;
  font-size: 15px;
  background-image: radial-gradient(420px 240px at 100% 0%, rgba(97, 51, 255, 0.08), transparent 70%);
  background-repeat: no-repeat;
}

[dir="rtl"] #yith-quick-view-modal #yith-quick-view-content div.summary {
  background-image: radial-gradient(420px 240px at 0% 0%, rgba(97, 51, 255, 0.08), transparent 70%);
}

#yith-quick-view-modal #yith-quick-view-content .summary-content > * {
  animation: gb-qv-rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#yith-quick-view-modal #yith-quick-view-content .summary-content > *:nth-child(2) {
  animation-delay: 0.06s;
}

#yith-quick-view-modal #yith-quick-view-content .summary-content > *:nth-child(3) {
  animation-delay: 0.12s;
}

#yith-quick-view-modal #yith-quick-view-content .summary-content > *:nth-child(4) {
  animation-delay: 0.18s;
}

#yith-quick-view-modal #yith-quick-view-content .summary-content > *:nth-child(n + 5) {
  animation-delay: 0.24s;
}

#yith-quick-view-modal #yith-quick-view-content .product_title {
  margin: 0 0 12px;
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

#yith-quick-view-modal #yith-quick-view-content .woocommerce-product-rating {
  margin: 0 0 12px;
}

#yith-quick-view-modal #yith-quick-view-content .summary .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--gb-light-border);
  color: var(--gb-primary);
  font-family: var(--gb-font-heading) !important;
  font-size: 30px;
  font-weight: 700 !important;
  line-height: 1.1;
}

#yith-quick-view-modal #yith-quick-view-content .summary .price ins {
  order: -1;
  margin: 0;
  background: none;
  text-decoration: none;
}

#yith-quick-view-modal #yith-quick-view-content .summary .price del {
  margin: 0;
  color: var(--gb-dark-border);
  font-size: 16px;
  font-weight: 400;
  opacity: 1;
}

#yith-quick-view-modal #yith-quick-view-content .woocommerce-product-details__short-description {
  margin: 0 0 22px;
  padding: 0;
  color: var(--gb-secondary);
  line-height: 1.7;
}

#yith-quick-view-modal #yith-quick-view-content .woocommerce-product-details__short-description p {
  margin: 0 0 10px;
  font-size: 15px;
}

#yith-quick-view-modal #yith-quick-view-content .summary .stock {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(40, 197, 119, 0.12);
  color: #17804c;
  font-size: 13px;
  font-weight: 500;
}

#yith-quick-view-modal #yith-quick-view-content .summary .stock.out-of-stock {
  background: rgba(226, 61, 61, 0.1);
  color: #c22f2f;
}

/* ---------- Quantity + add to cart ---------- */

#yith-quick-view-modal #yith-quick-view-content form.cart {
  margin: 0 0 26px;
}

#yith-quick-view-modal #yith-quick-view-content form.cart:not(.variations_form):not(.grouped_form),
#yith-quick-view-modal #yith-quick-view-content .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* WooCommerce clearfix pseudo elements would become flex items. */
#yith-quick-view-modal #yith-quick-view-content form.cart::before,
#yith-quick-view-modal #yith-quick-view-content form.cart::after {
  display: none;
}

#yith-quick-view-modal #yith-quick-view-content .quantity.cart-plus-minus {
  display: inline-flex;
  align-items: center;
  float: none;
  height: 54px;
  margin: 0;
  padding: 5px;
  box-sizing: border-box;
  border: 1px solid var(--gb-light-border);
  border-radius: 999px;
  background: var(--gb-light-bg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#yith-quick-view-modal #yith-quick-view-content .quantity.cart-plus-minus:focus-within {
  border-color: var(--gb-primary);
  box-shadow: 0 0 0 4px rgba(97, 51, 255, 0.12);
}

#yith-quick-view-modal #yith-quick-view-content .quantity.cart-plus-minus input.qty {
  width: 46px !important;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

#yith-quick-view-modal .gb-qv-qty-btn {
  display: flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gb-white);
  color: var(--gb-heading);
  box-shadow: 0 2px 6px rgba(23, 15, 51, 0.1);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease, opacity 0.25s ease;
}

#yith-quick-view-modal .gb-qv-qty-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

#yith-quick-view-modal .gb-qv-qty-btn:hover:not(:disabled),
#yith-quick-view-modal .gb-qv-qty-btn:focus-visible {
  background: var(--gb-primary);
  color: var(--gb-white);
  outline: 0;
}

#yith-quick-view-modal .gb-qv-qty-btn:active:not(:disabled) {
  transform: scale(0.9);
}

#yith-quick-view-modal .gb-qv-qty-btn:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: not-allowed;
}

#yith-quick-view-modal #yith-quick-view-content .summary .single_add_to_cart_button {
  display: inline-flex;
  flex: 1 1 180px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  float: none;
  height: 54px;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--gb-gradient2);
  color: var(--gb-white);
  font-family: var(--gb-font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 14px 26px -12px rgba(97, 51, 255, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

#yith-quick-view-modal #yith-quick-view-content .summary .single_add_to_cart_button::before {
  content: "\f07a";
  font-family: var(--gb-font-awesome);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0;
}

#yith-quick-view-modal #yith-quick-view-content .summary .single_add_to_cart_button:hover {
  background: var(--gb-gradient2);
  color: var(--gb-white);
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -12px rgba(97, 51, 255, 0.8);
}

#yith-quick-view-modal #yith-quick-view-content .summary .single_add_to_cart_button.disabled,
#yith-quick-view-modal #yith-quick-view-content .summary .single_add_to_cart_button:disabled {
  opacity: 0.5;
  filter: none;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------- Variations ---------- */

#yith-quick-view-modal #yith-quick-view-content table.variations {
  margin: 0 0 16px;
}

#yith-quick-view-modal #yith-quick-view-content table.variations th,
#yith-quick-view-modal #yith-quick-view-content table.variations td {
  display: block;
  padding: 0;
  border: 0;
  text-align: start;
}

#yith-quick-view-modal #yith-quick-view-content table.variations label {
  margin: 0 0 6px;
  color: var(--gb-heading);
  font-size: 13px;
  font-weight: 600;
}

#yith-quick-view-modal #yith-quick-view-content table.variations select {
  width: 100%;
  max-width: none;
  height: 48px;
  margin: 0 0 12px;
  padding: 0 16px;
  border: 1px solid var(--gb-light-border);
  border-radius: 12px;
  background-color: var(--gb-white);
  color: var(--gb-heading);
}

#yith-quick-view-modal #yith-quick-view-content .reset_variations {
  color: var(--gb-secondary);
  font-size: 13px;
}

#yith-quick-view-modal #yith-quick-view-content .woocommerce-variation {
  margin-bottom: 14px;
}

/* ---------- Meta ---------- */

#yith-quick-view-modal #yith-quick-view-content .product_meta {
  display: grid;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--gb-light-border);
  font-size: 14px;
}

#yith-quick-view-modal #yith-quick-view-content .product_meta span {
  margin: 0 !important;
}

#yith-quick-view-modal #yith-quick-view-content .product_meta > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gb-secondary);
  font-weight: 500;
}

#yith-quick-view-modal #yith-quick-view-content .product_meta .sku {
  color: var(--gb-heading);
  font-weight: 600;
  letter-spacing: 0.02em;
}

#yith-quick-view-modal #yith-quick-view-content .product_meta a {
  display: inline-block;
  height: auto;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--gb-light-bg);
  color: var(--gb-heading);
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

#yith-quick-view-modal #yith-quick-view-content .product_meta a:hover {
  background: var(--gb-primary);
  color: var(--gb-white);
  transform: translateY(-2px);
}

/* ---------- Desktop: image left, scrolling summary right ---------- */

@media (min-width: 768px) {
  #yith-quick-view-modal.yith-modal {
    padding: 24px;
  }

  #yith-quick-view-modal.yith-modal .yith-wcqv-wrapper {
    max-width: 980px;
  }

  #yith-quick-view-modal #yith-quick-view-content {
    max-height: none;
    overflow: visible;
  }

  #yith-quick-view-modal #yith-quick-view-content div[id^="product-"] {
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  }

  #yith-quick-view-modal #yith-quick-view-content div.images {
    aspect-ratio: auto;
    min-height: min(540px, calc(100vh - 48px));
  }

  #yith-quick-view-modal #yith-quick-view-content div.images a {
    inset: 14px;
  }

  #yith-quick-view-modal #yith-quick-view-content span.onsale {
    top: 30px;
    inset-inline-start: 30px;
  }

  #yith-quick-view-modal #yith-quick-view-content div.summary {
    max-height: min(680px, calc(100vh - 48px));
    padding: 48px 44px 40px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gb-light-border) transparent;
  }

  /* Keeps the title clear of the close button. */
  #yith-quick-view-modal #yith-quick-view-content .product_title {
    padding-inline-end: 44px;
    font-size: 30px;
  }

  #yith-quick-view-modal #yith-quick-view-content .summary .price {
    font-size: 34px;
  }
}

/* ---------- Motion ---------- */

@keyframes gb-qv-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes gb-qv-image {
  from {
    transform: scale(1.08);
  }

  to {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #yith-quick-view-modal.yith-modal .yith-wcqv-wrapper .yith-wcqv-main,
  #yith-quick-view-modal #yith-quick-view-content .summary-content > *,
  #yith-quick-view-modal #yith-quick-view-content div.images img {
    animation: none;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   2. Checkout page
   ========================================================================== */

/* ---------- Layout ---------- */

body.woocommerce-checkout form.checkout {
  counter-reset: gb-checkout-step;
}

body.woocommerce-checkout form.checkout #customer_details > .col-lg-6:last-child {
  margin-top: 40px;
}

body.woocommerce-checkout .woocommerce-additional-fields {
  margin-top: 36px;
}

/* ---------- Section headings (numbered steps) ---------- */

body.woocommerce-checkout .woocommerce-billing-fields > h3,
body.woocommerce-checkout .woocommerce-additional-fields > h3,
body.woocommerce-checkout #order_review_heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  counter-increment: gb-checkout-step;
}

body.woocommerce-checkout .woocommerce-billing-fields > h3::before,
body.woocommerce-checkout .woocommerce-additional-fields > h3::before,
body.woocommerce-checkout #order_review_heading::before {
  content: counter(gb-checkout-step);
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gb-gradient2);
  color: var(--gb-white);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 16px -8px rgba(97, 51, 255, 0.7);
}

body.woocommerce-checkout #ship-to-different-address {
  margin: 30px 0 18px;
  font-size: 16px;
}

/* ---------- Fields ---------- */

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row {
  float: none;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  grid-column: 1 / -1;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row-first,
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row-last,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > .form-row-first,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > .form-row-last {
  grid-column: span 1;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row label {
  margin: 0 0 8px;
  color: var(--gb-heading);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row label .required {
  color: #e23d3d;
  text-decoration: none;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row label .optional {
  color: var(--gb-dark-border);
  font-weight: 400;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row input.input-text,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row textarea,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row select,
body.woocommerce-checkout .woocommerce form.checkout_coupon #coupon_code {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--gb-light-border);
  border-radius: 12px;
  outline: 0;
  background: var(--gb-light-bg);
  box-shadow: none;
  color: var(--gb-heading);
  font-size: 15px;
  text-align: start;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row textarea {
  height: 120px;
  min-height: 120px;
  padding: 14px 16px;
  line-height: 1.6;
  resize: vertical;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row input.input-text::placeholder,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row textarea::placeholder {
  color: var(--gb-dark-border);
  opacity: 1;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row input.input-text:focus,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row textarea:focus,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row select:focus,
body.woocommerce-checkout .woocommerce form.checkout_coupon #coupon_code:focus {
  border-color: var(--gb-primary);
  background: var(--gb-white);
  box-shadow: 0 0 0 4px rgba(97, 51, 255, 0.12);
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row.woocommerce-invalid input.input-text,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row.woocommerce-invalid textarea,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row.woocommerce-invalid .select2-selection {
  border-color: #e23d3d;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row .checkout-inline-error-message {
  margin: 6px 0 0;
  color: #e23d3d;
  font-size: 13px;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .form-row label.checkbox,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form .woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  cursor: pointer;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form input[type="checkbox"],
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce form input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gb-primary);
}

/* ---------- Select2 (country / state) ---------- */

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .select2-container--default .select2-selection--single {
  height: 52px;
  border: 1px solid var(--gb-light-border);
  border-radius: 12px;
  background: var(--gb-light-bg);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .select2-container--default.select2-container--open .select2-selection--single,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--gb-primary);
  border-radius: 12px;
  background: var(--gb-white);
  box-shadow: 0 0 0 4px rgba(97, 51, 255, 0.12);
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-inline-start: 16px;
  padding-inline-end: 44px;
  color: var(--gb-heading);
  font-size: 15px;
  line-height: 50px;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 1px;
  width: 44px;
  height: 50px;
}

/* Chevron instead of the default triangle. */
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow b {
  top: 50%;
  inset-inline-start: 50%;
  width: 8px;
  height: 8px;
  margin: -6px 0 0;
  margin-inline-start: -4px;
  border: solid var(--gb-secondary);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  transition: transform 0.25s ease, margin 0.25s ease;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  margin-top: -2px;
  border-color: var(--gb-primary);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-135deg);
}

/* The dropdown is appended to <body>, outside .woocommerce. */
:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container .select2-dropdown {
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid var(--gb-light-border);
  border-radius: 12px;
  box-shadow: 0 24px 40px -20px rgba(23, 15, 51, 0.35);
}

:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container .select2-dropdown--above {
  margin-top: -6px;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container--default .select2-search--dropdown {
  padding: 10px;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container--default .select2-search--dropdown .select2-search__field {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--gb-light-border);
  border-radius: 8px;
  outline: 0;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container--default .select2-results__option {
  padding: 10px 16px;
  font-size: 14px;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container--default .select2-results__option[aria-selected="true"],
:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container--default .select2-results__option[data-selected="true"] {
  background: var(--gb-light-bg);
  color: var(--gb-heading);
}

:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container--default .select2-results__option--highlighted[aria-selected],
:is(body.woocommerce-checkout, body.woocommerce-account) .select2-container--default .select2-results__option--highlighted[data-selected] {
  background: var(--gb-primary);
  color: var(--gb-white);
}

/* ---------- Notices, coupon & login ---------- */

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-info,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-message,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-error {
  margin: 0 0 24px;
  padding: 16px 20px;
  padding-inline-start: 52px;
  border: 1px dashed rgba(97, 51, 255, 0.3);
  border-radius: 14px;
  background: rgba(97, 51, 255, 0.05);
  color: var(--gb-secondary);
  font-size: 15px;
  line-height: 1.6;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-info::before,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-message::before,
:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-error::before {
  top: 16px;
  right: auto;
  left: auto;
  inset-inline-start: 20px;
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-error {
  border-color: rgba(226, 61, 61, 0.35);
  background: rgba(226, 61, 61, 0.06);
}

:is(body.woocommerce-checkout, body.woocommerce-account) .woocommerce .woocommerce-info a:not(.button) {
  color: var(--gb-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon,
body.woocommerce-checkout .woocommerce form.woocommerce-form-login {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid var(--gb-light-border);
  border-radius: 16px;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon > p:not(.form-row) {
  flex: 0 0 100%;
  margin: 0;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon .form-row {
  margin: 0;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon .form-row-first {
  flex: 1 1 220px;
  width: auto;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon .form-row-last {
  flex: 0 0 auto;
  width: auto;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon .clear {
  display: none;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon .button,
body.woocommerce-checkout .woocommerce form.woocommerce-form-login .button {
  height: 52px;
  padding: 0 28px !important;
  border-radius: 999px;
  background: var(--gb-heading);
  color: var(--gb-white);
  font-family: var(--gb-font-heading);
  font-weight: 600;
  transition: background 0.3s ease;
}

body.woocommerce-checkout .woocommerce form.checkout_coupon .button:hover,
body.woocommerce-checkout .woocommerce form.woocommerce-form-login .button:hover {
  background: var(--gb-primary);
  color: var(--gb-white);
}

/* ---------- Order summary card ---------- */

body.woocommerce-checkout .woocommerce #order_review {
  overflow: hidden;
  border: 1px solid var(--gb-light-border);
  border-radius: 20px;
  background: var(--gb-white);
  box-shadow: 0 30px 60px -40px rgba(23, 15, 51, 0.45);
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table tr {
  border: 0;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table th,
body.woocommerce-checkout .woocommerce #order_review table.shop_table td {
  padding: 16px 24px;
  border: 0;
  border-bottom: 1px dashed var(--gb-light-border);
  background: transparent;
  color: var(--gb-heading);
  font-size: 15px;
  line-height: 1.5;
  text-align: end !important;
  vertical-align: middle;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table th:first-child,
body.woocommerce-checkout .woocommerce #order_review table.shop_table td:first-child {
  text-align: start !important;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table thead th {
  padding: 14px 24px;
  border-bottom: 0;
  background: var(--gb-light-bg);
  color: var(--gb-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table td.product-name {
  font-weight: 500;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table .product-quantity {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(97, 51, 255, 0.1);
  color: var(--gb-primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table td.product-total,
body.woocommerce-checkout .woocommerce #order_review table.shop_table tfoot td {
  font-weight: 600;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table tfoot th {
  color: var(--gb-secondary);
  font-weight: 500;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table tfoot tr.order-total th,
body.woocommerce-checkout .woocommerce #order_review table.shop_table tfoot tr.order-total td {
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 0;
  color: var(--gb-heading);
  font-size: 16px;
  font-weight: 600;
}

body.woocommerce-checkout .woocommerce #order_review table.shop_table tfoot tr.order-total .amount {
  color: var(--gb-primary);
  font-family: var(--gb-font-heading);
  font-size: 24px;
  font-weight: 700;
}

/* ---------- Payment ---------- */

body.woocommerce-checkout .woocommerce #payment {
  border-top: 1px solid var(--gb-light-border);
  border-radius: 0;
  background: var(--gb-light-bg);
}

body.woocommerce-checkout .woocommerce #payment ul.payment_methods {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gb-light-border);
}

body.woocommerce-checkout .woocommerce #payment ul.payment_methods li {
  padding: 6px 0;
  line-height: 1.6;
}

body.woocommerce-checkout .woocommerce #payment ul.payment_methods li > label {
  display: inline;
  margin-inline-start: 8px;
  color: var(--gb-heading);
  font-weight: 600;
  cursor: pointer;
}

body.woocommerce-checkout .woocommerce #payment ul.payment_methods li input[type="radio"] {
  vertical-align: middle;
}

body.woocommerce-checkout .woocommerce #payment div.payment_box {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--gb-white);
  color: var(--gb-secondary);
  font-size: 14px;
}

body.woocommerce-checkout .woocommerce #payment div.payment_box::before {
  border-bottom-color: var(--gb-white);
}

body.woocommerce-checkout .woocommerce #payment .woocommerce-info {
  margin: 0;
  background: var(--gb-white);
}

body.woocommerce-checkout .woocommerce #payment div.form-row.place-order {
  margin: 0;
  padding: 20px 24px 24px;
}

body.woocommerce-checkout .woocommerce #payment .woocommerce-privacy-policy-text p {
  margin: 0 0 18px;
  color: var(--gb-secondary);
  font-size: 13px;
  line-height: 1.7;
}

body.woocommerce-checkout .woocommerce #payment .woocommerce-terms-and-conditions-wrapper .form-row {
  margin: 0 0 18px;
}

body.woocommerce-checkout .woocommerce #payment #place_order {
  display: block;
  float: none;
  width: 100%;
  height: 56px;
  padding: 0 28px !important;
  border-radius: 999px;
  background: var(--gb-gradient2);
  color: var(--gb-white);
  font-family: var(--gb-font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 14px 26px -12px rgba(97, 51, 255, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

body.woocommerce-checkout .woocommerce #payment #place_order:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -12px rgba(97, 51, 255, 0.8);
}

body.woocommerce-checkout .woocommerce #payment #place_order:disabled {
  opacity: 0.5;
  filter: none;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------- Responsive ---------- */

@media (max-width: 575px) {
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-checkout .woocommerce #order_review table.shop_table th,
  body.woocommerce-checkout .woocommerce #order_review table.shop_table td,
  body.woocommerce-checkout .woocommerce #order_review table.shop_table thead th {
    padding-inline-start: 16px;
    padding-inline-end: 16px;
  }

  body.woocommerce-checkout .woocommerce #payment ul.payment_methods {
    padding: 16px;
  }

  body.woocommerce-checkout .woocommerce #payment div.form-row.place-order {
    padding: 16px 16px 20px;
  }
}

@media (min-width: 992px) {
  body.woocommerce-checkout form.checkout #customer_details > .col-lg-6:first-child {
    width: 57%;
    padding-inline-end: 36px;
  }

  body.woocommerce-checkout form.checkout #customer_details > .col-lg-6:last-child {
    width: 43%;
    margin-top: 0;
  }
}

/* ==========================================================================
   3. My account page
   ========================================================================== */

/* ---------- Layout ---------- */

body.woocommerce-account div.woocommerce:has(> .woocommerce-MyAccount-navigation) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

body.woocommerce-account div.woocommerce:has(> .woocommerce-MyAccount-navigation)::before,
body.woocommerce-account div.woocommerce:has(> .woocommerce-MyAccount-navigation)::after {
  display: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
  float: none;
  width: auto;
}

/* ---------- Navigation ---------- */

body.woocommerce-account .woocommerce-MyAccount-navigation {
  padding: 10px;
  border: 1px solid var(--gb-light-border);
  border-radius: 20px;
  background: var(--gb-white);
  box-shadow: 0 30px 60px -44px rgba(23, 15, 51, 0.45);
}

/* Small screens: one row of pills that scrolls sideways. */
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
  display: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--gb-secondary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a::before {
  content: "\f105";
  flex: 0 0 20px;
  width: 20px;
  font-family: var(--gb-font-awesome);
  font-size: 16px;
  font-weight: 300;
  text-align: center;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a::before {
  content: "\f3fd";
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a::before {
  content: "\f290";
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads a::before {
  content: "\f019";
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a::before {
  content: "\f3c5";
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--payment-methods a::before {
  content: "\f09d";
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a::before {
  content: "\f007";
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a::before {
  content: "\f2f5";
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  background: var(--gb-light-bg);
  color: var(--gb-primary);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  background: var(--gb-gradient2);
  color: var(--gb-white);
  box-shadow: 0 12px 22px -12px rgba(97, 51, 255, 0.75);
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
  background: rgba(226, 61, 61, 0.08);
  color: #c22f2f;
}

/* ---------- Content card ---------- */

body.woocommerce-account .woocommerce-MyAccount-content {
  padding: 24px 20px;
  border: 1px solid var(--gb-light-border);
  border-radius: 20px;
  background: var(--gb-white);
  color: var(--gb-secondary);
  font-size: 16px;
  line-height: 1.7;
}

body.woocommerce-account .woocommerce-MyAccount-content > :last-child {
  margin-bottom: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content p {
  margin: 0 0 16px;
}

body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
  margin: 0 0 16px;
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

body.woocommerce-account .woocommerce-MyAccount-content a:not(.button) {
  color: var(--gb-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(97, 51, 255, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s ease;
}

body.woocommerce-account .woocommerce-MyAccount-content a:not(.button):hover {
  text-decoration-color: var(--gb-primary);
}

body.woocommerce-account .woocommerce-MyAccount-content strong {
  color: var(--gb-heading);
}

body.woocommerce-account .woocommerce-MyAccount-content mark {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(97, 51, 255, 0.1);
  color: var(--gb-primary);
  font-weight: 600;
}

/* Dashboard greeting ("Hello ..."). */
body.woocommerce-account .woocommerce-MyAccount-navigation:has(.woocommerce-MyAccount-navigation-link--dashboard.is-active) ~ .woocommerce-MyAccount-content > p:first-of-type {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--gb-light-border);
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 20px;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */

body.woocommerce-account .woocommerce a.button,
body.woocommerce-account .woocommerce button.button,
body.woocommerce-account .woocommerce input.button {
  display: inline-block;
  padding: 15px 30px !important;
  border: 0;
  border-radius: 999px;
  background: var(--gb-primary);
  color: var(--gb-white);
  font-family: var(--gb-font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

body.woocommerce-account .woocommerce a.button:hover,
body.woocommerce-account .woocommerce button.button:hover,
body.woocommerce-account .woocommerce input.button:hover {
  background: var(--gb-heading);
  color: var(--gb-white);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -14px rgba(23, 15, 51, 0.6);
}

body.woocommerce-account .woocommerce table.shop_table .button,
body.woocommerce-account .woocommerce .woocommerce-info .button,
body.woocommerce-account .woocommerce .woocommerce-message .button {
  padding: 10px 20px !important;
  font-size: 13px;
}

/* Notice with an action button ("Browse products"). */
body.woocommerce-account .woocommerce .woocommerce-info,
body.woocommerce-account .woocommerce .woocommerce-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

body.woocommerce-account .woocommerce .woocommerce-info::after,
body.woocommerce-account .woocommerce .woocommerce-message::after {
  display: none;
}

body.woocommerce-account .woocommerce .woocommerce-info .button,
body.woocommerce-account .woocommerce .woocommerce-message .button {
  order: 1;
  float: none;
}

/* ---------- Tables (orders, downloads, order details) ---------- */

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
  width: 100%;
  margin: 0 0 28px;
  overflow: hidden;
  border: 1px solid var(--gb-light-border);
  border-radius: 16px;
  border-collapse: separate !important;
  border-spacing: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tr {
  border: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
  padding: 16px 18px;
  border: 0;
  border-top: 1px solid var(--gb-light-border);
  color: var(--gb-heading);
  font-size: 15px;
  line-height: 1.5;
  vertical-align: middle;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table thead th {
  border-top: 0;
  background: var(--gb-light-bg);
  color: var(--gb-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tfoot th {
  color: var(--gb-secondary);
  font-weight: 500;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tfoot td {
  font-weight: 600;
}

/* ---------- Addresses ---------- */

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 8px;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses::before,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses::after {
  display: none;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address {
  float: none;
  width: auto;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--gb-light-border);
  border-radius: 16px;
  background: var(--gb-light-bg);
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title::before,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title::after {
  display: none;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title h2,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
  float: none;
  margin: 0;
  font-size: 18px;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title a.edit {
  float: none;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--gb-white);
  color: var(--gb-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title a.edit:hover {
  background: var(--gb-primary);
  color: var(--gb-white);
}

body.woocommerce-account .woocommerce-MyAccount-content address {
  margin: 0;
  color: var(--gb-secondary);
  font-style: normal;
  line-height: 1.8;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details address {
  padding: 20px 24px;
  border: 1px solid var(--gb-light-border);
  border-radius: 16px;
  background: var(--gb-light-bg);
}

/* ---------- Forms (account details, address, login, register) ---------- */

body.woocommerce-account .woocommerce form .form-row-first,
body.woocommerce-account .woocommerce form .form-row-last {
  float: left;
  float: inline-start;
  width: calc(50% - 8px);
}

body.woocommerce-account .woocommerce form .form-row-last {
  float: right;
  float: inline-end;
}

body.woocommerce-account .woocommerce form .woocommerce-address-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

body.woocommerce-account .woocommerce form .woocommerce-address-fields__field-wrapper > .form-row-first,
body.woocommerce-account .woocommerce form .woocommerce-address-fields__field-wrapper > .form-row-last {
  width: 100%;
  grid-column: span 1;
}

body.woocommerce-account .woocommerce form fieldset {
  margin: 28px 0 22px;
  padding: 8px 24px 6px;
  border: 1px solid var(--gb-light-border);
  border-radius: 16px;
}

body.woocommerce-account .woocommerce form fieldset legend {
  float: none;
  width: auto;
  margin: 0;
  padding: 0 10px;
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 16px;
  font-weight: 600;
}

body.woocommerce-account .woocommerce form .form-row > span > em,
body.woocommerce-account .woocommerce form .form-row > em {
  display: block;
  margin-top: 6px;
  color: var(--gb-dark-border);
  font-size: 13px;
}

body.woocommerce-account .woocommerce form.login,
body.woocommerce-account .woocommerce form.register,
body.woocommerce-account .woocommerce form.lost_reset_password {
  margin: 0;
  padding: 28px 24px;
  border: 1px solid var(--gb-light-border);
  border-radius: 20px;
  background: var(--gb-white);
  box-shadow: 0 30px 60px -44px rgba(23, 15, 51, 0.45);
}

body.woocommerce-account .woocommerce form.login .button,
body.woocommerce-account .woocommerce form.register .button {
  display: block;
  width: 100%;
  margin-top: 16px;
}

body.woocommerce-account .woocommerce .lost_password {
  margin: 16px 0 0;
  text-align: center;
}

body.woocommerce-account .woocommerce .lost_password a {
  color: var(--gb-primary);
  font-weight: 500;
}

/* Login only (registration disabled): a single centered card. */
body.woocommerce-account div.woocommerce:has(> form.woocommerce-form-login),
body.woocommerce-account div.woocommerce:has(> form.lost_reset_password) {
  max-width: 520px;
  margin-inline: auto;
}

body.woocommerce-account div.woocommerce > h2,
body.woocommerce-account #customer_login h2 {
  margin: 0 0 18px;
  color: var(--gb-heading);
  font-family: var(--gb-font-heading);
  font-size: 24px;
  font-weight: 600;
}

body.woocommerce-account #customer_login {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

body.woocommerce-account #customer_login::before,
body.woocommerce-account #customer_login::after {
  display: none;
}

body.woocommerce-account #customer_login > div {
  float: none;
  width: auto;
}

/* ---------- Responsive ---------- */

@media (max-width: 575px) {
  body.woocommerce-account .woocommerce form .form-row-first,
  body.woocommerce-account .woocommerce form .form-row-last {
    float: none;
    width: 100%;
  }

  body.woocommerce-account .woocommerce form .woocommerce-address-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 768px) {
  body.woocommerce-account .woocommerce-MyAccount-content {
    padding: 36px;
  }

  body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses,
  body.woocommerce-account #customer_login {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.woocommerce-account .woocommerce form.login,
  body.woocommerce-account .woocommerce form.register,
  body.woocommerce-account .woocommerce form.lost_reset_password {
    padding: 36px;
  }
}

@media (min-width: 992px) {
  body.woocommerce-account div.woocommerce:has(> .woocommerce-MyAccount-navigation) {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation {
    position: sticky;
    top: 120px;
    padding: 12px;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    flex-direction: column;
    gap: 4px;
    overflow: visible;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation li a {
    padding: 13px 16px;
  }

  /* Log out sits apart from the rest. */
  body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--gb-light-border);
  }
}
