/* Organic Earth Interface Cart Palette & Layout Styles */
:root {
  --oe-primary: #C86D51;
  --oe-primary-hover: #B35B40;
  --oe-primary-light: #F6EAE6;
  --oe-secondary: #6A7B60;
  --oe-secondary-hover: #57664F;
  --oe-secondary-light: #EFF3ED;
  --oe-accent-sand: #D9C9B4;
  --oe-accent-warm-taupe: #8C7E72;
  --oe-bg-main: #FBF9F5;
  --oe-bg-surface: #FFFFFF;
  --oe-bg-surface-warm: #F5EFE6;
  --oe-text-primary: #2D2621;
  --oe-text-muted: #8A8177;
  --oe-border-subtle: rgba(45, 38, 33, 0.08);
  --oe-border-default: rgba(106, 123, 96, 0.14);
  --oe-shadow-soft: 0 8px 24px -6px rgba(45, 38, 33, 0.06);
  --oe-shadow-elevated: 0 24px 48px -12px rgba(45, 38, 33, 0.14);
}

.organic-cart-modal .modal-dialog {
  max-height: 90vh;
  margin: 1.75rem auto;
}

.organic-cart-modal .modal-content {
  background-color: var(--oe-bg-main);
  border: 1px solid var(--oe-border-default);
  border-radius: 16px;
  box-shadow: var(--oe-shadow-elevated);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.organic-cart-modal .modal-header {
  background: var(--oe-bg-surface);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  padding: 1.25rem 1.5rem;
}

.organic-cart-modal .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--oe-bg-main);
}

.organic-cart-modal .modal-footer {
  background: var(--oe-bg-surface);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  padding: 1rem 1.5rem;
}

/* Cart Item Cards */
.cart-item {
  background-color: var(--oe-bg-surface);
  border: 1px solid var(--oe-border-subtle);
  transition: all 0.2s ease;
}

.cart-item:hover {
  border-color: rgba(200, 109, 81, 0.35);
  box-shadow: var(--oe-shadow-soft);
}

.cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  background-color: var(--oe-bg-surface-warm);
}

.cart-item-title {
  color: var(--oe-text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.cart-item-title:hover {
  color: var(--oe-primary);
}

.cart-quantity-selector {
  background: var(--oe-bg-main);
  border-color: var(--oe-border-default) !important;
}

.cart-quantity-selector .btn-qty-change {
  padding: 2px 10px;
  font-size: 1rem;
  color: var(--oe-text-primary);
  border: none;
  background: transparent;
  line-height: 1;
}

.cart-quantity-selector .btn-qty-change:hover {
  background: var(--oe-primary-light);
  color: var(--oe-primary);
}

.cart-qty-value {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

/* Buttons */
.btn-primary-organic {
  background-color: var(--oe-primary);
  border-color: var(--oe-primary);
  color: #FFFFFF;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary-organic:hover,
.btn-primary-organic:focus {
  background-color: var(--oe-primary-hover);
  border-color: var(--oe-primary-hover);
  color: #FFFFFF;
}

.btn-secondary-organic {
  background-color: var(--oe-secondary-light);
  border-color: var(--oe-border-default);
  color: var(--oe-secondary);
  border-radius: 8px;
}

.btn-secondary-organic:hover {
  background-color: #E2E8E0;
  color: var(--oe-secondary-hover);
}

/* Form & Inputs */
.checkout-panel {
  background-color: var(--oe-bg-surface);
  border: 1px solid var(--oe-border-default);
}

.form-control-organic {
  background-color: var(--oe-bg-main);
  border: 1px solid var(--oe-border-default);
  color: var(--oe-text-primary);
  border-radius: 8px;
}

.form-control-organic:focus {
  background-color: #FFFFFF;
  border-color: var(--oe-primary);
  box-shadow: 0 0 0 0.25rem rgba(200, 109, 81, 0.15);
}

.shipping-option-card {
  background: var(--oe-bg-main);
  border-color: var(--oe-border-subtle) !important;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.shipping-option-card:hover {
  border-color: var(--oe-primary) !important;
  background: var(--oe-primary-light);
}

.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--oe-secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badge Counter */
[data-cart-items-count] {
  font-size: 0.75rem;
  padding: 0.25em 0.55em;
  border-radius: 50rem;
  background-color: var(--oe-primary);
  color: #FFFFFF;
}

/* Mobile Responsiveness Rules */
@media (max-width: 576px) {
  .organic-cart-modal .modal-dialog {
    max-height: 95vh;
    margin: 0.5rem;
  }
  .organic-cart-modal .modal-content {
    max-height: 95vh;
  }
  .cart-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }
  .cart-item-actions {
    width: 100%;
    justify-content: space-between;
  }
}