/* =============================================
   GAYA – Checkout 1:1 Figma
   ============================================= */

/* === LAYOUT === */

.gaya-checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: flex-start;
  max-width: 1290px;
  margin: 0 auto;
  padding: 0 20px;
}

.gaya-checkout__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #737373;
  text-decoration: none;
  margin-bottom: 12px;
}

.gaya-checkout__back:hover {
  color: #0a0a0a;
}

.gaya-checkout__back svg {
  flex-shrink: 0;
}

.gaya-checkout__title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.32px;
  color: #0a0a0a;
}

/* === PRODUCT ITEMS (left column) === */

.gaya-checkout-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 30px;
}

.gaya-checkout-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  background: transparent;
  border-bottom: 1px solid #ededed;
}

.gaya-checkout-item:first-child {
  padding-top: 0;
}

.gaya-checkout-item:last-child {
  border-bottom: 0;
}

/* Image box */
.gaya-checkout-item__image-box {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.gaya-checkout-item__image-box img {
  max-width: 110px;
  max-height: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Content */
.gaya-checkout-item__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.gaya-checkout-item__header {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gaya-checkout-item__name,
.gaya-checkout-item__name a {
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.18px;
  color: #0a0a0a;
  text-decoration: none;
}

.gaya-checkout-item__name a:hover {
  text-decoration: underline;
}

.gaya-checkout-item__variant {
  font-size: 16px;
  font-weight: 400;
  color: #737373;
  line-height: 24px;
  letter-spacing: -0.3125px;
}

/* Footer: qty + price */
.gaya-checkout-item__footer {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gaya-checkout-item__qty {
  flex: 0 0 auto;
}

.gaya-checkout-item__subtotal {
  margin-left: auto;
  font-weight: 400;
  font-size: 16px;
  color: #0a0a0a;
  white-space: nowrap;
  letter-spacing: -0.3125px;
}

/* Quantity input — three circles: minus, number, plus */
.gaya-checkout-item__qty .quantity {
  display: inline-flex !important;
  align-items: center;
  gap: 16px;
  border: none !important;
  border-radius: 0;
  overflow: visible;
  width: auto !important;
  max-width: fit-content;
}

.gaya-checkout-item__qty .qty {
  border: none !important;
  width: 32px !important;
  min-width: 32px;
  max-width: 32px;
  flex: 0 0 32px;
  text-align: center;
  padding: 0 !important;
  font-size: 16px;
  font-weight: 400;
  background: transparent !important;
  color: #0a0a0a;
  letter-spacing: -0.3125px;
  -moz-appearance: textfield;
}

.gaya-checkout-item__qty .qty::-webkit-inner-spin-button,
.gaya-checkout-item__qty .qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gaya-checkout-item__qty .quantity label {
  display: none !important;
}

/* Round +/- buttons (same as cart) */
.gaya-checkout-item .gaya-qty-btn {
  border-radius: 999px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: #111111;
  width: 40px;
  height: 40px;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.gaya-checkout-item .gaya-qty-btn:hover {
  border-color: #111111;
}

/* Remove link */
.gaya-checkout-item__remove {
  margin-top: 4px;
}

.woocommerce .gaya-checkout-item .gaya-checkout-item__remove-link,
.woocommerce .gaya-checkout-item a.remove.gaya-checkout-item__remove-link {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: none !important;
  font-size: 12px !important;
  font-weight: 400;
  color: #a1a1a1 !important;
  text-decoration: none !important;
  line-height: 16px;
  white-space: nowrap;
}

.woocommerce .gaya-checkout-item .gaya-checkout-item__remove-link:hover,
.woocommerce .gaya-checkout-item a.remove.gaya-checkout-item__remove-link:hover {
  color: #555 !important;
  background: none !important;
}

/* === SIDEBAR (right column) === */

.gaya-checkout-sidebar__card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 22px 22px 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: none;
}

/* Quick-summary sections (address, payment, shipping) */
.gaya-co-quick__section {
  padding: 14px 0;
  border-bottom: 1px solid #ededed;
}

.gaya-co-quick__section:last-child {
  border-bottom: 0;
}

.gaya-co-quick__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.gaya-co-quick__icon img {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.85;
}

.gaya-co-quick__title {
  font-weight: 600;
  font-size: 14px;
  color: #0a0a0a;
  white-space: nowrap;
}

.gaya-co-quick__edit {
  margin-left: auto;
  font-size: 13px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.gaya-co-quick__edit:hover {
  text-decoration: underline;
}

.gaya-co-quick__body {
  margin-top: 8px;
  font-size: 13px;
  color: #525252;
  line-height: 1.45;
}

.gaya-co-quick__line {
  line-height: 1.5;
}

.gaya-co-quick__muted {
  color: #a1a1a1;
  font-size: 13px;
}

.gaya-co-quick__pill {
  display: inline-block;
  padding: 4px 0;
  font-size: 13px;
  color: #525252;
}

/* === ORDER REVIEW (totals) === */

.gaya-review__heading {
  font-size: 16px;
  font-weight: 600;
  margin: 18px 0 12px;
  color: #0a0a0a;
  letter-spacing: -0.16px;
}

.gaya-review__totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gaya-review__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: #525252;
}

.gaya-review__label {
  letter-spacing: -0.14px;
}

.gaya-review__value {
  font-weight: 400;
  color: #0a0a0a;
  letter-spacing: -0.14px;
}

.gaya-review__divider {
  height: 1px;
  background: #ededed;
  margin: 8px 0;
}

.gaya-review__row--total {
  font-weight: 700;
  font-size: 16px;
  color: #0a0a0a;
}

.gaya-review__row--total .gaya-review__value {
  font-weight: 700;
}

/* === SHIPPING METHODS (with carrier logos) === */

.gaya-review__shipping-methods {
  display: block;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.gaya-review__shipping-methods .gaya-review__heading {
  font-size: 16px;
  margin-bottom: 10px;
}

.gaya-shipping-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gaya-shipping-option {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ededed;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  font-size: 14px;
  color: #525252;
  overflow: hidden;
}

.gaya-shipping-option:hover {
  border-color: #d4d4d4;
}

.gaya-shipping-option.is-active {
  border-color: #0a0a0a;
  background: #fafafa;
}

.gaya-shipping-option input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
  accent-color: #0a0a0a;
}

.gaya-shipping-option__logo {
  max-height: 24px;
  max-width: 48px;
  height: auto;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.gaya-shipping-option__name {
  flex: 1 1 auto;
  font-weight: 500;
  color: #0a0a0a;
  letter-spacing: -0.14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gaya-shipping-option__price {
  margin-left: auto;
  font-weight: 400;
  white-space: nowrap;
  color: #525252;
}

/* Apaczka pickup point map button (outside hidden shipping list) */
.gaya-review__apaczka-map .apaczka-parcel-machine {
  margin-top: 4px;
}

.gaya-review__apaczka-map .apaczka-parcel-machine-select {
  padding: 0;
}

.gaya-review__apaczka-map #apaczka_pl_geowidget_classic {
  width: 100%;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.gaya-review__apaczka-map #selected-parcel-machine {
  margin-top: 8px;
  font-size: 13px;
  color: #525252;
  line-height: 1.45;
}

/* Carrier logo in quick-summary header */
.gaya-co-quick__carrier-logo {
  max-height: 20px;
  max-width: 64px;
  height: auto;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Payment method icons in quick-summary */
.gaya-co-quick__pay-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gaya-co-quick__pay-icons img {
  height: 28px;
  width: 44px;
  object-fit: contain;
  flex-shrink: 0;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 4px;
}

/* === PAYMENT SECTION === */

.gaya-checkout-sidebar__card #payment {
  background: transparent;
  border-radius: 0;
  border: none;
  padding: 8px 0 0;
}

/* Payment methods list */
.gaya-checkout-sidebar__card #payment .payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gaya-checkout-sidebar__card #payment .payment_methods li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.gaya-checkout-sidebar__card #payment .payment_methods li:last-child {
  border-bottom: none;
}

.gaya-checkout-sidebar__card #payment .payment_methods li label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.gaya-checkout-sidebar__card #payment .payment_methods li img {
  max-height: 24px;
  width: auto;
  object-fit: contain;
}

.gaya-checkout-sidebar__card #payment .payment_box {
  padding: 10px 0 4px 26px;
  font-size: 12px;
  color: #737373;
  line-height: 1.45;
}

/* Privacy text — smaller */
.gaya-checkout-sidebar__card .woocommerce-privacy-policy-text {
  font-size: 11px;
  color: #737373;
  line-height: 1.45;
  margin-top: 12px;
}

/* Place order button */
.gaya-checkout-sidebar__card #place_order {
  width: 100%;
  border-radius: 999px;
  background: #000000;
  border-color: #000000;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-top: 16px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.gaya-checkout-sidebar__card #place_order:hover {
  opacity: 0.85;
}

/* Place order — locked state */
.gaya-checkout-sidebar__card #place_order.is-locked,
.gaya-checkout-sidebar__card #place_order:disabled {
  background: #d4d4d4;
  border-color: #d4d4d4;
  color: #a1a1a1;
  cursor: not-allowed;
  opacity: 1;
}

