* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); min-height: 100vh; background-attachment: fixed; color: #1a202c; }

.header { background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
      padding: 1.2rem 2rem; display: flex; justify-content: space-between;
       align-items: center; box-shadow: 0 8px 32px rgba(2,6,23,0.08); position: sticky;
        top: 0; z-index: 100; }
.header h1 { font-size: 1.8rem; background: linear-gradient(135deg, #667eea, #764ba2);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
       font-weight: 800; letter-spacing: -0.5px; }
.site-footer { position: fixed; bottom: 0; left: 0; width: 100%;
      background: linear-gradient(90deg, #1a202c 0%, #2d3748 100%);
       color: #e2e8f0; text-align: center; padding: 12px 0;
        font-size: 13px; z-index: 9999; letter-spacing: 0.5px;
         box-shadow: 0 -4px 15px rgba(0,0,0,0.1); }
.cart-btn { background: linear-gradient(135deg, #48bb78, #38a169);
      color: white; border: none; padding: 0.8rem 1.6rem;
       border-radius: 25px; cursor: pointer; font-weight: 700;
        box-shadow: 0 8px 20px rgba(72,187,120,0.25); 
        transition: transform 0.12s ease, box-shadow 0.12s ease; }
.cart-btn.disabled { background: #cbd5e1 !important;
      cursor: not-allowed !important; opacity: 0.65; box-shadow: none; }
.cart-btn:hover:not(.disabled) { transform: translateY(-2px); 
     box-shadow: 0 12px 28px rgba(72,187,120,0.3); }

.main-content { padding: 2rem; max-width: 1200px; margin: 0 auto; margin-bottom: 80px; }

.intro { text-align: center; margin-bottom: 3rem; color: white; padding: 2rem; border-radius: 20px; background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.15); }
.intro h2 { font-size: 2.4rem; margin-bottom: 0.8rem;
     
     font-weight: 900; color: #ffffff; text-shadow: 0 2px 4px rgba(0,0,0,0.1); 
     letter-spacing: -0.3px; }
.intro p { font-size: 1.1rem; opacity: 0.98; color: #f0f4ff; font-weight: 500; }

.lessons-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 2rem; }

.lesson-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 12px 35px rgba(2,6,23,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 460px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255,255,255,0.8);
}

.lesson-card.sold-out { opacity: 0.55; filter: grayscale(0.4); }

.lesson-icon {
  width: 220px;
  height: 220px;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(2,6,23,0.15);
  transition: all 0.2s ease;
}

.lesson-card img {
  width: 220px !important;
  height: 220px !important;
  object-fit: cover !important;
  border-radius: 16px !important;
}

.lesson-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 50px rgba(2,6,23,0.18);
  border-color: rgba(255,255,255,1);
}

