/* ===================================
   Cart Page Styles
   =================================== */

.cart-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e5e5e5 !important;
  padding-bottom: 0 !important;
}

.cart-header .container-fluid {
  padding-bottom: 0;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f1f1f;
}

.btn-edit {
  background: none;
  min-width: 50px;
  text-align: right;
  border: none;
  color: #1f1f1f;
  font-size: 15px;
  font-weight: 400;
  padding: 5px 6px;
  cursor: pointer;
}

.cart-section {
  background-color: #f5f5f5;
  padding-bottom: 40px;
}

/* Store Header */
.store-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background-color: #ffffff;
  margin-bottom: 2px;
}

.store-header .form-check-input {
  margin: 0;
}

.store-header .store-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  gap: 4px;
}

.store-header .store-name > a {
  margin-left: auto;
}
.store-header .store-name i {
  font-size: 12px;
  color: #999999;
}

/* Custom checkbox styles */
.form-check-input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #e5e5e5;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-input[type="checkbox"]:checked {
  background: #fe2c55;
  border-color: #fe2c55;
}

.form-check-input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 7px;
  width: 7px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Cart Item Card */
.cart-item-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background-color: #ffffff;
  padding: 12px 16px;
  margin-bottom: 2px;
  position: relative;
  overflow: hidden;
}

/* Swipe to Delete Styles */
.cart-item-card .cart-item-content {
  position: relative;
  z-index: 2;
  background-color: #ffffff;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: transform 0.3s ease;
  touch-action: pan-y;
}

.cart-item-card .cart-item-content.edit-mode {
  transform: translateX(-100px); /* move left in edit mode */
}

.cart-item-card .cart-item-content .item-checkbox {
  margin: auto;
  width: 24px;
  height: 24px;
}

.cart-item-card .delete-background {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 95px;
  background: linear-gradient(135deg, #fe2c55, #ff6b9d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  cursor: pointer;
}

.cart-item-card .delete-background i {
  font-size: 18px;
}

.cart-item-card.removing {
  animation: slideOut 0.3s ease forwards;
  opacity: 0;
  transform: translateX(-100%);
}

@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateX(-100%);
    height: 0;
    padding: 0;
    margin: 0;
  }
}

.cart-item-card .form-check-input {
  margin-top: 4px;
}

.cart-item-images {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.cart-item-images img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.cart-item-variant {
  font-size: 13px;
  color: #111;
  background: #f0f0f0;
  display: inline-block;
  border-radius: 5px;
  padding: 1px 10px;
  align-items: center;
}

.cart-item-variant i {
  font-size: 12px;
}

.cart-item-variant-disabled {
  font-size: 13px;
  color: #888;
}

/* Cart Price Section */
.cart-price-quantity {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 4px;
}

.cart-price-section {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 700;
  color: #fe2c55;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-item-price i {
  font-size: 14px;
}

.cart-item-original {
  font-size: 12px;
  color: #888;
  text-decoration: line-through;
}

.cart-discount {
  background-color: #ffe5ec;
  color: #fe2c55;
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
}

/* Quantity Controls */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #e5e5e5;
  background-color: #ffffff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.quantity-btn:hover {
  background-color: #f5f5f5;
}

.quantity {
  font-size: 13px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
  color: #1f1f1f;
}

.cart-item-bonus {
  font-size: 12px;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.cart-item-bonus i {
  font-size: 14px;
}

/* Out of Stock Items */
.cart-item-card.out-of-stock {
  position: relative;
}

.stock-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgb(50 50 50 / 60%);
  color: #ffffff;
  padding: 4px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-align: center;
}

.btn-change-option {
  position: absolute;
  right: 16px;
  bottom: 12px;
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  color: #1f1f1f;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.btn-change-option:hover {
  background-color: #f5f5f5;
}

/* Vouchers Section */
.vouchers-section {
  background-color: #ffffff;
  padding: 12px 16px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.voucher-icon {
  font-size: 20px;
  color: #fe2c55;
}

.vouchers-section span {
  font-size: 14px;
  font-weight: 500;
  color: #1f1f1f;
}

/* Recommendations Section */
.recommendations-section {
  background-color: #f5f5f5;
  padding: 16px 0;
}

.recommendations-section .section-heading {
  font-size: 16px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 12px;
  padding: 0 16px;
}

/* Additional Product Card Styles for Cart Page */
.live-badge-small {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(254, 44, 85, 0.9);
  color: #ffffff;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.live-badge-small i {
  font-size: 10px;
}

.store-badge-red i {
  font-size: 9px;
}

.product-meta {
  font-size: 11px;
  color: #666666;
  margin-top: 2px;
}

.product-meta i {
  font-size: 10px;
}

.product-badges {
  margin-top: 4px;
}

.badge-new-customer i {
  font-size: 9px;
}

.voucher-badge-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background-color: rgba(254, 44, 85, 0.9);
  color: #ffffff;
  padding: 4px 6px;
  border-radius: 50%;
  font-size: 14px;
  z-index: 2;
}

.price-original {
  font-size: 11px;
  color: #999999;
}

/* Bottom Checkout Bar */
.bottom-checkout-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.checkout-left {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.checkout-left label {
  font-size: 14px;
  font-weight: 400;
  color: #1f1f1f;
  margin: 0;
  cursor: pointer;
  padding-bottom: 2px;
}

.checkout-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-total {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.total-amount {
  font-size: 16px;
  font-weight: 700;
  color: #fe2c55;
}

.checkout-total i {
  font-size: 12px;
  color: #666666;
}

.discount-info {
  position: absolute;
  bottom: -14px;
  left: 0;
  font-size: 10px;
  color: #10b981;
  white-space: nowrap;
}

.btn-checkout {
  background: linear-gradient(135deg, #fe2c55, #ff6b9d);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-checkout:hover {
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 375px) {
  .cart-item-title {
    font-size: 13px;
  }

  .cart-item-price {
    font-size: 14px;
  }

  .btn-checkout {
    padding: 8px 16px;
    font-size: 14px;
  }
}
