/* ============================
   CHECKOUT — checkout.css
   ============================ */

.checkout-main {
  padding-top: 64px;
  min-height: 100vh;
  background: var(--white);
}

.checkout-container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 48px;
  align-items: start;
}

/* ---- Titles ---- */
.checkout-title {
  font-size: 36px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.checkout-section-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ---- Cart empty ---- */
.cart-empty {
  text-align: center;
  padding: 64px 0;
}

.cart-empty p {
  font-size: 16px;
  color: var(--grey-text);
  margin-bottom: 24px;
}

/* ---- Cart items ---- */
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--grey-mid);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 12px;
  color: var(--grey-text);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--grey-mid);
  padding: 4px 8px;
}

.cart-item-qty button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  color: var(--black);
  transition: opacity 0.2s;
}

.cart-item-qty button:hover { opacity: 0.5; }

.cart-item-qty span {
  font-size: 14px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.cart-item-total {
  font-size: 15px;
  font-weight: 700;
  min-width: 72px;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey-text);
  padding: 4px;
  transition: color 0.2s;
}

.cart-item-remove:hover { color: var(--black); }

/* ---- Summary ---- */
.cart-summary {
  margin-top: 24px;
  border-top: 2px solid var(--black);
  padding-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  color: var(--grey-text);
}

.summary-total {
  font-size: 18px;
  font-weight: 900;
  color: var(--black);
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--grey-mid);
}

/* ---- Right panel ---- */
.checkout-right {
  position: sticky;
  top: 88px;
  background: var(--grey-light);
  padding: 40px 32px;
}

/* ---- Shipping options ---- */
.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.shipping-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--grey-mid);
  background: var(--white);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.shipping-option:has(input:checked) {
  border-color: var(--black);
}

.shipping-option input[type="radio"] {
  accent-color: var(--black);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.shipping-option-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.shipping-option-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.shipping-option-price {
  font-size: 14px;
  font-weight: 700;
}

/* ---- Zásilkovna ---- */
#packeta-picker-wrap {
  margin-bottom: 24px;
}

.btn-packeta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--black);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.btn-packeta:hover {
  background: var(--black);
  color: var(--white);
}

.packeta-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--grey-mid);
  font-size: 13px;
  font-weight: 600;
}

.packeta-change {
  margin-left: auto;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: underline;
  color: var(--black);
}

/* ---- Pay button ---- */
.btn-pay {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
  font-size: 15px;
  padding: 18px;
}

.btn-pay:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.checkout-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--grey-text);
  margin-top: 14px;
  text-align: center;
}

/* ---- Toast ---- */
.cart-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--black);
  color: var(--white);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  pointer-events: none;
}

.cart-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-link {
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  margin-left: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

/* ---- Cart badge v navu ---- */
.nav-cart {
  position: relative;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-badge {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

/* ---- Size selector modal ---- */
.size-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  backdrop-filter: blur(4px);
}

.size-modal-backdrop.active { display: block; }

.size-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 301;
  background: var(--white);
  padding: 40px;
  width: 90vw;
  max-width: 420px;
}

.size-modal.active { display: block; }

.size-modal h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 24px;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.size-btn {
  padding: 12px 4px;
  border: 2px solid var(--grey-mid);
  background: var(--white);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.size-btn:hover, .size-btn.selected {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.size-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .checkout-container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 24px;
  }
  .checkout-right {
    position: static;
  }
}