.gaya-place-order-hint {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #d97706;
  cursor: pointer;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.gaya-place-order-hint:hover {
  background: #fef3c7;
}

.gaya-place-order-hint__icon {
  margin-right: 4px;
}

/* Hide Woo default heading */
.gaya-checkout-sidebar__card #order_review_heading {
  display: none;
}

/* Hide default Woo order table if rendered */
.gaya-checkout-sidebar__order-review table {
  display: none;
}

/* === ADDRESS FORM (left col, below products) === */

.gaya-checkout__details .col2-set {
  display: block;
}

.gaya-checkout__details .woocommerce-billing-fields__field-wrapper,
.gaya-checkout__details .woocommerce-shipping-fields__field-wrapper {
  margin-top: 10px;
}

/* === BUSY STATE === */

.gaya-checkout-items.is-busy,
.gaya-checkout-sidebar.is-busy {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* === Billing/shipping form styles === */

/* All form rows in checkout left column — full width */
.gaya-checkout .gaya-checkout__left p.form-row,
.gaya-checkout .gaya-checkout__left p.form-row.form-row-first,
.gaya-checkout .gaya-checkout__left p.form-row.form-row-last,
.gaya-checkout .gaya-checkout__left p.form-row.form-row-wide {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.gaya-checkout .gaya-checkout__left .woocommerce-billing-fields h3,
.gaya-checkout .gaya-checkout__left .woocommerce-shipping-fields > h3:not(#ship-to-different-address) {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #0a0a0a;
  background: #f0f7ed;
  border-left: 3px solid #6ab04c;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  letter-spacing: -0.16px;
}

.gaya-checkout .gaya-checkout__left p.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #525252;
  margin-bottom: 4px;
}

.gaya-checkout .gaya-checkout__left p.form-row input.input-text,
.gaya-checkout .gaya-checkout__left p.form-row textarea,
.gaya-checkout .gaya-checkout__left p.form-row select {
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px 14px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-size: 14px;
  color: #0a0a0a;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.gaya-checkout .gaya-checkout__left p.form-row input.input-text:focus,
.gaya-checkout .gaya-checkout__left p.form-row textarea:focus {
  border-color: #0a0a0a;
  outline: none;
}

/* Imię + Nazwisko side by side (billing) */
.gaya-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.gaya-checkout .woocommerce-billing-fields__field-wrapper p.form-row {
  grid-column: 1 / -1;
}

.gaya-checkout .woocommerce-billing-fields__field-wrapper p#billing_first_name_field,
.gaya-checkout .woocommerce-billing-fields__field-wrapper p#billing_last_name_field {
  grid-column: auto;
}

/* Imię + Nazwisko side by side (shipping) */
.gaya-checkout .woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-top: 12px;
}

.gaya-checkout .woocommerce-shipping-fields__field-wrapper p.form-row {
  grid-column: 1 / -1;
}

.gaya-checkout .woocommerce-shipping-fields__field-wrapper p#shipping_first_name_field,
.gaya-checkout .woocommerce-shipping-fields__field-wrapper p#shipping_last_name_field {
  grid-column: auto;
}

/* "Wysłać na inny adres?" — match invoice toggle style */
.gaya-checkout h3#ship-to-different-address {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #4a4a4a;
  margin: 16px 0 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  letter-spacing: -0.1px;
}

.gaya-checkout h3#ship-to-different-address label {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #4a4a4a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gaya-checkout h3#ship-to-different-address input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #d1d1d1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.gaya-checkout h3#ship-to-different-address input[type="checkbox"]:checked {
  background: #0a0a0a;
  border-color: #0a0a0a;
}

.gaya-checkout h3#ship-to-different-address input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Uwagi do zamówienia */
.gaya-checkout .woocommerce-additional-fields h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 20px 0 8px;
  color: #333;
}

.gaya-checkout .woocommerce-additional-fields textarea {
  min-height: 80px;
}

/* Account fields — match invoice toggle style */
.gaya-checkout .woocommerce-account-fields {
  margin-top: 12px;
}

