.cart-line-details {
  margin-top: 0.75rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.cart-line-details--compact {
  margin-top: 0.5rem;
}

.cart-line-details--collapsible {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.cart-line-details--collapsible[open] {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cart-line-details__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.cart-line-details__summary::-webkit-details-marker {
  display: none;
}

.cart-line-details__summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
}

.cart-line-details--collapsible[open] .cart-line-details__summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.cart-line-details__summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cart-line-details__summary-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.cart-line-details__summary-preview {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

.cart-line-details__summary-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.cart-line-details--collapsible .cart-line-details__list {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 0;
  padding-top: 0.75rem;
}

.cart-line-details:not(.cart-line-details--collapsible) {
  padding: 0.75rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--primary_color, #017961);
  border-radius: 8px;
}

.cart-line-details__heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.cart-line-details__list {
  display: grid;
  gap: 0.5rem;
}

.cart-line-details__list--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.cart-line-details__row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  min-width: 0;
}

.cart-line-details__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
}

.cart-line-details__value {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  word-break: break-word;
}

/* Cart line item card */
.cart-line-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.cart-line-item__header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.cart-line-item__media {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: block;
}

.cart-line-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-line-item__body {
  flex: 1;
  min-width: 0;
}

.cart-line-item__name {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.cart-line-item__name:hover {
  color: var(--primary_color, #017961);
}

.cart-line-item__person {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin: 0 0 0.35rem;
}

.cart-line-item__fees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-top: 0.35rem;
}

.cart-line-item__fee {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.cart-line-item__fee strong {
  color: var(--primary_color, #017961);
  font-weight: 600;
  margin-left: 0.2rem;
}

.cart-line-item__alert {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
}

/* Modern cart table */
.cart-table-modern tbody tr {
  border-bottom: 1px solid #eef2f7;
}

.cart-table-modern tbody tr:last-child {
  border-bottom: none;
}

.cart-table-modern tbody td {
  padding: 1.25rem 0.75rem !important;
  vertical-align: top;
}

.cart-table-modern thead th {
  padding: 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #fafbfc;
}

.cart-table-modern tbody td:nth-child(2),
.cart-table-modern tbody td:nth-child(3),
.cart-table-modern tbody td:nth-child(4),
.cart-table-modern tbody td:nth-child(5) {
  text-align: center;
  white-space: nowrap;
}

.cart-table-modern .cart-line-item {
  max-width: 420px;
}

.cart .cart-page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.cart .cart-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
}

.checkout-review-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}

.checkout-review-banner p {
  margin: 0;
  color: #1e3a8a;
  font-size: 0.95rem;
}

.checkout-review-banner a {
  font-weight: 600;
}

.checkout-item-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.checkout-item-card--review {
  background: #fafbfc;
}

.checkout-item-card .brand_name {
  margin-bottom: 0.15rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}

.checkout-item-card__person {
  font-weight: 500;
  color: #475569;
}

.checkout-item-card__qty {
  font-weight: 500;
  color: #94a3b8;
}

.checkout-item-card__main {
  gap: 0.85rem;
}

.checkout-item-card__img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.checkout-item-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-item-card--summary {
  padding: 0.85rem;
  border-radius: 8px;
  background: #fff;
}

.checkout-item-card--summary .cart-line-details--collapsible .cart-line-details__summary {
  padding: 0.5rem 0.65rem;
}

.checkout-item-card--summary .checkout-item-card__img,
.checkout .order_summry .img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.checkout .order_summry .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-item-card--summary.order_summry {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkout-items-review-full > h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
}

@media (max-width: 767px) {
  .cart-line-details__list--grid {
    grid-template-columns: 1fr;
  }

  .cart-line-item__header {
    gap: 0.65rem;
  }

  .cart-line-item__media {
    width: 60px;
    height: 60px;
  }

  .cart-table-modern tbody td {
    padding: 1rem 0.5rem !important;
  }

  .cart-table-modern tbody td:nth-child(2),
  .cart-table-modern tbody td:nth-child(3),
  .cart-table-modern tbody td:nth-child(4),
  .cart-table-modern tbody td:nth-child(5) {
    text-align: left;
  }
}

@media (max-width: 575px) {
  .checkout-items-review-full {
    margin-bottom: 1.5rem;
  }

  .checkout-item-card {
    padding: 0.85rem;
  }

  .checkout-item-card__img {
    width: 52px;
    height: 52px;
  }

  .checkout .order_summry {
    flex-direction: column;
    align-items: stretch !important;
  }

  .checkout .order_summry .price {
    align-self: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    width: 100%;
    text-align: right;
  }

  .checkout-review-banner {
    padding: 0.75rem 0.85rem;
  }

  .checkout-review-banner p {
    font-size: 0.875rem;
  }

  .cart .table_common td {
    margin-left: 0 !important;
  }
}
