/* Cart and Product Listing Styles */

/* Cart and Card container styling */
.block-cart,
.block-card {
  border-radius: 6px;
  padding: 5px 3px;
  background-color: #fafbff;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.03);
  margin-bottom: 10px;
}

/* Cart header styling - more compact */
.form-section-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  background-color: #f0f5ff;
  color: #0056b3;
  border-left: 4px solid #007bff;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Cart header icon */
.form-section-header i {
  margin-right: 8px;
  color: #007bff;
}

/* Compact header variant */
.form-section-header.compact {
  padding: 6px 10px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  background-color: #f8f9fa;
  border-left-width: 3px;
}

/* Loading state */
.block-cart.loading {
  opacity: 0.6;
  position: relative;
}

/* Product line item styling - more compact */
.block-cart .row,
.block-card .row {
  margin-bottom: 4px;
  padding: 4px 6px;
  border-radius: 3px;
  transition: all 0.2s ease;
  border-bottom: 1px solid #edf0f7;
  background-color: white;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

/* Highlighted product row (red background in image) */
.block-card .row.highlight-product,
.block-cart .row.highlight-product {
  background-color: #fff5f5;
  border-left: 3px solid #dc3545;
}

/* Special product-item class */
.block-cart .product-item,
.block-card .product-item,
.block-cart .row,
.block-card .row {
  display: flex;
  align-items: center;
}

/* Hover effect for product lines */
.block-cart .row:hover {
  background-color: #f0f5ff;
}

/* Columns styling - consistent across all row types */
.block-cart .col-5,
.block-card .col-5,
.block-cart .col-6,
.block-card .col-6,
.block-cart .col-7,
.block-card .col-7 {
  padding: 0;
}

/* Product title styling */
.block-cart .col-7.text-sm,
.block-card .col-7.text-sm {
  font-weight: 500;
  color: #333;
  font-size: 0.85rem;
  line-height: 1.2;
}

/* Price styling */
.block-cart .col-5.text-right,
.block-card .col-5.text-right,
.block-cart .col-6.text-right,
.block-card .col-6.text-right {
  font-weight: 600;
  color: #0056b3;
  font-size: 0.85rem;
  line-height: 1.2;
}

/* Discount styling */
.block-cart .text-danger,
.block-card .text-danger {
  color: #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.08);
  border-radius: 3px;
  padding: 1px 4px;
  margin-right: 3px;
  display: inline-block;
  font-weight: 500;
  font-size: 0.75rem;
}

/* Special promo styling */
.block-cart .text-support2,
.block-card .text-support2 {
  color: #28a745 !important;
  font-size: 0.75rem;
}

/* Final price highlight */
.block-cart .col-5.text-right strong,
.block-card .col-5.text-right strong {
  color: #0056b3;
  font-size: 0.95rem;
}

/* Discount price styling */
.block-cart span[style*="text-decoration: line-through"],
.block-card span[style*="text-decoration: line-through"] {
  color: #6c757d;
  opacity: 0.8;
  margin-right: 3px;
  font-size: 0.85rem;
}

/* Price display container */
.price-display {
  display: inline-block;
  white-space: nowrap;
}

/* Admin product line styling */
.product-line-for-admin {
  cursor: pointer;
  border-left: 3px solid #0056b3;
}

/* Admin product line hover */
.product-line-for-admin:hover {
  background-color: #e7f0ff !important;
}

/* Admin grand-total line hover */
.grand-total-row:hover {
  background-color: rgba(
    0,
    179,
    60,
    0.1
  )!important; /* Light green background */
}

/* Adding subtle icon to admin lines */
.product-line-for-admin .fa-percentage,
.product-line-for-admin .fa-calculator {
  color: #0056b3;
  margin-right: 5px;
  font-size: 0.85rem;
}

/* Special styling for grand total calculator icon */
.grand-total-row .fa-calculator {
  color: #00b33c;
  margin-right: 5px;
  font-size: 0.85rem;
}

/* HR separators */
.block-cart hr,
.block-card hr {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  opacity: 0.25;
}

/* Shipping line styling */
#shipping-row {
  margin-bottom: 4px;
  padding: 4px 6px;
  border-radius: 3px;
  background-color: #f5f7fa;
  display: flex;
  align-items: center;
}

#shipping-row .col-6:first-child {
  font-weight: 500;
  color: #495057;
  font-size: 0.85rem;
  padding: 0;
}

#shipping-row .col-6.text-right {
  font-weight: 600;
  color: #0056b3;
  padding: 0;
}

#shipping-row #shipping-price-1 {
  margin: 0;
  font-size: 0.85rem;
}

/* Total lines styling */
.block-cart .row:not(#shipping-row):not([id^="product-for-list"]),
.block-card .row:not(#shipping-row):not([id^="product-for-list"]) {
  margin-bottom: 4px;
  padding: 4px 6px;
  border-radius: 3px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
}

/* Grand total special styling */
.grand-total-row {
  background-color: rgba(
    0,
    179,
    60,
    0.1
  ) !important; /* Light green background */
  padding: 4px 6px;
  border-radius: 3px !important;
  margin-top: 3px !important;
  border-left: 3px solid #00b33c; /* Green left border */
}

.grand-total-row .col-6:first-child {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
}

.grand-total-row .col-6:first-child label {
  margin-bottom: 0;
  font-weight: 600;
}

.grand-total-row .col-6.text-right {
  font-weight: 700;
  color: #00b33c;
  padding: 0;
}

.grand-total-row #grand-total {
  font-weight: 700 !important;
  font-size: 0.95rem;
  color: #00b33c !important;
  padding: 0;
}

/* Ensure the grand total product line admin has green styling */
.product-line-for-admin.grand-total-row {
  border-left: 3px solid #00b33c !important;
}

/* Subtotal styling */
.subtotal-row {
  background-color: #f5f7fa !important;
}

.subtotal-row .col-6 {
  padding: 0;
  font-size: 0.85rem;
}

.subtotal-row strong {
  font-size: 0.85rem;
}

/* Taxes row styling */
.taxes-row {
  background-color: #f5f7fa !important;
}

.taxes-row .col-6 {
  padding: 0;
  font-size: 0.85rem;
}

.taxes-row strong {
  font-weight: 600;
  font-size: 0.85rem;
}
