body {
  background-color: #f5f5f5;
  font-family: 'DM Sans', sans-serif;
  /* Reduced from default */
}

.subject-card {
  transition: box-shadow .2s ease-in-out;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  /* Reduced from 0.75rem */
  margin-bottom: 0.75rem;
  /* Reduced spacing between cards */
}

.subject-card:focus-within {
  box-shadow: 0 0 0 0.125rem rgba(13, 110, 253, 0.25);
  /* Reduced focus ring */
  border-color: #86b7fe;
}

.subject-card .card-body {
  padding: 0.75rem;
  /* Reduced from default bootstrap padding */
}

.subject-card h5 {
  font-size: 1rem;
  /* Reduced font size */
  margin-bottom: 0.5rem;
  /* Reduced margin */
}

.price-display {
  font-size: 1.1rem;
  /* Reduced from 1.25rem */
  font-weight: 700;
  color: black;
  transition: color .2s;
}

.price-display.unavailable {
  color: #dc3545;
  font-size: 0.9rem;
  /* Reduced from 1rem */
  font-weight: 500;
}

.summary-card {
  position: sticky;
  top: 10px;
  /* Reduced from 20px */
  border-radius: 0.5rem;
  /* Reduced from 0.75rem */
}

.summary-card .card-body {
  padding: 0.75rem;
  /* Reduced padding */
}
.course-card .card-body {
  padding: 0.75rem;
  /* Reduced padding */
}

.summary-total {
  font-size: 1.25rem;
  /* Reduced from 1.5rem */
  font-weight: 700;
}

.form-label.fw-medium {
  color: #495057;
  margin-bottom: 0.25rem;
  /* Reduced from 0.5rem */
  font-size: 0.875rem;
  /* Reduced font size */
}

.form-check {
  margin-bottom: 0.25rem;
  /* Reduced spacing between options */
}

.form-check-input:disabled,
.form-select:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
}

.form-select {
  padding: 0.25rem 0.5rem;
  /* Reduced padding */
  font-size: 0.875rem;
  /* Reduced font size */
}

.options-container {
  padding-top: 0.25rem;
  /* Reduced from 0.5rem */
  padding-left: 0.5rem;
  /* Added smaller left padding */
  padding-right: 0.5rem;
  /* Added smaller right padding */
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  /* Reduced from 300px */
  color: #6c757d;
}

.options-container .spinner-border {
  width: 1.25rem;
  /* Reduced from 1.5rem */
  height: 1.25rem;
  /* Reduced from 1.5rem */
}

.form-check-label {
  cursor: pointer;
  font-size: 0.875rem;
  /* Reduced font size */
}

#add-package-to-cart {
  background-color: #f05969;
  color: white;
  border-color: transparent;
}

#add-package-to-cart:disabled {
  cursor: not-allowed;
}

.summary-item-details {
  font-size: 0.75rem;
  /* Reduced from 0.85rem */
}

/* Container and row spacing */
.container-fluid {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.row {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  margin-top: 0.2rem;
}

.col,
.col-lg-8,
.col-lg-4 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* Button spacing */
.btn {
  padding: 0.375rem 0.75rem;
  /* Slightly reduced button padding */
  font-size: 0.875rem;
  /* Reduced button font size */
}

/* List spacing */
.list-group-item {
  padding: 0.5rem 0.75rem;
  /* Reduced from default */
}

.forpadding {
  padding-top: 6%;
}

.form-check-input:checked {
  background-color: #000;
  border-color: #000;
}

/* Mobile optimizations */
@media (max-width: 991px) {
  .summary-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 1000;
    border-radius: 1rem 1rem 0 0;
    /* Reduced from 1.5rem */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    transition: transform .3s ease-in-out;
    transform: translateY(calc(100% - 45px));
    /* Reduced from 75px */
  }

  .summary-card.open {
    transform: translateY(0);
  }

  .summary-card .card-body {
    padding: 0;
  }

  .summary-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    /* Reduced from 1rem 1.5rem */
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
  }

  .summary-header-mobile h4 {
    margin: 0;
    font-size: 1rem;
    /* Reduced font size */
  }

  .summary-total {
    font-size: 1rem;
  }

  #summary-list {
    max-height: 35vh;
    /* Reduced from 40vh */
    overflow-y: auto;
    padding: 0 1rem;
    /* Reduced from 0 1.5rem */
    margin-bottom: 0 !important;
  }

  .summary-footer {
    padding: 0.75rem 1rem;
    /* Reduced from 1rem 1.5rem */
    background-color: #f8f9fa;
  }

  .subject-card {
    margin-bottom: 0.5rem;
    /* Reduced spacing between cards on mobile */
  }

  .subject-card .card-body {
    padding: 0.5rem;
    /* Further reduced on mobile */
  }
  .course-card .card-body {
    padding: 0.5rem;
    /* Further reduced on mobile */
  }

  .subject-card h5 {
    font-size: 0.95rem;
    /* Smaller on mobile */
    margin-bottom: 0.25rem;
  }

  .price-display {
    font-size: 1rem;
    /* Reduced mobile font size */
  }

  .form-check-label,
  .form-label.fw-medium,
  .form-select {
    font-size: 0.7rem;
    /* Further reduced on mobile */
  }

  .form-check-label {
    font-size: 0.6rem;
  }

  .form-select {
    padding: 0.2rem 0.4rem;
    /* Smaller mobile padding */
  }

  .options-container {
    padding: 0.25rem;
    /* Minimal padding on mobile */
  }

  /* Reduce container padding on mobile */
  .container-fluid {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}