/* =========================================================
   CART.CSS
   - Override global .card min-height iz shop.css
   - Kompaktni topbar + summary (da nema praznog prostora)
========================================================= */

.cart-header{ margin-top: 6px; }
.cart-title{
  text-align:center;
  font-size: 34px;
  font-weight: 900;
  margin: 10px 0 6px;
  color:#111827;
}

/* ✅ bitno: global .card iz shop.css ima min-height:260px
   pa ovde prebijamo za kartične blokove korpe */
.card.cart-topbar,
.card.cart-summary,
.card.cart-empty,
.card.cart-card{
  min-height: auto !important;
}

.cart-empty{
  padding:18px;
  margin-top:14px;
}
.cart-empty p{
  margin:0;
  font-weight:800;
  color:#111827;
}
.cart-empty-actions{ margin-top: 12px; }

/* TOP BAR (kompaktno) */
.cart-topbar{
  padding: 12px 16px;
  margin-top: 14px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

/* TABLE CARD */
.cart-card{
  padding:0;
  margin-top:14px;
  overflow:hidden;
}

.cart-table-wrap{ width:100%; overflow:auto; }

.cart-table{
  width:100%;
  border-collapse: collapse;
  min-width: 860px; /* da ne “puca” na desktopu */
}
.cart-table thead th{
  background:#fff;
  padding:12px 14px;
  border-bottom: 1px solid #eef0f3;
  font-weight: 900;
  color:#111827;
  white-space: nowrap;
}
.cart-table tbody td{
  padding:12px 14px;
  border-top: 1px solid #eef0f3;
  vertical-align: middle;
  background:#fff;
}

.th-prod, .td-prod{ text-align:left; }
.th-price, .td-price{ text-align:right; }
.th-qty, .td-qty{ text-align:center; }
.th-total, .td-total{ text-align:right; }
.th-act, .td-act{ text-align:center; }

/* proizvod cell */
.cart-prod{
  display:flex;
  gap:12px;
  align-items:center;
  min-width: 320px;
}
.cart-prod .thumb{
  width:56px;
  height:56px;
  border-radius: 14px;
  border:1px solid #eef0f3;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex: 0 0 auto;
}
.cart-prod .thumb img{
  width:100%;
  height:100%;
  object-fit: contain;
  display:block;
}
.cart-prod .info{ line-height: 1.2; min-width:0; }
.cart-prod .name{
  font-weight: 900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 420px;
}
.cart-prod .name a{ text-decoration:none; }
.cart-prod .stock{
  color:#6b7280;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 800;
}

/* qty */
.qty-form{
  display:inline-flex;
  gap: 10px;
  align-items:center;
}
.qty-btn{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #d7dde6;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}
.qty-btn:hover{ background:#f5f7fb; }
.qty-val{
  min-width: 28px;
  text-align:center;
  font-weight: 900;
  color:#111827;
}

/* totals */
.td-total{ font-weight: 900; color:#111827; }

/* SUMMARY (kompaktno) */
.cart-summary{
  padding: 12px 16px;
  margin-top: 14px;
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
  align-items:center;
}
.cart-total{
  font-size: 18px;
  font-weight: 900;
  color:#111827;
}
.cart-summary-right{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
}

/* related */
.related-wrap{ margin-top: 18px; }
.related-title{
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 10px;
  color:#111827;
}

/* responsive */
@media (max-width: 640px){
  .cart-title{ font-size: 28px; }
  .qty-btn{ width: 34px; height: 34px; border-radius: 10px; }
  .cart-total{ font-size: 16px; }
  .cart-prod .name{ max-width: 220px; }
}
/* ===== CART RESPONSIVE ===== */
.cart-table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.cart-table{ min-width:720px; }

@media (max-width: 520px){
  .cart-summary-right{ display:grid; gap:10px; }
  .cart-summary-right .btn{ width:100%; }
}
