/* ============================================================
   Cart Page (Figma Design) — cart-page.css
   Breakpoints: ≤359 Mobile | 360–809 Tablet | 810–1279 Desktop | 1280–1919 Desktop | ≥1920 XL
   ============================================================ */

/* --- Variables --- */

@import url('variables.css');

:root {
  --cart-bg-page:    #0a0a0a;
  --cart-bg-panel:   #141414;
  --cart-bg-header:  #292929;
  --cart-bg-topbar:  #2b2e30;
  --cart-bg-qty:     #3d3d3d;
  --cart-bg-input:   #2e2d2d;
  --cart-text-main:  #ffffff;
  --cart-text-muted: #8b8b8b;
  --cart-text-ph:    #c1c1c1;
}

:root body {
  padding: 24px 0;
}

.cart-main {
  background-color: #030303;
}

.woocommerce-error a {
  color: #030303;
}

/* --- Base reset --- */
.cart-figma-page {
  background: var(--cart-bg-page);
  color: var(--cart-text-main);
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
.cart-figma-page *,
.cart-figma-page *::before,
.cart-figma-page *::after {
  box-sizing: border-box;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.cart-figma-page header.cart-topbar {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  width: fit-content;
  position: fixed !important;
  z-index: 10;
  top: 0;
}


.cart-topbar__core {
  background: #2B2E30;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  flex-shrink: 0;
}
.cart-topbar__logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
}
.cart-topbar__back {
  color: var(--cart-text-main);
  font-size: 18px;
  font-weight: 300;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.cart-topbar__back:hover {
  opacity: 0.8;
}
.cart-topbar__decoration {
  display: block;
  width: 65px;
  height: 88px;
  flex-shrink: 0;
  align-self: stretch;
}

/* ============================================================
   HERO
   ============================================================ */
.cart-hero {
  position: relative !important;
  height: 400px;
  overflow: hidden;
  background-color: var(--cart-bg-page);
  background-image: var(--hero-bg-url);
  background-size: cover;
  background-position: center;
}
.cart-hero::after {
  content: '';
  position: absolute !important;
  inset: 0;
  background: linear-gradient(to top, #030303 4%, rgba(3, 3, 3, 0.4) 52.173%);
  pointer-events: none;
}
.cart-hero__inner {
  position: relative !important;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding: 0 24px 32px;
  height: 100%;
  max-width: 1500px;
  margin: 0 auto;
}
.cart-hero__title {
  font-size: 80px;
  font-weight: 300;
  font-style: italic;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ============================================================
   EMPTY CART
   ============================================================ */
.cart-empty {
  max-width: 1500px;
  margin: auto;
  padding: 60px 24px;
  text-align: center;
}
.cart-empty__message {
  font-family: "Noto Sans", "Noto Sans Placeholder", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4em;
  letter-spacing: 0.02em;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  color: white;
}
.cart-empty__link {
  display: inline-block;
  color: var(--cart-text-main);
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #3d3d3d;
  padding: 14px 32px;
  letter-spacing: 0.1em;
  margin-top: 40px;
}
.cart-empty__link:hover {
  background: #1a1a1a;
}

/* ============================================================
   DISCOVER MORE BUTTON (404 page – matches front-page Desktop default)
   Size 228×56; light mask + icon swap + background hover; CSS-only.
   ============================================================ */
.cart-discover-more {
  display: flex;
  flex-flow: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 228px;
  height: 56px;
  padding: 0 6px;
  margin: 40px auto 0 auto;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 1px solid #1f1f1f;
  background-color: rgba(18, 18, 18, 0.8);
  transition: background-color 240ms ease-in-out;
}
.cart-discover-more:hover {
  background-color: rgba(33, 33, 33, 0.92);
}
.cart-discover-more__light-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.cart-discover-more__reflex {
  display: flex;
  flex-flow: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: absolute;
  top: -28px;
  bottom: -38px;
  left: -36px;
  overflow: visible;
  opacity: 0.12;
  transform: rotate(-6deg);
  transition: transform 240ms ease-in-out;
}
.cart-discover-more:hover .cart-discover-more__reflex {
  transform: translateX(300px) rotate(-6deg);
}
.cart-discover-more__reflex-bar {
  width: 16px;
  height: 114px;
  background-color: #fff;
  filter: blur(2px);
  -webkit-filter: blur(2px);
  flex: 0 0 auto;
}
.cart-discover-more__reflex-bar--narrow {
  width: 8px;
}
.cart-discover-more__icon-wrap {
  flex: 0 0 auto;
  width: 47px;
  height: 47px;
  position: relative;
  overflow: hidden;
  background-color: rgb(77, 15, 15);
  border: 1px solid #611010;
  z-index: 1;
}
.cart-discover-more__icon {
  position: absolute;
  width: 74%;
  height: 74%;
  left: 13.0435%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: top 240ms ease-in-out, left 240ms ease-in-out, width 240ms ease-in-out, height 240ms ease-in-out;
}
.cart-discover-more__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.cart-discover-more__icon-wrap img {
  transform: rotate(90deg);
}
/* Icon 1: visible by default; on hover moves up and out */
.cart-discover-more__icon--1 {
  top: 13.0435%;
}
.cart-discover-more:hover .cart-discover-more__icon--1 {
  top: -95.6522%;
}
/* Icon 2: below fold by default; on hover moves into center */
.cart-discover-more__icon--2 {
  top: 121.739%;
}
.cart-discover-more:hover .cart-discover-more__icon--2 {
  top: 12.931%;
  left: 12.931%;
}
.cart-discover-more__label {
  flex: 1 0 0;
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.04);
  height: 84%;
  font-family: "Noto Sans", "Noto Sans Placeholder", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: #e6e6e6;
  text-transform: uppercase;
  white-space: pre;
  z-index: 1;
}

.cart-hero.page-not-found-hero {
  height: 210px;
}

.cart-hero__inner.page-not-found-hero__inner {
  justify-content: center;
}

.cart-empty__message.page-not-found-body-text {
  text-align: center;
}

.cart-main.page-not-found-main {
  height: calc(100vh - 258px);
}

/* ============================================================
   CART FORM LAYOUT
   ============================================================ */
.cart-form {
  display: flex;
  gap: 12px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px;
  align-items: flex-start;
}

/* ============================================================
   PRODUCTS PANEL
   ============================================================ */
.cart-products-panel {
  background: var(--cart-bg-panel);
  flex: 1;
  min-width: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Table header */
.cart-table-header {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.cart-table-header__products {
  background: var(--cart-bg-header);
  flex: 1;
  height: 69px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 20px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cart-table-header__total {
  background: var(--cart-bg-header);
  width: 120px;
  flex-shrink: 0;
  height: 69px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Product row */
.cart-product {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--cart-bg-panel);
  min-height: 260px;
}
.cart-product__image-wrap {
  flex-shrink: 0;
}
.cart-product__image {
  /* width: 260px; */
  /* height: 260px; */
  width: 21vw;
  height: 21vw;
  max-width: 260px;
  max-height: 260px;
  object-fit: cover;
  display: block;
}
.cart-product__image-placeholder {
  width: 260px;
  height: 260px;
  background: var(--cart-bg-qty);
  display: block;
}
.cart-product__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  min-width: 0;
}
.cart-product__name {
  font-size: 20px;
  font-weight: 300;
  padding: 20px;
  margin: 0;
  word-break: break-word;
}
.cart-product__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
}

/* Quantity wrap (Figma design) */
.cart-qty {
  background: var(--cart-bg-qty);
  display: flex;
  align-items: center;
  gap: 8px;
  width: 120px;
  height: 40px;
  padding: 0 6px;
  flex-shrink: 0;
}
.cart-qty__btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-qty__btn img {
  width: 100%;
  height: 100%;
  display: block;
}
.cart-qty__input-wrap {
  background: var(--cart-bg-input);
  width: 36px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}
.cart-qty__display {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: var(--cart-text-main);
  margin: 0;
  white-space: nowrap;
  line-height: 1;
}

/* Delete wrap (Figma design) */
.cart-delete-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
    /* opacity: 0.7; */
  transition: opacity 0.15s;
  background-color: #3D3D3D;
  padding: 6px;

}
/* .cart-delete-wrap:hover {
  opacity: 1;
} */
.cart-delete-wrap img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Price column */
.cart-product__price-col {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 20px;
  font-weight: 300;
}
.cart-product__price--original {
  text-decoration: line-through;
  color: var(--cart-text-muted);
  font-size: 16px;
}
.cart-product__price--current {
  color: var(--cart-text-main);
}

/* ============================================================
   TOTALS PANEL
   ============================================================ */
.cart-totals-panel {
  background: var(--cart-bg-panel);
  width: 440px;
  flex-shrink: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cart-totals-header {
  background: var(--cart-bg-header);
  height: 69px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 20px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.cart-totals-content {
  display: flex;
  flex-direction: column;
}
.cart-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cart-totals-row__label {
  font-size: 16px;
  font-weight: 300;
  padding: 0 20px;
  color: var(--cart-text-muted);
}
.cart-totals-row__value {
  font-size: 16px;
  font-weight: 300;
  padding: 0 20px;
  white-space: nowrap;
  color: var(--cart-text-main);
}
.cart-totals-row--total {
  border-bottom: none;
  margin-top: 4px;
}
.cart-totals-row--total .cart-totals-row__label,
.cart-totals-row--total .cart-totals-row__value {
  font-size: 20px;
  color: var(--cart-text-main);
}

/* Coupon row: remove button (reuse product delete icon) */
.cart-totals-row--coupon .cart-totals-row__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-remove-coupon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.cart-delete-wrap--coupon {
  width: 28px;
  height: 28px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: #3D3D3D;
  transition: opacity 0.15s;
}
.cart-remove-coupon:hover .cart-delete-wrap--coupon {
  opacity: 0.85;
}
.cart-delete-wrap--coupon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Checkout: loading only on order review fragment (no full page refresh) */
#checkout-order-review-fragment {
  position: relative;
}
#checkout-order-review-fragment.checkout-order-review-fragment--loading {
  pointer-events: none;
}
#checkout-order-review-fragment.checkout-order-review-fragment--loading::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
}
#checkout-order-review-fragment.checkout-order-review-fragment--loading::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  margin: -14px 0 0 -14px;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cart-coupon-spin 0.7s linear infinite;
}

/* Mini-loading state while AJAX updates totals (no page reload) */
.cart-totals-panel--loading .cart-totals-content .cart-totals-row__value {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.cart-totals-panel--loading .cart-totals-content .cart-totals-row__value::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 6px;
  vertical-align: middle;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cart-totals-spin 0.6s linear infinite;
}
@keyframes cart-totals-spin {
  to { transform: rotate(360deg); }
}

.cart-product__price-col--loading .cart-product__price--current {
  opacity: 0.6;
}
.cart-product__price-col--loading .cart-product__price--current::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  vertical-align: middle;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cart-totals-spin 0.6s linear infinite;
}