.lesson-card:hover .lesson-icon {
  transform: scale(1.08);
  box-shadow: 0 20px 50px rgba(102, 126, 234, 0.35);
}.cart-icon { width: 50px; height: 50px; object-fit: cover; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.price { color: #10b981; font-weight: 900; font-size: 1.5rem; letter-spacing: -0.3px; }
.spaces.low-spaces { color: #dc2626; font-weight: 800; animation: pulse 2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.lesson-info { padding: 0.5rem 0; }
.lesson-info h3 { font-size: 1.35rem; color: #0f172a; font-weight: 900;
      margin-bottom: 0.8rem; letter-spacing: -0.2px; line-height: 1.3; }
.lesson-info .location { color: #475569;
      font-size: 0.98rem; margin: 0.4rem 0; font-weight: 600; }

.add-btn { width: 100%; padding: 1rem; margin-top: 1.2rem;
      border: none; border-radius: 12px; cursor: pointer;
       background: linear-gradient(135deg, #3182ce, #2c5aa0); color: white;
        box-shadow: 0 8px 20px rgba(49, 130, 206, 0.2); font-weight: 800;
         font-size: 0.95rem; transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
          letter-spacing: 0.3px; }
.add-btn:hover:not(:disabled) { transform: translateY(-3px); 
     box-shadow: 0 14px 32px rgba(49, 130, 206, 0.3); }
.add-btn:disabled { background: #cbd5e1; cursor: not-allowed;
      box-shadow: none; color: #ffffff; opacity: 0.8; }

.cart-overlay, .checkout-overlay, .success-overlay { position: fixed;
     top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.7); display: flex;
       justify-content: center; align-items:
        center; z-index: 1000; }

.cart-modal, .checkout-modal, .success-modal { background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
     border-radius: 20px; padding: 2.5rem; 
     max-width: 500px; width: 90%;
    max-height: 80vh; overflow-y: auto; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.9); }

/* Cart Page Styles */
.cart-header { display: flex; justify-content: 
    space-between; align-items: center; 
    margin-bottom: 2rem; color: white; }
.cart-header h2 { font-size: 2.4rem; font-weight: 900; text-shadow: 0 2px 8px rgba(0,0,0,0.2); letter-spacing: -0.5px; }

.back-btn { background: #edf2ff; color: #2b6cb0; border: none;
      padding: 0.75rem 1.2rem; border-radius: 10px; cursor: pointer;
      font-weight: 700; box-shadow: 0 4px 12px rgba(66,153,225,0.1); transition: all 0.12s ease; }
.back-btn:hover { background: #e2e8ff; box-shadow: 0 6px 18px rgba(66,153,225,0.2); transform: translateY(-1px); }

.empty-cart { text-align: center; color: white; padding: 4rem 2rem; }
.empty-cart h3 { font-size: 2.2rem; margin-bottom: 1.2rem; font-weight: 900; 
     color: #ffffff; text-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.empty-cart p { font-size: 1.15rem; margin-bottom: 2rem; color: #f0f4ff; font-weight: 500; }

.continue-btn { background: linear-gradient(135deg, #48bb78, #33a56a); color: white; border: none; padding: 0.95rem 1.8rem; border-radius: 14px; cursor: pointer; font-size: 1.02rem; font-weight: 800; box-shadow: 0 10px 28px rgba(72,187,120,0.22); transition: all 0.12s ease; }
.continue-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(72,187,120,0.3); }

.cart-content { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }

.cart-items { display: grid; gap: 1rem; }

.cart-item-card { background: white; border-radius: 15px;
     padding: 1.5rem; display: flex; align-items:
      center; gap: 1rem; box-shadow: 0 8px 25px rgba(0,0,0,0.15); }

.cart-item-details h3 { margin-bottom: 0.6rem; color: #0f172a; font-weight: 800; font-size: 1.1rem; }
.cart-item-details .location { color: #475569; margin-bottom: 0.3rem; font-weight: 600; }
.cart-item-details .price { color: #10b981; font-weight: 600; font-size: 1.1rem; }

.remove-btn { background: linear-gradient(135deg, #e53e3e, #c53030); color: white; border: none; padding: 0.8rem 1rem; border-radius: 10px; cursor: pointer; margin-left: auto; font-weight: 700; box-shadow: 0 6px 16px rgba(229, 62, 62, 0.15); transition: all 0.12s ease; }
.remove-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(229, 62, 62, 0.25); }

.cart-summary { background: white; border-radius: 15px; padding: 2rem; height: fit-content; box-shadow: 0 10px 30px rgba(2,6,23,0.06); }

.cart-total { text-align: center; margin-bottom: 1.5rem; }
.cart-total h3 { font-size: 1.6rem; color: #0f172a; font-weight: 900; letter-spacing: -0.3px; }



.checkout-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.8rem; border-bottom: 3px solid #e2e8f0; padding-bottom: 1.2rem; }

.checkout-header h2 { color: #0f172a; font-weight: 900; font-size: 1.5rem; letter-spacing: -0.3px; }

.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; font-weight: 600; }

.checkout-btn, .submit-btn, .ok-btn { width: 100%; padding: 1rem 1.2rem; background: linear-gradient(135deg, #48bb78, #38a169); color: white; border: none; border-radius: 12px; cursor: pointer; margin-top: 1.2rem; font-weight: 800; font-size: 0.98rem; box-shadow: 0 10px 28px rgba(72,187,120,0.2); transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1); letter-spacing: 0.4px; }
.checkout-btn:hover, .submit-btn:hover, .ok-btn:hover { transform: translateY(-3px);
      box-shadow: 0 16px 40px rgba(72,187,120,0.3); }
.submit-btn:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.6rem;
      font-weight: 700; color: #0f172a; font-size: 0.98rem;
       letter-spacing: 0.2px; }
.form-group input { width: 100%; padding: 0.95rem;
      border: 2px solid #e6edf7; border-radius: 10px; background: #fbfdff;
       box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.form-group input:focus { outline: none; border-color: #5b9fed; box-shadow: 0 6px 18px rgba(59,130,246,0.12); }
.form-group input.error { border-color: #e53e3e; box-shadow: 0 6px 18px rgba(229,62,62,0.08); }

.error-msg { color: #e53e3e; font-size: 0.85rem; margin-top: 0.25rem; display: block; }

.search-bar { width: 100%; max-width: 640px; margin: 1.2rem auto 0; display: block;
      padding: 1.1rem 1.3rem; border-radius: 14px; border: 2px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.12); color: #ffffff; font-weight: 600; transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); font-size: 0.98rem; }
.search-bar::placeholder { color: rgba(255,255,255,0.85); font-weight: 500; }
.search-bar:focus { outline: none; background: rgba(255,255,255,0.2); 
     border-color: rgba(255,255,255,0.8); transform: translateY(-2px);
      box-shadow: 0 10px 30px rgba(255,255,255,0.25); }
.sort-select { padding: 0.8rem 1rem; border-radius: 12px; border: 2px solid #cbd5e1; 
     background: linear-gradient(135deg, #f8fafc, #ffffff); color: #0f172a;
      font-weight: 700; cursor: pointer; transition: all 0.12s ease;
       box-shadow: 0 4px 12px rgba(0,0,0,0.06); font-size: 0.95rem; }
.sort-select:focus { outline: none; border-color: #667eea;
      box-shadow: 0 6px 18px rgba(102, 126, 234, 0.18); }

/* Small screens: scale down image and card spacing */
@media (max-width: 768px) {
     .lesson-card { min-height: 400px; padding: 1.4rem; }
     .lesson-icon, .lesson-card img { width: 180px !important; height: 180px !important; }
     .intro { padding: 1.5rem; }
     .intro h2 { font-size: 2rem; }
     .lessons-grid { gap: 1.5rem; }
     .cart-header h2 { font-size: 1.8rem; }
}

.checkout-summary { background: linear-gradient(135deg, #f8fafc, #f1f5f9); 
     padding: 1.3rem; border-radius: 12px; margin: 1.8rem 0; border: 1px solid #e2e8f0; }

.checkout-summary h3 { color: #0f172a; font-weight: 800; margin-bottom: 1rem; }

.summary-item { display: flex; justify-content: space-between; padding: 0.5rem 0; color: #334155; font-weight: 600; }

.summary-total { border-top: 2px solid #cbd5e1; padding-top: 0.8rem; margin-top: 0.8rem; color: #0f172a; font-weight: 900; font-size: 1.1rem; }



@media (max-width: 768px) {
    .header { padding: 1rem; flex-direction: column; gap: 1rem; }
    .main-content { padding: 1rem; margin-bottom: 85px; }
    .lessons-grid { grid-template-columns: 1fr; }
    .cart-content { grid-template-columns: 1fr; }
    .cart-header { flex-direction: column; gap: 1rem; text-align: center; }
    .add-btn, .checkout-btn, .submit-btn, .ok-btn { padding: 0.95rem; font-size: 0.92rem; }
}