.gaya-checkout .woocommerce-account-fields label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #4a4a4a;
  cursor: pointer;
  letter-spacing: -0.1px;
}

.gaya-checkout .woocommerce-account-fields input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  margin: 0 !important;
  border: 2px solid #d1d1d1 !important;
  border-radius: 6px !important;
  background: #fff !important;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.gaya-checkout .woocommerce-account-fields input[type="checkbox"]:checked {
  background: #0a0a0a !important;
  border-color: #0a0a0a !important;
}

.gaya-checkout .woocommerce-account-fields input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Single column layout for customer details */
.gaya-checkout .gaya-checkout__details .col2-set {
  display: block !important;
}

.gaya-checkout #customer_details {
  scroll-margin-top: 100px;
}

/* Force full-width on all checkout inputs — nuclear override */
.gaya-checkout .gaya-checkout__left .col2-set,
.gaya-checkout .gaya-checkout__left .col-1,
.gaya-checkout .gaya-checkout__left .col-2 {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

.woocommerce-checkout .gaya-checkout__left .woocommerce-billing-fields__field-wrapper .form-row input.input-text,
.woocommerce-checkout .gaya-checkout__left .woocommerce-billing-fields__field-wrapper .form-row select,
.woocommerce-checkout .gaya-checkout__left .woocommerce-shipping-fields__field-wrapper .form-row input.input-text,
.woocommerce-checkout .gaya-checkout__left .woocommerce-shipping-fields__field-wrapper .form-row select,
.woocommerce-checkout .gaya-checkout__left .woocommerce-additional-fields .form-row textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}


/* === STEP ACCORDION === */

.gaya-step {
  border: 1px solid #ededed;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.gaya-step.is-active {
  border-color: #d4d4d4;
}

.gaya-step__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  background: #fafafa;
  transition: background 0.15s ease;
}

.gaya-step.is-active .gaya-step__header {
  background: transparent;
  border-bottom: 1px solid #ededed;
}

.gaya-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e5e5e5;
  color: #737373;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.gaya-step.is-active .gaya-step__number {
  background: #0a0a0a;
  color: #fff;
}

.gaya-step.is-done .gaya-step__number {
  background: #16a34a;
  color: #fff;
}

.gaya-step__title {
  font-size: 16px;
  font-weight: 600;
  color: #0a0a0a;
  letter-spacing: -0.16px;
}

