/* Global Cart Styles: applied across all pages */

/* Cart dropdown container */
.cart-dropdown {
  position: relative;
}

.cart-dropdown .dropdown-menu.cart-dropdown-menu {
  min-width: 320px;
  max-width: 380px;
  padding: 12px 12px 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Products list inside dropdown */
.dropdown-cart-products {
  max-height: 360px;
  overflow-y: auto;
}

.dropdown-cart-products .product.cart-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.dropdown-cart-products .product.cart-product-item:last-child {
  border-bottom: none;
}

.product-image-container {
  flex: 0 0 70px !important;
  width: 70px !important;
  height: 70px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  background: #f8f9fa !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.product-image-container img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* Extra specificity to override any page-scoped styles */
.dropdown-cart-products .product.cart-product-item .product-image-container,
.dropdown-cart-products .cart-product-item .product-image-container {
  width: 70px !important;
  height: 70px !important;
}

.dropdown-cart-products .product.cart-product-item .product-image-container img,
.dropdown-cart-products .cart-product-item .product-image-container img {
  max-width: 100% !important;
  max-height: 100% !important;
}

.product-cart-details {
  flex: 1;
  min-width: 0; /* ensure text truncation works */
}

.product-cart-details .product-title {
  font-size: 14px;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-product-info {
  font-size: 13px;
  color: #666;
}

.btn-remove {
  margin-left: auto;
  color: #999;
}

/* Totals and actions */
.dropdown-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #eee;
}

.dropdown-cart-action {
  display: flex;
  gap: 10px;
  padding: 12px 0;
}

.dropdown-cart-action .btn {
  flex: 1;
}

/* Ensure consistent alignment for icon and counts in header */
.cart-dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-dropdown .cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background-color: #cc9966;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.cart-dropdown .cart-txt {
  display: inline-block;
  margin-left: 6px;
  align-self: center;
  line-height: 1;
  color: #cc9966;
  font-weight: 600;
}