/* =========================================================================
   Lisaa-ostoskoriin -popup (#popup-cart, magnific popup) – SalesEsy-ilme.
   Korvaa vanhan popup_cart.css:n. Id-valitsimet (#popup-cart) jotta tyylit
   voittavat. Responsiivinen koko -> nakyy myos mobiilissa (mahtuu ruudulle).
   ========================================================================= */

#popup-cart{
  background:#fff;
  margin:0 auto;
  position:relative;
  width:min(95vw, 400px);
  max-width:95vw;
  max-height:85vh;
  overflow-y:auto;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(15,23,42,.25);
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
  color:#1f2430;
}

/* Otsikko + sulkunappi */
#popup-cart .cart-heading{
  display:flex; align-items:center; justify-content:space-between;
  background:#fff;
  border-bottom:1px solid #eee;
  color:#1f2430;
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:16px; font-weight:700; line-height:1.2;
  min-height:0;
  padding:14px 18px;
  text-align:left;
}
#popup-cart .popup-close{
  position:static; right:auto; top:auto;
  width:28px; height:28px; opacity:1;
  border-radius:999px; background:#f1efe8; color:#5f5e5a;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
#popup-cart .popup-close:before{
  content:"\f00d"; font-family:FontAwesome;
  position:static; right:auto; top:auto; width:auto; height:auto; opacity:1;
  font-size:14px; line-height:1; cursor:pointer;
}
#popup-cart .popup-close:hover{ background:#e6e3da; color:#1f2430; }

/* Tuoterivit */
#cart-content{ padding:6px 18px; width:100%; display:block; }
.cart-content .cart-row{
  display:flex; align-items:center; gap:10px;
  border-bottom:1px solid #f3f3f3; padding:8px 0;
}
.cart-content .cart-row:last-child{ border-bottom:none; }
.cart-content .thumb{ width:auto; flex:0 0 auto; text-align:center; display:block; }
.cart-content .thumb img{
  width:48px; height:48px; border-radius:8px; object-fit:cover;
  border:1px solid rgba(148,163,184,.25);
}
.cart-content .name{ flex:1; min-width:0; width:auto; display:block; font-size:13px; line-height:1.3; }
.cart-content .name a{ color:#1f2430; font-weight:600; text-decoration:none; }
.cart-content .quantity{ width:auto; display:block; font-size:12px; color:#6b7280; white-space:nowrap; text-align:center; }
.cart-content .total{ width:auto; display:block; font-size:13px; font-weight:700; white-space:nowrap; text-align:right; }
.cart-content .remove{ width:auto; display:block; text-align:right; }
.cart-content .btn-remove{
  background:none; border:0; color:#b01b2d; padding:4px; font-size:14px; cursor:pointer;
}

/* Summat */
.cart-total{ float:none; padding:12px 18px; width:auto; border-top:1px solid #eee; background:#faf9f6; }
.cart-total .totals > div{ display:flex; justify-content:space-between; align-items:baseline; padding:3px 0; }
.cart-total .title{ float:none; width:auto; text-align:left; font-size:13px; color:#6b7280; }
.cart-total .title strong{ font-weight:400; color:#6b7280; }
.cart-total .text{ font-size:13px; text-align:right; color:#1f2430; font-weight:700; }
.cart-total .totals > div:last-child .title strong{ color:#1f2430; font-weight:700; font-size:15px; }
.cart-total .totals > div:last-child .text{ color:#e0243a; font-weight:800; font-size:15px; }

/* Alaosa: Kassalle-nappi */
.cart-footer{
  background:#fff; border-top:none; border-radius:0 0 14px 14px;
  display:block; box-sizing:border-box; width:100%;
  padding:14px 18px 18px; text-align:center;
}
.cart-footer .button{ margin:0; }
.cart-footer .btn-checkout{
  display:block; background:#e0243a; border:0; text-decoration:none;
  color:#fff; font-size:15px; font-weight:600;
  padding:12px; border-radius:999px;
  box-shadow:0 8px 20px rgba(224,36,58,.25);
}
.cart-footer .btn-checkout:hover{ background:#b01b2d; color:#fff; }
.cart-footer .btn-cart{
  display:block; background:#5f5e5a; border:0; box-shadow:none;
  color:#fff; font-size:15px; padding:10px; border-radius:999px; margin-top:8px;
}

/* Hyvin kapea naytto: piilota pikkukuva tilan saastamiseksi */
@media (max-width:380px){
  .cart-content .thumb{ display:none; }
}