.gaya-step__summary {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: #737373;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}

.gaya-step:not(.is-active) .gaya-step__summary {
  display: block;
}

.gaya-step__edit {
  font-size: 13px;
  font-weight: 500;
  color: #3b82f6;
  cursor: pointer;
  white-space: nowrap;
  display: none;
}

.gaya-step__edit:hover {
  text-decoration: underline;
}

.gaya-step:not(.is-active) .gaya-step__edit {
  display: inline;
}

.gaya-step__body {
  display: none;
  padding: 22px;
}

.gaya-step.is-active .gaya-step__body {
  display: block;
}

.gaya-step__next {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #c3e0ba;
  color: #151515;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.15s ease;
}

.gaya-step__next:hover {
  background: #b5d6aa;
}

/* === RWD === */

@media (max-width: 960px) {
  .gaya-checkout__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .gaya-checkout-sidebar__card {
    margin-top: 10px;
  }

  .gaya-checkout__details .col2-set {
    grid-template-columns: minmax(0, 1fr);
  }

  .gaya-step__header {
    padding: 14px 16px;
  }

  .gaya-step__body {
    padding: 16px;
  }
}

/* === INVOICE SECTION === */

.gaya-invoice-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #ededed;
}

.gaya-invoice-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.gaya-invoice-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #d1d1d1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.gaya-invoice-toggle input[type="checkbox"]:checked {
  background: #0a0a0a;
  border-color: #0a0a0a;
}
.gaya-invoice-toggle input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.gaya-invoice-toggle__label {
  font-size: 14px;
  font-weight: 400;
  color: #4a4a4a;
  letter-spacing: -0.1px;
}

.gaya-invoice-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #16a34a;
  letter-spacing: -0.12px;
}

.gaya-invoice-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.gaya-invoice-field {
  margin: 0;
}

/* NIP — full width */
.gaya-invoice-field:first-child {
  grid-column: 1 / -1;
}

.gaya-invoice-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #737373;
  margin-bottom: 6px;
}

.gaya-invoice-field label abbr.required {
  color: #dc2626;
  text-decoration: none;
}

.gaya-invoice-field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-size: 14px;
  color: #0a0a0a;
  background: #f5f5f3;
  transition: border-color 0.15s ease;
  font-family: inherit;
}

.gaya-invoice-field input[type="text"]:focus {
  border-color: #0a0a0a;
  outline: none;
}

.gaya-invoice-field input[type="text"].is-filled {
  border-color: #16a34a;
}

.gaya-invoice-field input[type="text"]::placeholder {
  color: #a1a1a1;
}

@media (max-width: 640px) {
  .gaya-invoice-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .gaya-checkout-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .gaya-checkout-item__image-box {
    width: 100px;
    height: 100px;
  }

  .gaya-checkout-item__image-box img {
    max-width: 80px;
    max-height: 90px;
  }

  .gaya-checkout-item__content {
    min-height: auto;
  }
}

/* ===============================================
   MOBILE ≤768px — edge-to-edge + poprawki layoutu
   Nie zmienia nic na desktopie.
   =============================================== */
