/* === RESET I STRUKTURA OGÓLNA === */
body,
.checkout-start-body,
.checkout-start-bg{
  height: auto;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

.checkout-start-bg {
  display: flex;
  background: #f2f2f2;
  align-items: center;
  justify-content: center;
  padding: 20px 15px 40px 15px;
}

.checkout-start-box {
  background: #fff;
  max-width: 1200px;
  width: 100%;
  padding: 50px;
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.08);
}

.checkout-start-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* === LOGO === */
.checkout-logo {
  text-align: center;
  margin-bottom: 40px;
}
.checkout-logo img {
  height: 56px;
  width: auto;
}

/* === LAYOUT: STRONA STARTOWA === */
.checkout-start-main {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
}

.checkout-left,
.checkout-right {
  flex: 0 0 460px;
  max-width: 420px;
  min-width: 280px;
  width: 100%;
  margin: 0 40px;
  box-sizing: border-box;
}

.checkout-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #000;
}

.checkout-sub {
  color: #666;
  margin-bottom: 24px;
  font-size: 16px;
}

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.checkout-benefits {
  margin-bottom: 28px;
  text-align: left;
}
.checkout-benefits h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.checkout-benefits ul {
  list-style: none;
  padding-left: 0;
  font-size: 15px;
  color: #333;
}
.checkout-benefits li::before {
  content: '✓';
  color: var(--a-global-color-primary, #CD8F5C);
  margin-right: 8px;
}

.checkout-footer-info {
  margin-top: 40px;
  font-size: 12px;
  color: #666;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  display: flex;
}
.checkout-footer-info a {
  font-weight: 600;
  color: var(--a-global-color-primary, #CD8F5C);
  text-decoration: none;
}
.checkout-footer-info a:hover {
  text-decoration: underline;
}
.privacy-info {
  font-size: 12px;
  width: 300px;
  margin: 10px 0;
}

/* === LAYOUT: CHECKOUT GŁÓWNY === */
.checkout-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.checkout-left-box {
  flex: 0 1 55%;
  max-width: 100%;
  min-width: 280px;
  background: #fff;
  border-radius: 12px;
  box-sizing: border-box;
  margin-top: 10px;
  width: 100%;
}

.checkout-right-wrap {
  flex: 0 1 35%;
  max-width: 35%;
  min-width: 280px;
  width: 100%;
  box-sizing: border-box;
  align-self: flex-start;
  position: relative;
}


/* === FORMULARZ – STRUKTURA I WALIDACJA === */
.billing-grid {
  display: grid;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(2, 1fr);
}
.billing-grid.full {
  grid-template-columns: 1fr;
}
.billing-grid.double {
  grid-template-columns: 1fr 1fr;
  margin: 23px 0;
}
@media (max-width: 900px) {
  .billing-grid,
  .billing-grid.double {
    grid-template-columns: 1fr;
  }
}


/* Checkbox */
#ship-to-different-address-checkbox {
  accent-color: var(--a-global-color-primary, #CD8F5C);
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #000;
  margin-top: 28px;
  margin-bottom: 8px;
}

.checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--a-global-color-primary, #CD8F5C);
  cursor: pointer;
}

.checkbox-label-text {
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

/* === PODSUMOWANIE ZAMÓWIENIA === */
.checkout-summary-values {
  font-size: 16px;
}
.checkout-summary-values p {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  color: #222;
}
.checkout-total {
  font-size: 19px;
  font-weight: 700;
  color: #000;
  margin-top: 14px;
}
.checkout-savings {
  font-size: 15px;
  font-weight: 600;
  color: var(--a-global-color-primary, #CD8F5C);
}
.checkout-total-pay {
  margin-top: 28px;
}

/* Przycisk checkout - żółty domyślnie, czarny na hover */
.checkout-total-pay .btnc,
.cn-summary .btnc {
  width: 100%;
  padding: 18px 0;
  background: #FBCF0B;
  color: #222;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.17s, color 0.17s;
  letter-spacing: 0.02em;
  text-align: center;
  display: block;
  text-decoration: none;
}
.checkout-total-pay .btnc:hover,
.cn-summary .btnc:hover {
  background: #111;
  color: #fff;
}
.checkout-total-pay .btnc:focus-visible,
.cn-summary .btnc:focus-visible {
  outline: 3px solid var(--a-global-color-primary, #CD8F5C);
  outline-offset: 2px;
}

/* === REVIEW ZAMÓWIENIA === */
.checkout-review {
  margin-top: 40px;
  width: 100%;
}
.checkout-subtitle {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #000;
  padding-left: 0;
}
.order-review-box {
  background: #fff;
  border-radius: 10px;
  padding: 0;
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
  margin-top: 24px;
}
.review-order-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
  color: #222;
}
.review-order-table thead th {
  text-align: left;
  padding-bottom: 12px;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}
.review-order-table td {
  padding: 12px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}
.review-order-table .product-thumbnail img {
  width: 50px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}
.review-order-table .product-name {
  font-weight: 500;
  color: #111;
}
.review-order-table .product-qty {
  text-align: center;
  color: #666;
}
.review-order-table .product-total {
  text-align: right;
  font-weight: 600;
}

/* === KWOTY PODSUMOWANIA === */
.order-summary-totals {
  border-top: 1px solid #ddd;
  padding-top: 16px;
  font-size: 15px;
}
.order-summary-totals .summary-row,
.order-summary-totals .summary-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.order-summary-totals .summary-total {
  font-size: 17px;
  font-weight: 700;
  border-top: 2px solid #000;
  padding-top: 14px;
  color: #000;
}

/* === METODY PŁATNOŚCI === */
ul.payment-methods {
  margin: 0;
  padding: 0;
  list-style: none;
}

.payment-method {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 1px solid #eee;
}

.payment-method:last-child {
  border-bottom: none;
}

.payment-method input[type="radio"].input-radio {
  width: 18px;
  height: 18px;
  accent-color: #000;
  margin: 0;
  cursor: pointer;
}

.payment-method label {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  color: #222;
  cursor: pointer;
  margin: 0;
}

.payment-method .payment-box {
  width: 100%;
  padding: 12px 0 0 30px;
  font-size: 14px;
  color: #666;
}

/* Loga banków Przelewy24 - wycentrowane, tekst do lewej */
.payment-method .payment-box {
  text-align: left;
}

.payment-method .payment-box p {
  text-align: left;
}

.payment-method .payment-box img {
  display: inline-block;
  margin: 5px;
  vertical-align: middle;
}

.payment-method .payment-box ul,
.payment-method .payment-box .p24-channels,
.payment-method .payment-box .p24-available-channels,
.payment-method .payment-box .przelewy24-channels,
.payment-method .payment-box div[class*="channel"],
.payment-method .payment-box div[class*="bank"] {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 0 !important;
  list-style: none !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.payment-method .payment-box ul li,
.payment-method .payment-box .p24-channels li,
.payment-method .payment-box label,
.payment-method .payment-box .p24-channel-item,
.payment-method .payment-box div[class*="channel"] > *,
.payment-method .payment-box input[type="radio"] + label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 4px !important;
}

/* Przelewy24 specifyczne klasy */
#payment .payment_method_przelewy24 .payment-box,
.wc_payment_method.payment_method_przelewy24 .payment_box {
  text-align: center !important;
}

#payment .payment_method_przelewy24 .payment-box img,
.wc_payment_method.payment_method_przelewy24 .payment_box img {
  display: inline-block !important;
  margin: 5px !important;
}

/* === DOTPAY - Logotypy banków === */
/* Nadpisanie media queries wtyczki Dotpay (payment_widget.min.css) */
/* Wtyczka używa: 200px=100%, 400px=49%, 600px=32.33%, 800px=24% */
/* My chcemy: mobile=48% (2 w rzędzie), desktop=32% (3 w rzędzie) */

.payment-method .channels-wrapper {
  max-width: 100% !important;
  margin: 10px 0 !important;
}

/* Bazowe style dla channel-container - nadpisanie wszystkich breakpointów wtyczki */
.payment-method .channels-wrapper .channel-container,
.payment_method_dotpay .channels-wrapper .channel-container,
#payment .channels-wrapper .channel-container,
.woocommerce-checkout .channels-wrapper .channel-container,
body .channels-wrapper .channel-container {
  min-height: 100px !important;
  min-width: 140px !important;
  width: 32% !important;
  margin: 0.5% !important;
  box-sizing: border-box !important;
}

.payment-method .channels-wrapper .image-container {
  top: 10px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  width: 100% !important;
  text-align: center !important;
}

.payment-method .channels-wrapper .image-container img {
  min-width: 100px !important;
  min-height: 50px !important;
  max-height: 60px !important;
  max-width: 90% !important;
  object-fit: contain !important;
}

.payment-method .channels-wrapper .label-container {
  top: 70% !important;
  height: auto !important;
}

.payment-method .channels-wrapper .label-container label {
  font-size: 1em !important;
}

/* Nadpisanie WSZYSTKICH media queries wtyczki Dotpay */
/* min-width: 200px - wtyczka daje 100%, my też chcemy 48% na mobile */
@media (min-width: 200px) {
  .payment-method .channels-wrapper .channel-container,
  .payment_method_dotpay .channels-wrapper .channel-container,
  #payment .channels-wrapper .channel-container,
  .woocommerce-checkout .channels-wrapper .channel-container,
  body .channels-wrapper .channel-container {
    width: 48% !important;
  }
}

/* min-width: 400px - wtyczka daje 49%, my chcemy 48% */
@media (min-width: 400px) {
  .payment-method .channels-wrapper .channel-container,
  .payment_method_dotpay .channels-wrapper .channel-container,
  #payment .channels-wrapper .channel-container,
  .woocommerce-checkout .channels-wrapper .channel-container,
  body .channels-wrapper .channel-container {
    width: 48% !important;
  }
}

/* min-width: 600px - wtyczka daje 32.33%, my też chcemy 32% */
@media (min-width: 600px) {
  .payment-method .channels-wrapper .channel-container,
  .payment_method_dotpay .channels-wrapper .channel-container,
  #payment .channels-wrapper .channel-container,
  .woocommerce-checkout .channels-wrapper .channel-container,
  body .channels-wrapper .channel-container {
    width: 32% !important;
  }
}

/* min-width: 800px - wtyczka daje 24%, my chcemy 32% (3 w rzędzie) */
@media (min-width: 800px) {
  .payment-method .channels-wrapper .channel-container,
  .payment_method_dotpay .channels-wrapper .channel-container,
  #payment .channels-wrapper .channel-container,
  .woocommerce-checkout .channels-wrapper .channel-container,
  body .channels-wrapper .channel-container {
    width: 32% !important;
    min-height: 100px !important;
    min-width: 140px !important;
  }
}

/* Mobile specyficzne - dla urządzeń < 600px zawsze 2 w rzędzie */
@media (max-width: 599px) {
  .payment-method .channels-wrapper .channel-container,
  .payment_method_dotpay .channels-wrapper .channel-container,
  #payment .channels-wrapper .channel-container,
  .woocommerce-checkout .channels-wrapper .channel-container,
  body .channels-wrapper .channel-container {
    width: 48% !important;
    min-height: 90px !important;
    min-width: 100px !important;
  }

  .payment-method .channels-wrapper .image-container img {
    min-width: 80px !important;
    max-height: 50px !important;
  }
}

/* === DOTPAY - Checkboxy zgód (Regulamin PayPro) === */
.payment-method .dotpay_agreements,
.payment-method .payment_box .dotpay_agreements,
.payment_method_dotpay .dotpay_agreements {
  display: block !important;
  margin: 15px 0 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* Pierwszy checkbox - Akceptuję Regulamin */
.payment-method .dotpay_agreements label,
.payment_method_dotpay .dotpay_agreements label {
  display: inline !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.payment-method .dotpay_agreements input[type="checkbox"],
.payment_method_dotpay .dotpay_agreements input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin-right: 6px !important;
  vertical-align: middle !important;
}

/* Linki w zgodach */
.payment-method .dotpay_agreements a,
.payment_method_dotpay .dotpay_agreements a {
  color: #CD8F5C !important;
  text-decoration: underline !important;
  margin: 0 2px !important;
}

.payment-method .dotpay_agreements a:hover,
.payment_method_dotpay .dotpay_agreements a:hover {
  color: #a5703d !important;
}

/* Tekst klauzuli informacyjnej - druga linia */
.payment-method .dotpay_agreements br + *,
.payment-method .dotpay_agreements > span:not(:first-child),
.payment_method_dotpay .dotpay_agreements br + * {
  display: block !important;
  margin-top: 10px !important;
  font-size: 12px !important;
  color: #555 !important;
  line-height: 1.5 !important;
}

/* Gwiazdka przed tekstem */
.payment-method .dotpay_agreements,
.payment_method_dotpay .dotpay_agreements {
  word-spacing: normal !important;
  letter-spacing: normal !important;
}

/* Sekcja płatności - bez ramki */
.checkout-payment {
  background: transparent;
}
/* Główne tło strony */
.cn-body {
  background-color: #f7f7f7;
  padding: 20px;
}

/* Główna karta */
.cn-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  max-width: 1200px;
  margin: 20px auto;
  padding: 40px 34px;
  box-sizing: border-box;
}

/* Logo w centrum */
.cn-logo {
  text-align: center;
  margin-bottom: 30px;
}

/* Grid 2 kolumny */
.cn-grid {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 40px;
}

.cn-main {
  min-height: 900px;
}

.cn-form label {
  display: block;
  margin-bottom: 16px;
  font-weight: 500;
}

.cn-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 6px;
  box-sizing: border-box;
}

/* Podsumowanie */
.cn-summary {
  position: relative;
}

.cn-summary-inner {
  position: static;
  top: auto;
  width: auto;
  transition: top 0.2s ease;
}

.cn-summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.cn-summary-list li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 16px;
}

.cn-savings strong {
  color: #d32f2f;
}

.cn-btn-pay {
  width: 100%;
  padding: 14px 0;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.cn-summary-sticky-wrap {
  position: relative;
}

.cn-summary-placeholder {
  height: 0;
  transition: height 0.25s ease;
}

/* Responsywność */
@media (max-width: 992px) {
  .cn-grid {
    grid-template-columns: 1fr;
  }

  .cn-summary-inner {
    position: static;
    top: auto;
    width: auto;
  }

  .cn-main {
    min-height: auto;
  }
}

/* Mobile: Podsumowanie NA DOLE (pod formularzem) */
@media (max-width: 768px) {
  .cn-grid {
    display: flex !important;
    flex-direction: column !important;
  }

  .cn-grid > .cn-main,
  .cn-grid > section.cn-main {
    order: 1 !important;
  }

  .cn-grid > .cn-summary-sticky-wrap,
  .cn-grid > div.cn-summary-sticky-wrap {
    order: 2 !important;
  }

  .cn-main {
    min-height: auto !important;
  }
}
.checkout-right-scroll {
    background: #f9f9f9;
    padding: 20px 30px;
	margin-top:15px;
}

















.term-box {
  position: relative;
  border-radius: 6px;
  padding: 10px 12px;
}

.term-box.error label.checkbox {
  border: 2px solid #dc3545;
  background-color: #fff0f0;
}

.term-box.success label.checkbox {
  border: 2px solid #3cb371;
  background-color: #f0fff5;
}

/* Ikony ✔ ✕ */
.term-box .form-icon::after {
  content: '';
  display: none;
}

.term-box.error .form-icon::after {
  content: '✕';
  color: #dc3545;
  font-weight: bold;
  font-size: 18px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: block;
}

.term-box.success .form-icon::after {
  content: '✔';
  color: #3cb371;
  font-weight: bold;
  font-size: 18px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: block;
}

/* Link regulamin - musi być klikalny */
.term-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.term-box .woocommerce-terms-and-conditions-link {
  color: #CD8F5C;
  text-decoration: underline;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 10;
  font-size: 14px;
}

.term-box .woocommerce-terms-and-conditions-link:hover {
  color: #a5703d;
}

/* Sekcja dostawy - bez ramki i tła */
.checkout-shipping-summary {
  background: transparent;
}

.shipping-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-top: 12px;
}

.shipping-summary-row .product-thumbnail {
  font-weight: 600;
}

.shipping-summary-row .product-total {
  font-weight: 600;
  color: #000;
}

tr {
  display: table-row;
  vertical-align: inherit;
  unicode-bidi: isolate;
  border: none;
}

.checkout-shipping-infobox textarea {
  resize: vertical;
}

/* === METODY DOSTAWY - bez tła i ramki === */
#shipping-method-section #shipping-method-wrapper,
#shipping-method-section .shipping-method-list,
.checkout-shipping-summary #shipping-method-wrapper,
.checkout-shipping-summary .shipping-method-list {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
}

#shipping-method-section .shipping-method-list,
.checkout-shipping-summary .shipping-method-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none !important;
}

