/* ══════════════════════════════════════════
   CART PAGE
   https://golden-line.ru/
   NOTE: gl-breadcrumb, gl-page-h1, gl-page-sub, gl-toolbar — in main.css
══════════════════════════════════════════ */

#page-cart {
  min-height: 100vh;
}

.gl-cart-count {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gl-muted);
}

.gl-cart-continue {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gl-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.gl-cart-continue:hover { color: var(--gl-ink); }

/* ══════════════════════════════════════════
   LAYOUT — Items + Summary
══════════════════════════════════════════ */
.gl-cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: flex-start;
   background: #ffffff;
}

/* ── Cart Items ── */
.gl-cart-items {
  border-right: 1px solid var(--gl-line);
  background: #ffffff;
}

.gl-cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 0;
  border-bottom: 1px solid var(--gl-line);
  position: relative;
}

/* Item image */
.gl-ci-img {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-right: 1px solid var(--gl-line);
}

.gl-ci-img img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Item info */
.gl-ci-info {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.gl-ci-brand {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gl-muted);
  margin-bottom: 4px;
}

.gl-ci-name {
  font-size: 14px;
  color: var(--gl-ink);
  line-height: 1.4;
  margin-bottom: 6px;
  text-decoration: none;
}
.gl-ci-name:hover { text-decoration: underline; color: var(--gl-ink); }

.gl-ci-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--gl-muted);
  letter-spacing: 0.05em;
}

.gl-ci-meta span { display: flex; gap: 4px; }
.gl-ci-meta strong { color: var(--gl-ink); font-weight: 400; }

.gl-ci-inline-info {
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--gl-line);
  background: var(--gl-bg2);
  color: var(--gl-muted);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  animation: gl-cart-inline-info-in 0.18s ease both;
}
.gl-ci-inline-info[hidden] { display: none; }
.gl-ci-inline-info--notice,
.gl-ci-inline-info--error {
  border-color: var(--gl-line);
  background: var(--gl-bg2);
  color: var(--gl-muted);
}

@keyframes gl-cart-inline-info-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Quantity control */
.gl-ci-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--gl-line);
  width: fit-content;
}

.gl-ci-qty-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--gl-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.gl-ci-qty-btn:hover { color: var(--gl-ink); background: var(--gl-bg2); }

.gl-ci-qty-val {
  width: 36px;
  text-align: center;
  font-size: 13px;
  color: var(--gl-ink);
  border-left: 1px solid var(--gl-line);
  border-right: 1px solid var(--gl-line);
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Item price column */
.gl-ci-price-col {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 120px;
}

.gl-ci-price {
  font-size: 20px;
  color: var(--gl-ink);
  white-space: nowrap;
}

.gl-ci-price-old {
  font-size: 11px;
  color: var(--gl-muted);
  text-decoration: line-through;
}

.gl-ci-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gl-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.gl-ci-remove:hover { color: var(--gl-red); }

/* Empty cart */
.gl-cart-empty {
  padding: 80px 32px;
  text-align: center;
}

.gl-cart-empty-icon {
  color: var(--gl-line);
  margin: 0 auto 20px;
  width: fit-content;
}

.gl-cart-empty-title {
  font-family: var(--gl-disp);
  font-size: 36px;
  color: var(--gl-ink);
  margin-bottom: 8px;
}

.gl-cart-empty-text {
  font-size: 13px;
  color: var(--gl-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── Order Summary ── */
.gl-cart-summary {
  padding: 28px 28px 32px;
  position: sticky;
  top: calc(var(--nav-h) + 36px);
  background: #ffffff;
}

.gl-cs-title {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gl-ink);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gl-line);
}

.gl-cs-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--gl-muted);
  margin-bottom: 12px;
}

.gl-cs-row-val { color: var(--gl-ink); }

.gl-cs-row--total {
  font-size: 13px;
  color: var(--gl-ink);
  font-weight: 400;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--gl-line);
  margin-bottom: 0;
}

.gl-cs-row--total .gl-cs-row-val {
  font-size: 24px;
}

.gl-cs-promo {
  margin: 20px 0;
  display: flex;
  gap: 6px;
}

.gl-cs-promo-input {
  flex: 1;
  border: 1px solid var(--gl-line);
  background: none;
  padding: 10px 12px;
  font-family: var(--gl-body);
  font-size: 11px;
  color: var(--gl-ink);
  letter-spacing: 0.05em;
  transition: border-color 0.15s;
}
.gl-cs-promo-input::placeholder { color: var(--gl-muted); }
.gl-cs-promo-input:focus { outline: none; border-color: var(--gl-ink); }

.gl-cs-promo-btn {
  background: none;
  border: 1px solid var(--gl-line);
  font-family: var(--gl-body);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gl-ink);
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.gl-cs-promo-btn:hover { border-color: var(--gl-ink); background: var(--gl-bg2); }

.gl-cs-checkout {
  display: block;
  width: 100%;
  background: var(--gl-ink);
  color: var(--gl-bg);
  border: none;
  font-family: var(--gl-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
  margin-top: 20px;
}
.gl-cs-checkout:hover { background: #333; color: var(--gl-bg); }

.gl-cs-note {
  font-size: 10px;
  color: var(--gl-muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.gl-cs-divider {
  border: none;
  border-top: 1px solid var(--gl-line);
  margin: 20px 0;
}

/* Payment icons */
.gl-cs-pay {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.gl-cs-pay-icon {
  height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--gl-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gl-muted);
}

/* ── Related / Upsell ── */
.gl-cart-related {
  border-top: 1px solid var(--gl-line);
}


/* ══════════════════════════════════════════
   EMPTY STATE — Layout-Anpassungen
══════════════════════════════════════════ */

/* Layout: wenn leer → kein Summary-Panel */
.gl-cart-layout--empty {
  grid-template-columns: 1fr 360px;
}

/* Summary leer — nur Hinweis, kein Sticky-Problem */
.gl-cart-summary--empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 28px;
  background: var(--gl-bg2);
}

.gl-cs-empty-hint {
  text-align: center;
}

.gl-cs-empty-hint-text {
  font-size: 13px;
  color: var(--gl-muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

@media (max-width: 991.98px) {
  .gl-cart-layout { grid-template-columns: 1fr; }
  .gl-cart-items { border-right: none; }
  .gl-cart-summary {
    position: static;
    border-top: 1px solid var(--gl-line);
    padding: 24px 20px 28px;
  }
}

@media (max-width: 767.98px) {

  .gl-cart-item { grid-template-columns: 90px 1fr; }
  .gl-ci-price-col { display: none; }
  .gl-ci-info { padding: 14px 16px; }
  .gl-ci-inline-info { width: 100%; font-size: 10px; }
  .gl-ci-info-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .gl-ci-price-mobile {
    display: block;
    font-size: 18px;
    color: var(--gl-ink);
  }
  .gl-ci-remove--mobile { display: flex; }
  .gl-cart-empty { padding: 48px 16px; }
}

@media (min-width: 768px) {
  .gl-ci-price-mobile { display: none; }
  .gl-ci-remove--mobile { display: none; }
  .gl-ci-info-bottom { display: contents; }
}

/* MVC form normalization */
.gl-ci-price-col form,
.gl-ci-info-bottom form[data-cart-remove-form] {
  margin: 0;
}

.gl-ci-qty input[type="hidden"] {
  display: none;
}

.gl-cart-related {
  padding: 32px 0;
}

/* ══════════════════════════════════════════
   UX refinements — clearer cart flow
══════════════════════════════════════════ */
.gl-cart-intro {
  max-width: 520px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gl-muted);
}

.gl-cart-toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--gl-line);
}

.gl-cart-feedback {
  margin: 18px 20px 0;
  padding: 12px 14px;
  border: 1px solid var(--gl-line);
  background: var(--gl-bg2);
  font-size: 12px;
  line-height: 1.6;
  color: var(--gl-ink);
}
.gl-cart-feedback.is-error {
  border-color: var(--gl-red);
  color: var(--gl-red);
  background: #fff7f5;
}
.gl-cart-feedback[hidden] { display: none; }

.gl-cart-items-head {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--gl-line);
  background: var(--gl-bg2);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gl-muted);
}
.gl-cart-items-head span:last-child { text-align: right; }