/* Coupon row */
.cart-coupon-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cart-coupon-toggle {
  background: none;
  border: none;
  color: var(--cart-text-main);
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  font-family: inherit;
}
.cart-coupon-toggle__label {
  color: var(--cart-text-muted);
}
.cart-coupon-toggle__icon {
  width: 24px;
  height: 24px;
  transition: transform 0.23s ease;
  /* filter: invert(1); */
  flex-shrink: 0;
}
.cart-coupon-toggle.is-open .cart-coupon-toggle__icon {
  transform: rotate(180deg);
}
.cart-coupon-form {
  padding: 0 20px 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.23s ease, visibility 0.23s ease, max-height 0.23s ease;
}
.cart-coupon-form.is-open {
  padding-top: 5px;
  max-height: 180px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.cart-coupon-form__input {
  background: var(--cart-bg-input);
  border: none;
  color: var(--cart-text-main);
  font-size: 14px;
  font-weight: 300;
  padding: 0 12px;
  flex: 1;
  height: 44px;
  min-width: 120px;
  font-family: inherit;
}
.cart-coupon-form__input::placeholder {
  color: var(--cart-text-ph);
}
.cart-coupon-form__input:focus {
  outline: 1px solid #3d3d3d;
}
.cart-coupon-form__apply {
  background: var(--cart-bg-input);
  border: none;
  color: var(--cart-text-main);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  width: 99px;
  height: 44px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: inherit;
  transition: background 0.15s;
}
.cart-coupon-form__apply:hover {
  background: #3d3d3d;
}

/* Checkout button */
.cart-checkout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  background: rgba(18, 18, 18, 0.8);
  border: 1px solid #1f1f1f;
  text-decoration: none;
  padding: 4px 5px;
  margin-top: 16px;
  transition: opacity 0.15s;
}
.cart-checkout-btn:hover {
  opacity: 0.85;
}
.cart-checkout-btn__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-checkout-btn__icon img,
.cart-checkout-btn__icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cart-checkout-btn__label {
  flex: 1;
  text-align: center;
  color: var(--cart-text-main);
  font-size: 14px;
  font-weight: 400;
  background: var(--cart-bg-page);
  border: 1px solid #1c1c1c;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

[aria-expanded="true"] {
  .cart-coupon-form {
    visibility: visible !important;
  }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes cart-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cart-animate {
  opacity: 0;
}
.cart-animate.is-visible {
  animation: cart-fade-up 0.5s ease forwards;
}
.cart-animate:nth-child(2) { animation-delay: 0.08s; }
.cart-animate:nth-child(3) { animation-delay: 0.16s; }
.cart-animate:nth-child(4) { animation-delay: 0.24s; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Mobile: ≤359px */
@media (max-width: 359px) {
  .cart-hero__title { font-size: 36px; }
  .cart-product__image { width: 60px; height: 60px; }
  .cart-product__image-placeholder { width: 60px; height: 60px; }
  .cart-product__name { font-size: 11px; padding: 6px; }
  .cart-product__price-col { width: auto; padding: 6px; font-size: 11px; }
}

/* Tablet: 360–809px */
@media (max-width: 1030px) {
  .cart-form {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }
  .cart-totals-panel {
    width: 100%;
  }
  .cart-table-header {
    display: none;
  }
  .cart-hero__title { font-size: 52px; }
  .cart-hero { height: 280px; }
  .cart-hero__inner { padding: 0 16px 24px; }
  .cart-product { min-height: auto; }
  .cart-product__image {
    width: 80px;
    height: 80px;
  }
  .cart-product__image-placeholder {
    width: 80px;
    height: 80px;
  }
  .cart-product__name {
    font-size: 13px;
    padding: 8px 10px;
  }
  .cart-product__controls {
    padding: 8px 10px;
  }
  /* Quantity wrap — Figma mobile: 100×30px, 20×20 icons */
  .cart-qty { width: 100px; height: 30px; gap: 4px; }
  .cart-qty__btn { width: 20px; height: 20px; }
  .cart-qty__input-wrap { width: 36px; height: 20px; padding: 2px; }
  .cart-qty__display { font-size: 12px; }
  /* Delete wrap — mobile */
  .cart-delete-wrap { width: 30px; height: 30px; }
  .cart-delete-wrap img { width: 20px; height: 20px; }
  .cart-product__price-col {
    width: auto;
    min-width: 64px;
    font-size: 13px;
    padding: 8px;
  }
  .cart-product__price--original { font-size: 11px; }
  .cart-topbar__back { font-size: 14px; }
}

/* Desktop: 810px+ — side-by-side layout */
@media (min-width: 810px) {
  .cart-form {
    flex-direction: row;
    align-items: flex-start;
  }
  .cart-totals-panel {
    width: 440px;
    position: sticky !important;
    top: 20px;
  }
  .cart-table-header {
    display: flex;
  }
}

/* XL: ≥1920px */
@media (min-width: 1920px) {
  .cart-form { max-width: 1700px; }
  .cart-totals-panel { width: 460px; }
  .cart-hero__inner { max-width: 1700px; }
  .cart-hero__title { font-size: 96px; }
}

/* ============================================================
   CHECKOUT PAGE OVERRIDES
   ============================================================ */

/* Two-column layout */
.checkout-figma-page .checkout-grid {
  display: flex;
  gap: 12px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px;
  align-items: flex-start;
}
.checkout-figma-page .checkout-form-col {
  flex: 1;
  min-width: 0;
  background: var(--cart-bg-panel);
  padding: 8px;
}
.checkout-figma-page .checkout-summary-col {
  width: 440px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}

/* WC section headings (h3) → match .cart-totals-header */
.checkout-figma-page .woocommerce-billing-fields > h3,
.checkout-figma-page .woocommerce-shipping-fields > h3,
.checkout-figma-page #order_review_heading {
  background: var(--cart-bg-header);
  height: 69px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 20px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 8px 0;
}

/* WC form rows */
.checkout-figma-page .form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px;
}
.checkout-figma-page .form-row label {
  font-size: 12px;
  font-weight: 300;
  color: var(--cart-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.checkout-figma-page .form-row .required { color: #e07; }
.checkout-figma-page input.input-text,
.checkout-figma-page select,
.checkout-figma-page textarea {
  background: var(--cart-bg-input);
  border: none;
  color: var(--cart-text-main);
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 10px 12px;
  width: 100%;
  height: 44px;
}
.checkout-figma-page textarea { height: auto; min-height: 80px; }
.checkout-figma-page input.input-text:focus,
.checkout-figma-page select:focus,
.checkout-figma-page textarea:focus {
  outline: 1px solid #3d3d3d;
}
.checkout-figma-page select option { background: var(--cart-bg-input); }

/* Two-col billing/shipping split */
.checkout-figma-page .col2-set { display: flex; gap: 0; }
.checkout-figma-page .col2-set .col-1,
.checkout-figma-page .col2-set .col-2 { flex: 1; min-width: 0; }

/* Payment section */
.checkout-figma-page #order_review {
  padding: 8px 0;
}
/* Hide default WC order table when using our custom sidebar; show it when ?show_all=1 for comparison with default theme */
/* .checkout-figma-page:not(.checkout-show-all) .woocommerce-checkout-review-order-table, */
form[name="checkout"] #order_review_heading,
.woocommerce-checkout-review-order-table { display: none; }

/* Show-all mode (?show_all=1): ensure default WC elements are visible (login, coupon, express pay buttons, order table) for comparison */
.checkout-show-all.checkout-figma-page .woocommerce-pay-buttons,
.checkout-show-all.checkout-figma-page .woocommerce-checkout-login,
.woocommerce-form-coupon-toggle { display: none !important; }
/* .checkout-show-all.checkout-figma-page .woocommerce-checkout-review-order-table { display: table !important; margin: 12px 0; } */
.checkout-figma-page .payment_methods {
  list-style: none;
  padding: 0 16px;
  margin: 0;
}
.checkout-figma-page .payment_methods .wc_payment_method > label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 300;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.checkout-figma-page .payment_methods input[type="radio"] {
  width: 16px; height: 16px; accent-color: var(--primary-automation-red); flex-shrink: 0;
}
.checkout-figma-page .payment_box {
  background: var(--cart-bg-header);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 300;
  color: var(--cart-text-muted);
  margin-bottom: 8px;
}

/* Place order button */
.checkout-figma-page #place_order {
  width: 100%;
  height: 56px;
  background: var(--cart-bg-page);
  border: 1px solid #1c1c1c;
  color: var(--cart-text-main);
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  margin: 16px 0;
  transition: opacity 0.15s;
}
.checkout-figma-page #place_order:hover { opacity: 0.85; }
/* Default WC wraps button in .form-row.place-order (when using woocommerce_checkout_order_review) */
.checkout-figma-page .form-row.place-order {
  padding: 16px;
}

/* WooCommerce reCAPTCHA v2 / v3 – keep visible before and after validation so token is submitted */
.checkout-figma-page #order_review .g-recaptcha,
.checkout-figma-page #order_review [data-sitekey],
.checkout-figma-page #order_review .wc-recaptcha,
.checkout-figma-page #order_review .woocommerce-recaptcha,
.checkout-figma-page #order_review .recaptcha-container,
.checkout-figma-page #order_review #recaptcha-container {
  display: block !important;
  margin: 12px 0;
  min-height: 78px; /* reserve space so widget doesn’t collapse after v2 “I’m not a robot” */
  overflow: visible;
  visibility: visible;
}
.checkout-figma-page #order_review .g-recaptcha iframe,
.checkout-figma-page #order_review [data-sitekey] iframe {
  max-width: 100%;
}
/* reCAPTCHA v3 badge – visible when plugin adds it (do not hide) */
.checkout-figma-page .grecaptcha-badge {
  visibility: visible;
}

