/* =================================================================
   Cart Modal — popup "Dodano do koszyka"
   ================================================================= */

.gl-cart-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.gl-cart-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* Overlay */
.gl-cart-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

/* Dialog */
.gl-cart-modal__dialog {
  position: relative;
  background: #fff;
  width: 95%;
  max-width: 860px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  transform: translateY(20px) scale(.97);
  transition: transform .3s ease;
  overflow: hidden;
}
.gl-cart-modal.is-open .gl-cart-modal__dialog {
  transform: translateY(0) scale(1);
}

/* Header */
.gl-cart-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid #eee;
  background: #f9fafb;
}
.gl-cart-modal__header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gl-cart-modal__title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
}
.gl-cart-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
  line-height: 1;
  transition: color .2s;
}
.gl-cart-modal__close:hover {
  color: #111;
}

/* Body — 3 columns */
.gl-cart-modal__body {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: 24px;
  padding: 28px;
  align-items: start;
}

/* Product image */
.gl-cart-modal__product-image {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}
.gl-cart-modal__product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Product info */
.gl-cart-modal__product-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gl-cart-modal__product-name {
  font-size: 17px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin: 0;
}

/* Qty row */
.gl-cart-modal__qty-row {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}
.gl-cart-modal__qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.gl-cart-modal__qty-btn:hover {
  background: #f3f4f6;
}
.gl-cart-modal__qty-val {
  min-width: 44px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #222;
}

/* Price row */
.gl-cart-modal__price-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  font-size: 15px;
  color: #555;
}
.gl-cart-modal__price-value {
  font-size: 22px;
  font-weight: 700;
  color: #111;
}

/* Summary panel */
.gl-cart-modal__summary {
  background: #f5f6f8;
  border-radius: 10px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gl-cart-modal__summary-text {
  font-size: 14px;
  color: #444;
  margin: 0;
  line-height: 1.6;
}
.gl-cart-modal__summary-total-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #222;
  margin: 8px 0 0;
}
.gl-cart-modal__summary-total {
  font-size: 20px;
  font-weight: 700;
  color: #22c55e;
  margin: 0;
}

/* Shipping box */
.gl-cart-modal__shipping {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  background: #e8eef6;
  border-radius: 8px;
  padding: 14px 16px;
  border-left: 4px solid #1e3a5f;
}
.gl-cart-modal__shipping--done {
  background: #e6fbe9;
  border-left-color: #22c55e;
}
.gl-cart-modal__shipping-icon {
  flex-shrink: 0;
}
.gl-cart-modal__shipping-icon svg {
  display: block;
}
.gl-cart-modal__shipping-text {
  font-size: 14px;
  color: #1e3a5f;
  line-height: 1.5;
}
.gl-cm-ship-amount {
  color: #22c55e;
  font-size: 16px;
}

/* Footer */
.gl-cart-modal__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 28px;
  border-top: 1px solid #eee;
  background: #f9fafb;
}
.gl-cart-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.gl-cart-modal__btn--outline {
  border: 2px solid #1e3a5f;
  color: #1e3a5f;
  background: #fff;
}
.gl-cart-modal__btn--outline:hover {
  background: #f0f4f8;
}
.gl-cart-modal__btn--solid {
  border: 2px solid #1e3a5f;
  color: #fff;
  background: #1e3a5f;
}
.gl-cart-modal__btn--solid:hover {
  background: #162d4a;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .gl-cart-modal__body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }
  .gl-cart-modal__product-image {
    max-width: 160px;
    margin: 0 auto;
  }
  .gl-cart-modal__footer {
    grid-template-columns: 1fr;
    padding: 16px 20px;
  }
  .gl-cart-modal__dialog {
    max-height: 90vh;
    overflow-y: auto;
  }
}