#shipping-method-section .shipping-method-row,
#shipping-method-section label.shipping-method-row,
.checkout-shipping-summary .shipping-method-row,
.checkout-shipping-summary label.shipping-method-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  border: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

#shipping-method-section .shipping-method-row input[type="radio"],
.checkout-shipping-summary .shipping-method-row input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #000;
  margin: 0;
}

#shipping-method-section .shipping-method-row .method-name,
.checkout-shipping-summary .shipping-method-row .method-name {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  color: #222;
}

#shipping-method-section .shipping-method-row .method-cost,
.checkout-shipping-summary .shipping-method-row .method-cost {
  font-weight: 600;
  color: #000;
}

#shipping-method-section .shipping-method-row.selected,
.checkout-shipping-summary .shipping-method-row.selected {
  background: transparent !important;
  background-color: transparent !important;
}

.shipping-notice {
  color: #666;
  font-size: 14px;
  padding: 10px 0;
}


/* ---- MOBILNE MEDIA QUERY ---- */
@media (max-width: 768px) {
  .checkout-logo,
  .cn-logo {
    display: none;
  }

  .checkout-start-bg {
    padding: 10px 15px 40px 15px;
  }

  .checkout-left, .checkout-right {
    flex: 0 0 100%;
    max-width: 100%;
    min-width: 280px;
    width: 100%;
    margin: 0;
  }

  .checkout-start-box {
    max-width: 400px;
    width: 100%;
    padding: 16px 10px;
    margin: 0 auto 18px auto;
  }

  .checkout-start-main {
    gap: 10px;
  }

  .billing-grid {
    display: grid;
    gap: 7px; /* tylko jedna wartość! */
  }

  .billing-grid.double {
    margin: 5px 0;
  }

  .cn-body {
    padding: 5px 15px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    margin-bottom: 5px;
  }

  .cn-card {
    padding: 20px 14px;
  }
}

/* ---- CHECKOUT MOBILE BAR ---- */
.checkout-mobile-bar {
  display: none;
}

@media (max-width: 768px) {
  .checkout-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .checkout-menu-btn,
  .checkout-cart-btn {
    background: none;
    border: none;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .checkout-menu-btn:hover,
  .checkout-cart-btn:hover {
    color: #CD8F5C;
    background-color: rgba(205, 143, 92, 0.1);
  }

  .checkout-menu-btn:focus-visible,
  .checkout-cart-btn:focus-visible {
    outline: 2px solid #CD8F5C;
    outline-offset: 2px;
  }

  .checkout-mobile-logo img {
    height: 28px;
    width: auto;
  }
}