/* Same reCAPTCHA visibility for default WooCommerce checkout (when not using Figma template) */
.woocommerce-checkout .g-recaptcha,
.woocommerce-checkout [data-sitekey],
.woocommerce-checkout .wc-recaptcha,
.woocommerce-checkout .woocommerce-recaptcha,
.woocommerce-checkout .recaptcha-container,
.woocommerce-checkout #recaptcha-container {
  display: block;
  margin: 12px 0;
  min-height: 1px;
}
.woocommerce-checkout .grecaptcha-badge {
  visibility: visible;
}

form[name="checkout"] .woocommerce-input-wrapper .automation-style {
  background: var(--cart-bg-input);
  border: none;
  border-radius: 0;
  color: var(--cart-text-main);
  font-size: 14px;
  font-weight: 300;
  padding: 0 12px;
  flex: 1;
  height: 44px;
  min-width: 120px;
  font-family: inherit;
}

form[name="checkout"] .select2-selection.select2-selection--single {
  background: var(--cart-bg-input) !important;
  border: none !important;
  border-radius: 0 !important;
  color: var(--cart-text-main) !important;
  font-size: 14px !important;
  font-weight: 300 !important;
  padding: 0 12px !important;
  flex: 1 !important;
  height: 44px !important;
  min-width: 120px !important;
  font-family: inherit !important;
}