@media (max-width: 768px) {

  /* --- Grid: full width --- */
  .gaya-checkout__grid {
    padding: 0;
    gap: 12px;
  }

  .gaya-checkout {
    padding: 0;
    margin: 20px 0 40px;
  }

  /* --- Top: back link + title --- */
  .gaya-checkout__top {
    padding: 0 16px;
  }
  .gaya-checkout__back {
    margin-bottom: 8px;
  }
  .gaya-checkout__title {
    font-size: 26px;
    margin-bottom: 16px;
  }

  /* --- Steps: edge-to-edge --- */
  .gaya-step {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 8px;
  }
  .gaya-step__header {
    padding: 14px 16px;
    gap: 10px;
  }
  .gaya-step__title {
    font-size: 15px;
  }
  .gaya-step__number {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .gaya-step__body {
    padding: 16px;
  }

  /* --- Checkout items: 2-kolumny (obraz + treść) --- */
  .gaya-checkout-item {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
  }
  .gaya-checkout-item__image-box {
    width: 80px;
    height: 80px;
    border-radius: 10px;
  }
  .gaya-checkout-item__image-box img {
    max-width: 64px;
    max-height: 72px;
  }
  .gaya-checkout-item__content {
    min-height: auto;
    gap: 6px;
  }
  .gaya-checkout-item__name,
  .gaya-checkout-item__name a {
    font-size: 15px;
    line-height: 20px;
  }
  .gaya-checkout-item__variant {
    font-size: 13px;
    line-height: 18px;
  }
  .gaya-checkout-item__footer {
    gap: 10px;
  }
  .gaya-checkout-item .gaya-qty-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
  .gaya-checkout-item__qty .quantity {
    gap: 10px;
  }
  .gaya-checkout-item__qty .qty {
    width: 24px !important;
    min-width: 24px;
    max-width: 24px;
    flex: 0 0 24px;
    font-size: 14px;
  }
  .gaya-checkout-item__subtotal {
    font-size: 14px;
  }
  .gaya-checkout-item__remove {
    margin-top: 2px;
  }

  /* --- "Dalej" button --- */
  .gaya-step__next {
    margin-top: 16px;
    padding: 14px 18px;
    font-size: 15px;
  }

  /* --- Billing/shipping form --- */
  .gaya-checkout .woocommerce-billing-fields__field-wrapper,
  .gaya-checkout .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: 1fr;
  }
  .gaya-checkout .woocommerce-billing-fields__field-wrapper p#billing_first_name_field,
  .gaya-checkout .woocommerce-billing-fields__field-wrapper p#billing_last_name_field,
  .gaya-checkout .woocommerce-shipping-fields__field-wrapper p#shipping_first_name_field,
  .gaya-checkout .woocommerce-shipping-fields__field-wrapper p#shipping_last_name_field {
    grid-column: 1 / -1;
  }

  /* --- Invoice fields: 1 column --- */
  .gaya-invoice-fields {
    grid-template-columns: 1fr;
  }

  /* --- Sidebar card: edge-to-edge --- */
  .gaya-checkout-sidebar__card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 18px 16px 20px;
  }

  /* --- Quick summary sections --- */
  .gaya-co-quick__head {
    gap: 8px;
  }
  .gaya-co-quick__title {
    font-size: 13px;
  }

  /* --- Payment icons: smaller on mobile --- */
  .gaya-co-quick__pay-icons img {
    height: 26px;
    width: 40px;
  }

  /* --- Shipping methods: pełne nazwy, nie ucięte --- */
  .gaya-shipping-option {
    padding: 10px;
    gap: 8px;
    border-radius: 8px;
  }
  .gaya-shipping-option__name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 13px;
    line-height: 18px;
  }
  .gaya-shipping-option__logo {
    max-height: 22px;
    max-width: 40px;
  }
  .gaya-shipping-option__price {
    font-size: 13px;
    flex-shrink: 0;
  }

  /* --- Review totals --- */
  .gaya-review__heading {
    font-size: 15px;
    margin: 14px 0 10px;
  }
  .gaya-review__row {
    font-size: 14px;
  }
  .gaya-review__row--total {
    font-size: 15px;
    flex-wrap: nowrap;
  }
  .gaya-review__row--total .gaya-review__label {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .gaya-review__row--total .gaya-review__value {
    text-align: right;
    min-width: 0;
  }

  /* --- Apaczka map button --- */
  .gaya-review__apaczka-map #apaczka_pl_geowidget_classic {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
  }

  /* --- Place order button: taller --- */
  .gaya-checkout-sidebar__card #place_order {
    padding: 16px 18px;
    font-size: 15px;
    margin-top: 14px;
  }

  /* --- Privacy text --- */
  .gaya-checkout-sidebar__card .woocommerce-privacy-policy-text {
    font-size: 11px;
    margin-top: 10px;
  }

  /* --- Payment gateway box (Axepta etc.) --- */
  .gaya-checkout-sidebar__card #payment {
    padding: 6px 0 0;
  }
  .gaya-checkout-sidebar__card #payment .payment_methods li {
    padding: 8px 0;
  }
}
