    .subject-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 2rem;
      padding: 2rem;
      max-width: 1200px;
      margin: 100px auto 0;
    }
    .subject-card {
      background: white;
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      padding: 20px;
    }
    .subject-image {
      width: 100%;
      height: auto-fit;
      object-fit: cover;
      border-radius: 8px;
      margin-bottom: 15px;
    }
    .subject-title {
      font-size: 1.5rem;
      margin-bottom: 10px;
      color: #333;
    }
    .subject-description {
      color: #666;
      margin-bottom: 15px;
    }
    .subject-price {
      font-size: 1.1rem;
      margin-bottom: 10px;
    }
    .subject-price del {
      color: #999;
      margin-right: 10px;
    }
    .subject-price span {
      color: #e53935;
      font-weight: bold;
    }
    .subject-code {
      color: #666;
      font-size: 0.9rem;
      margin-bottom: 15px;
    }
    .enroll-btn {
      display: block;
      width: 100%;
      padding: 12px;
      background-color: #2196F3;
      color: white;
      text-decoration: none;
      border-radius: 5px;
      text-align: center;
      transition: background-color 0.3s ease;
    }

    .enroll-btn:hover {
      background-color: #1976D2;
    }
        /* login modal */
    #loginRequiredModal .modal-content {
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    #loginRequiredModal .modal-header {
      border-bottom: none;
    }

    #loginRequiredModal .modal-body {
      padding: 30px;
    }  

    /* Add cart message styling */

    .cart-message {
        position: fixed;
        top: 100px;
        right: 20px;
        z-index: 1050;
        max-width: 350px;
        animation: slideIn 0.5s, fadeOut 0.5s 2.5s;
    }
    
    @keyframes slideIn {
        from { right: -400px; opacity: 0; }
        to { right: 20px; opacity: 1; }
    }
    
    @keyframes fadeOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }