/* Cart FAB + drawer + qty steppers — Kerimov / ELSUTEX */
.kg-cart-fab, .kg-lk-fab {
  position: fixed;
  z-index: 60;
  right: 14px;
  bottom: 78px;
  width: 52px;
  height: 52px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #9a603f;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(60, 30, 12, 0.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.kg-lk-fab {
  bottom: 140px;
  background: #2c241c;
}
.kg-cart-fab:hover, .kg-lk-fab:hover { transform: translateY(-2px); }
.kg-cart-fab.pulse { transform: scale(1.08); }
.kg-cart-fab svg, .kg-lk-fab svg { width: 22px; height: 22px; display: block; }
.kg-cart-fab em {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 5px;
  border-radius: 999px;
  background: #2c241c;
  color: #fff;
  font: 700 11px/1.35em Karla, system-ui, sans-serif;
  font-style: normal;
  text-align: center;
  box-shadow: 0 0 0 2px #f7f1ea;
}
.kg-cart-fab em:empty,
.kg-cart-fab:not(.has-items) em { display: none; }

.kg-cart-drawer {
  position: fixed; inset: 0; z-index: 140;
  background: rgba(20,14,10,.45);
  display: flex; justify-content: flex-end;
}
.kg-cart-drawer[hidden] { display: none !important; }
.kg-cart-panel {
  width: min(420px, 100%);
  height: 100%;
  background: #f7f1ea;
  color: #2c241c;
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,.18);
}
.kg-cart-panel header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid rgba(154,96,63,.2);
  font: 700 18px/1.2 Karla, system-ui, sans-serif;
}
.kg-cart-panel header button {
  border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: inherit;
}
.kg-cart-list { flex: 1; overflow: auto; padding: 12px 16px; }
.kg-cart-row {
  display: grid; grid-template-columns: 64px 1fr 28px; gap: 10px;
  align-items: start; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.06);
}
.kg-cart-row img, .kg-ph {
  width: 64px; height: 80px; object-fit: cover; border-radius: 8px; background: #e8dfd5;
}
.kg-cart-row b { display: block; font-size: 14px; }
.kg-cart-row span { display: block; color: #6b5a4c; font-size: 12px; margin-top: 2px; }
.kg-cart-row em { display: block; margin-top: 6px; font-style: normal; font-weight: 700; }
.kg-cart-row button { border: 0; background: transparent; font-size: 22px; cursor: pointer; color: #8a6a55; }
.kg-cart-panel footer {
  padding: 14px 16px 20px; border-top: 1px solid rgba(154,96,63,.2);
  display: grid; gap: 10px; background: #fffaf5;
}
.kg-cart-footer-simple .kg-cart-total {
  font: 700 16px/1.2 Karla, system-ui, sans-serif;
}
.kg-checkout {
  margin-top: 4px; border: 0; border-radius: 12px; padding: 14px 16px;
  background: #9a603f; color: #fff; font: 700 15px/1 Karla, system-ui, sans-serif; cursor: pointer;
}
.kg-cart-hint { margin: 0; font-size: 12px; color: #7a6758; line-height: 1.35; }
.kg-cart-msg { margin: 0; font-size: 13px; color: #8b2e1a; }
.kg-cart-msg.ok { color: #2f6b3a; }
.kg-empty { color: #7a6758; padding: 24px 8px; text-align: center; }

.entry-buy-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 8px;
  margin-top: 8px;
  align-items: stretch;
}
.entry-cart-slot { min-width: 0; }
.entry-cart, .entry-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  text-align: center;
  border-radius: 10px;
  padding: 10px 8px;
  font: 600 13px/1 Karla, system-ui, sans-serif;
  text-decoration: none;
  box-sizing: border-box;
}
.entry-cart {
  border: 0; background: #2c241c; color: #fff; cursor: pointer;
}
.entry-buy { background: #9a603f; color: #fff; }

.kg-qty {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  min-height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: #2c241c;
  color: #fff;
}
.kg-qty button {
  border: 0;
  background: transparent;
  color: #fff;
  font: 700 20px/1 Karla, system-ui, sans-serif;
  height: 100%;
  min-height: 40px;
  cursor: pointer;
}
.kg-qty button:active { background: rgba(255,255,255,.12); }
.kg-qty span {
  text-align: center;
  font: 700 14px/1 Karla, system-ui, sans-serif;
}

/* Gallery: cart + WB on one row; no squeeze into fav column */
.gallery-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 48px !important;
  gap: 10px !important;
  align-items: stretch;
}
.gallery-cart-slot {
  grid-column: 1;
  min-width: 0;
}
.gallery-cart-slot .entry-cart,
.gallery-cart-slot .kg-qty {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
}
.gallery-buy {
  grid-column: 1;
  grid-row: 2;
  min-width: 0 !important;
  width: 100%;
}
.gallery-fav {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  height: auto !important;
  min-height: 100%;
}
.gallery-share {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  justify-self: stretch !important;
}

@media (max-width: 720px) {
  .kg-cart-fab { right: 12px; bottom: 72px; width: 48px; height: 48px; }
  .kg-lk-fab { right: 12px; bottom: 128px; width: 48px; height: 48px; }
  .entry-cart, .entry-buy { font-size: 12px; padding: 9px 6px; min-height: 38px; }
  .kg-qty { min-height: 38px; grid-template-columns: 36px 1fr 36px; }
  .kg-qty button { min-height: 38px; }
}
