/* ===== CART MODAL ===== */

.cart-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.cart-box {
  background: #f3f3f3;
  width: 420px;
  max-width: 95%;
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  border-radius: 4px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  font-family: Verdana, Arial, sans-serif;
  font-size: 12px;
  display: flex;
  flex-direction: column;
}

.cart-header {
  background: #e5e5e5;
  padding: 8px 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
}

.close-btn {
  cursor: pointer;
  font-size: 14px;
}

.cart-items {
  padding: 10px;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  background: #f9f9f9;
  -webkit-overflow-scrolling: touch;
}

.cart-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px;
  border-bottom: 1px solid #ddd;
}

.cart-row .remove-link {
  color: red;
  font-size: 14px;
  cursor: pointer;
  margin-right: 4px;
}

.qty-box {
  width: 24px;
  height: 18px;
  font-size: 11px;
  text-align: center;
}

.cart-img {
  width: 42px;
  height: 58px;
  object-fit: cover;
}

.cart-info {
  flex: 1;
  line-height: 1.2;
}

.cart-price {
  font-weight: bold;
  margin-left: auto;
}

.cart-footer {
  background: #eee;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #ccc;
}

.shop-btn {
  background: #ddd;
  border: 1px solid #aaa;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 11px;
}

.checkout-btn {
  background: #F52E01;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 11px;
}

#cartTotal {
  margin-left: auto;
  font-weight: bold;
}

@media screen and (max-width: 600px) {
  .cart-box {
    margin: 10px auto;
    max-height: calc(100vh - 20px);
  }
}

#cartCounter {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #F52E01;
  color: white;
  padding: 8px 12px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 12px;
  cursor: pointer;
  z-index: 99998;
  border-radius: 3px;
  transition: 0.2s; 
}

#cartCounter:hover {
  background: #d62800;
}
