:root {
  --status-switch-bg: linear-gradient(135deg, #f8faf8 0%, #f0fdf4 100%);
  --theme-bg: #f8faf8;
  --theme-bg-light: rgb(188 189 188 / 0.40);
  --theme-color: #252830;
  --theme-border-color: #d1d5db;
}

body.theme-dark {
  --status-switch-bg: linear-gradient(135deg, #252830 0%, #252830 100%);
  --theme-bg: #252830;
  --theme-bg-light: rgb(78 78 78 / 0.40);
  --theme-color: #f8faf8;
  --theme-border-color: rgba(255, 255, 255, 0.08);
}

.cart-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-promo-block {
  margin-bottom: 1.25rem;
}

.cart-promo-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dark, #1a2e1a);
  margin-bottom: 0.5rem;
}

.cart-promo-label-icon {
  font-size: 1rem;
  color: var(--primary-color, #5bb318);
  opacity: 0.9;
}

.cart-promo-form {
  margin: 0;
}

.cart-promo-input-wrap {
  display: flex;
  align-items: stretch;
  background: #f8faf6;
  border: 1.5px solid rgba(91, 179, 24, 0.2);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cart-promo-input-wrap:focus-within {
  border-color: var(--primary-color, #5bb318);
  box-shadow: 0 0 0 3px rgba(91, 179, 24, 0.12);
}

.cart-promo-input {
  flex: 1;
  min-width: 0;
  padding: 0.625rem 1rem;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-dark, #1a2e1a);
}
.cart-promo-input::placeholder {
  color: #8a9a82;
}
.cart-promo-input:focus {
  outline: none;
}
.cart-promo-input.is-invalid {
  color: #b91c1c;
}

.cart-promo-btn {
  flex-shrink: 0;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-dark, #2d5a27) 0%, var(--primary-color, #5bb318) 100%);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.cart-promo-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
.cart-promo-btn:active {
  transform: translateY(0);
}

.cart-promo-error {
  font-size: 0.8125rem;
  color: #b91c1c;
  margin-top: 0.375rem;
  padding-left: 0.25rem;
}

.cart-promo-applied {
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(91, 179, 24, 0.08) 0%, rgba(91, 179, 24, 0.04) 100%);
  border: 1px solid rgba(91, 179, 24, 0.25);
  border-radius: 14px;
}

.cart-promo-applied-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cart-promo-applied-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-color, #5bb318);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.cart-promo-applied-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.cart-promo-applied-code {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--primary-dark, #2d5a27);
}

.cart-promo-applied-savings {
  font-size: 0.8125rem;
  color: var(--primary-color, #5bb318);
  font-weight: 600;
}

.cart-promo-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(185, 28, 28, 0.1);
  color: #b91c1c;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cart-promo-remove-btn:hover {
  background: rgba(185, 28, 28, 0.2);
  color: #dc2626;
}

.animal-payment-card {
  padding: 0.75rem !important;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}
.animal-payment-card__head {
  min-width: 0;
}
.animal-payment-card .cart-animal-payment-form {
  min-width: 0;
  flex-wrap: wrap;
}

.animal-payable-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: rgba(25, 135, 84, 0.08);
  border: 1px solid rgba(25, 135, 84, 0.14);
  white-space: nowrap;
}
.animal-payable-chip__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}
.animal-payable-chip__value {
  font-size: 0.82rem;
  font-weight: 700;
  color: #15803d;
  line-height: 1;
}

.cart-item-image img {
  height: 120px;
}

.animal-option {
  position: relative;
  min-width: 0;
  gap: 0.75rem;
  border-color: rgba(15, 23, 42, 0.08) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  flex: 1 1 calc(50% - 0.25rem);
}
.animal-option:hover {
  transform: translateY(-1px);
  border-color: rgba(25, 135, 84, 0.24) !important;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(25, 135, 84, 0.08);
}
.animal-option__left {
  flex: 1 1 auto;
  min-width: 0;
}
.animal-option .switch {
  position: relative;
  flex: 0 0 auto;
  width: 2.3rem;
  height: 1.35rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: all 0.24s ease;
}
.animal-option .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.24s ease;
}
.animal-option .cart-animal-radio:checked + .switch {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}
.animal-option .cart-animal-radio:checked + .switch::after {
  transform: translateX(1rem);
}
.animal-option:has(.cart-animal-radio:checked) {
  border-color: rgba(34, 197, 94, 0.42) !important;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.12), 0 3px 8px rgba(15, 23, 42, 0.05);
}
.animal-option:has(.cart-animal-radio:checked) .animal-option__price {
  color: #15803d !important;
  background: rgba(34, 197, 94, 0.1);
}
.animal-option__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.07);
  font-size: 0.78rem;
  line-height: 1;
  flex: 0 0 auto;
  max-width: 100%;
}

@media (max-width: 991.98px) {
  .animal-payment-card .cart-animal-payment-form {
    gap: 0.75rem !important;
  }
  .animal-option {
    flex: 1 1 100%;
  }
}
@media (max-width: 575.98px) {
  .animal-payment-card {
    padding: 0.65rem !important;
  }
  .animal-payment-card__head {
    flex-direction: column;
    align-items: stretch !important;
  }
  .animal-payable-chip {
    width: 100%;
    justify-content: space-between;
    border-radius: 14px;
    padding: 0.5rem 0.7rem;
  }
  .animal-payable-chip__label, .animal-payable-chip__value {
    line-height: 1.2;
  }
  .animal-option {
    padding: 0.75rem !important;
    align-items: flex-start !important;
    flex-direction: column;
    gap: 0.55rem;
  }
  .animal-option__left {
    width: 100%;
  }
  .animal-option__price {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }
  .cart-item-image img {
    height: 220px;
  }
}
@media (max-width: 399.98px) {
  .animal-option .switch {
    width: 2.15rem;
    height: 1.25rem;
  }
  .animal-option .switch::after {
    width: 0.85rem;
    height: 0.85rem;
  }
  .animal-option .cart-animal-radio:checked + .switch::after {
    transform: translateX(0.9rem);
  }
  .animal-payable-chip {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}