.gl-cart-item {
  transition: opacity 0.2s ease, background 0.15s ease, transform 0.2s ease;
}
.gl-cart-item:hover { background: #fcfcfb; }
.gl-cart-item.is-updating {
  opacity: 0.62;
  pointer-events: none;
}

.gl-ci-main { min-width: 0; }

.gl-ci-article {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gl-muted);
}

.gl-ci-meta {
  flex-wrap: wrap;
  margin-top: 11px;
}
.gl-ci-meta > span {
  min-height: 24px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--gl-line);
  background: #fff;
}

.gl-ci-info-bottom {
  align-items: flex-end;
  gap: 18px;
}

.gl-ci-qty-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.gl-ci-qty-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gl-muted);
}
.gl-ci-qty-help {
  display: block;
  margin-top: -4px;
  font-size: 10px;
  color: var(--gl-muted);
}

.gl-ci-qty-btn:disabled,
.gl-ci-qty-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.35;
  background: none;
  color: var(--gl-muted);
}

.gl-ci-mobile-total {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.gl-ci-mobile-total-label,
.gl-ci-price-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gl-muted);
  margin-bottom: 5px;
}
.gl-ci-price-box { text-align: right; }
.gl-ci-unit-price {
  margin-top: 5px;
  font-size: 11px;
  color: var(--gl-muted);
  white-space: nowrap;
}

.gl-ci-remove {
  gap: 7px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 0;
}
.gl-ci-remove svg { flex-shrink: 0; }

.gl-cs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--gl-line);
}
.gl-cs-title {
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}
.gl-cs-subtitle {
  max-width: 210px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--gl-muted);
}
.gl-cs-head-count {
  padding: 4px 8px;
  border: 1px solid var(--gl-line);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gl-muted);
  white-space: nowrap;
}
.gl-cs-row--hidden { display: none; }
.gl-cs-row-val--discount { color: var(--gl-red); }
.gl-cs-row-val--delivery {
  max-width: 120px;
  text-align: right;
  line-height: 1.45;
}

.gl-cs-checkout {
  margin-top: 22px;
}
.gl-cs-continue-secondary {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid var(--gl-line);
  color: var(--gl-ink);
  background: none;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.gl-cs-continue-secondary:hover {
  color: var(--gl-ink);
  border-color: var(--gl-ink);
  background: var(--gl-bg2);
}

.gl-cs-hints {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--gl-line);
}
.gl-cs-hint {
  position: relative;
  padding-left: 16px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--gl-muted);
}
.gl-cs-hint::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--gl-ink);
  transform: translateY(-50%);
}

@media (max-width: 991.98px) {
  .gl-cart-intro { max-width: none; }
  .gl-cart-items-head { grid-template-columns: 1fr auto; padding: 12px 20px; }
}

@media (max-width: 767.98px) {
  .gl-cart-intro { font-size: 11px; }
  .gl-cart-toolbar-sep { display: none; }
  .gl-cart-items-head { display: none; }
  .gl-cart-feedback { margin: 12px 16px 0; }
  .gl-cart-item {
    grid-template-columns: 104px 1fr;
    min-height: 148px;
  }
  .gl-ci-img {
    padding: 12px;
    align-items: flex-start;
  }
  .gl-ci-img img { aspect-ratio: 3 / 4; }
  .gl-ci-info { gap: 14px; }
  .gl-ci-brand { font-size: 8px; }
  .gl-ci-name { font-size: 13px; }
  .gl-ci-meta {
    gap: 6px;
    margin-top: 9px;
  }
  .gl-ci-meta > span {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 10px;
  }
  .gl-ci-info-bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
  }
  .gl-ci-qty-wrap { gap: 6px; }
  .gl-ci-qty-help { display: none; }
  .gl-ci-qty-btn,
  .gl-ci-qty-val {
    height: 34px;
  }
  .gl-ci-mobile-total { display: flex; }
  .gl-ci-mobile-total-label { font-size: 8px; margin: 0; }
  .gl-ci-remove--mobile {
    grid-column: 1 / -1;
    justify-content: flex-start;
    width: fit-content;
    margin-top: 2px;
  }
  .gl-cart-summary { padding: 22px 16px 24px; }
  .gl-cs-head { margin-bottom: 16px; }
  .gl-cs-row--total .gl-cs-row-val { font-size: 22px; }
  .gl-cs-promo { flex-direction: column; }
  .gl-cs-promo-btn { width: 100%; }
}