form[name="checkout"] .select2-selection.select2-selection--single .select2-selection__rendered {
  height: 44px !important;
  color: var(--cart-text-main);
  line-height: 2.2 !important;
}

:where(.woocommerce) .select2-container .select2-selection--single .select2-selection__arrow b {
  transform: rotate(180deg) !important;
  background: url('http://test-automation.local/wp-content/themes/tema-autom/assets/images/cart/chevron-down.svg') !important;
}

.select2-dropdown.select2-dropdown--below,
textarea[name="order_comments"] {
  background: var(--cart-bg-input) !important;
  border: none !important;
  border-radius: 0 !important;
  color: var(--cart-text-main) !important;
  font-size: 14px !important;
  font-weight: 300 !important;
}

.select2-search__field {
  background-color: var(--cart-bg-input) !important;
  color: var(--cart-text-main);
}

.select2-container--default .select2-results__option[data-selected=true] {
  background-color: #585858  !important;
}

form[name="checkout"] .col2-set {
  flex-direction: column !important;
}

form[name="checkout"] .col2-set .col-1 {
  width: 100% !important;
}

/* Order summary sidebar items */
.checkout-summary-items {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.checkout-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
}
.checkout-summary-item__image img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.checkout-summary-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.checkout-summary-item__name {
  font-size: 13px;
  font-weight: 300;
  color: var(--cart-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkout-summary-item__qty {
  font-size: 12px;
  color: var(--cart-text-muted);
}
.checkout-summary-item__price {
  font-size: 14px;
  font-weight: 300;
  color: var(--cart-text-main);
  white-space: nowrap;
  flex-shrink: 0;
}

.checkout_coupon .form-row.form-row-last button {
  padding: 10px 0;
}

/* Mobile: ≤359px */
@media (max-width: 359px) {
  .checkout-figma-page .checkout-grid { padding: 8px; gap: 8px; }
  .checkout-figma-page .col2-set .col-1,
  .checkout-figma-page .col2-set .col-2 { padding: 0; }
}

/* Tablet: 360–809px — stack columns */
@media (max-width: 809px) {
  .checkout-figma-page .checkout-grid { flex-direction: column; padding: 12px; }
  .checkout-figma-page .checkout-summary-col { width: 100%; position: static; }
  .checkout-figma-page .col2-set { flex-direction: column; }

}

/* XL: ≥1920px */
@media (min-width: 1920px) {
  .checkout-figma-page .checkout-grid { max-width: 1700px; }
  .checkout-figma-page .checkout-summary-col { width: 460px; }
}

/* Place Order button wrapper */
.checkout-figma-page .checkout-place-order-wrap {
  padding: 16px;
}

/* Terms text */
.checkout-figma-page .checkout-terms-text {
  font-size: 12px;
  font-weight: 300;
  color: var(--cart-text-muted);
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.6;
}
.checkout-figma-page .checkout-terms-text a {
  color: var(--cart-text-muted);
  text-decoration: underline;
}
.checkout-figma-page .checkout-terms-text a:hover {
  color: var(--cart-text-main);
}

/* Coupon sidebar container */
.checkout-coupon-sidebar {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Sidebar coupon: allow form to grow when error message is shown */
/* .checkout-coupon-sidebar .cart-coupon-form.is-open {
  padding-top: 5px;
  max-height: 180px;
} */
/* Sidebar coupon field wrapper + error notice (WooCommerce-like behaviour) */
.checkout-coupon-sidebar .cart-coupon-form__field {
  flex: 1;
  min-width: 120px;
  margin-bottom: 0;
}
.checkout-coupon-sidebar .cart-coupon-form__field .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.checkout-coupon-sidebar .coupon-error-notice {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #e74c3c;
  line-height: 1.4;
}
.checkout-coupon-sidebar .coupon-error-notice:empty {
  display: none;
}
.checkout-coupon-sidebar .cart-coupon-form__input.has-error {
  outline: 1px solid #e74c3c;
  outline-offset: 0;
}
.checkout-coupon-sidebar .cart-coupon-form__apply--loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.checkout-coupon-sidebar .cart-coupon-form__apply--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cart-coupon-spin 0.7s linear infinite;
}
@keyframes cart-coupon-spin {
  to { transform: rotate(360deg); }
}

/* Shared coupon form (cart + checkout): field, error notice, loading spinner */
.tema-coupon-form .cart-coupon-form__field {
  flex: 1;
  min-width: 120px;
}
.tema-coupon-form .cart-coupon-form__field .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tema-coupon-form .coupon-error-notice {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #e74c3c;
  line-height: 1.4;
}
.tema-coupon-form .coupon-error-notice:empty {
  display: none;
}
.tema-coupon-form .cart-coupon-form__input.has-error {
  outline: 1px solid #e74c3c;
  outline-offset: 0;
}
.tema-coupon-form .cart-coupon-form__apply--loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.tema-coupon-form .cart-coupon-form__apply--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cart-coupon-spin 0.7s linear infinite;
}

/* WC coupon toggle notice */
.checkout-coupon-sidebar .woocommerce-form-coupon-toggle {
  padding: 0;
  margin: 0;
}
.checkout-coupon-sidebar .woocommerce-form-coupon-toggle .woocommerce-info {
  background: transparent;
  border: none;
  border-left: none;
  box-shadow: none;
  padding: 10px 16px;
  margin: 0;
  font-size: 13px;
  font-weight: 300;
  color: var(--cart-text-muted);
}
.checkout-coupon-sidebar .woocommerce-form-coupon-toggle .woocommerce-info::before {
  display: none;
}
.checkout-coupon-sidebar .woocommerce-form-coupon-toggle .showcoupon {
  color: var(--cart-text-main);
  text-decoration: underline;
  cursor: pointer;
}

/* WC coupon form */
.checkout-coupon-sidebar .checkout_coupon {
  padding: 4px 16px 12px;
  margin: 0;
  background: transparent;
  border: none;
}
.checkout-coupon-sidebar .checkout_coupon p {
  font-size: 12px;
  color: var(--cart-text-muted);
  margin: 0 0 8px;
}
.checkout-coupon-sidebar .checkout_coupon .form-row {
  padding: 0;
  margin: 0 0 8px;
}
.checkout-coupon-sidebar .checkout_coupon .form-row-first {
  width: 100%;
}
.checkout-coupon-sidebar .checkout_coupon .form-row-first input[type="text"] {
  background: var(--cart-bg-input);
  border: none;
  color: var(--cart-text-main);
  font-size: 13px;
  font-weight: 300;
  padding: 8px 12px;
  width: 100%;
  height: 40px;
  font-family: 'Noto Sans', sans-serif;
}
.checkout-coupon-sidebar .checkout_coupon .form-row-last {
  width: 100%;
}
.checkout-coupon-sidebar .checkout_coupon .form-row-last button {
  background: var(--cart-bg-header);
  border: none;
  color: var(--cart-text-main);
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  padding: 0 20px;
  height: 40px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.15s;
  width: 100%;
}
.checkout-coupon-sidebar .checkout_coupon .form-row-last button:hover {
  opacity: 0.8;
}

.woocommerce-notices-wrapper .woocommerce-message, 
.woocommerce-NoticeGroup .woocommerce-error {
  background-color: #0a0a0a;
  color: white;
  border-top-color: #4d0f0f;
  
}
.woocommerce-NoticeGroup .woocommerce-error li {
  padding: 5px 0;
}
.woocommerce-NoticeGroup .woocommerce-error li a {
  color: white;
}
.woocommerce-notices-wrapper .woocommerce-message::before {
  color: #a34a4a;
}

.woocommerce-notices-wrapper .woocommerce-message .button {
  border-radius: 0;
  background-color: rgba(255, 255, 255, 0.04);
  border-color: #212121cc;
  border-width: 3px;
  color: white;
}

/* ============================================================
   PayPal Checkout Overlay (sandbox/production)
   Ensures the overlay injected by PayPal JS is visible and on top
   during payment in the popup. Theme must not clip or hide it.
   ============================================================ */
.checkout-figma-page .paypal-checkout-sandbox,
.checkout-figma-page [id^="paypal-overlay-"] {
  display: block !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  z-index: 2147483647 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.checkout-figma-page .paypal-checkout-sandbox .paypal-checkout-sandbox-iframe,
.checkout-figma-page .paypal-checkout-sandbox .paypal-checkout-sandbox-iframe-full {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

