/* ===========================
   Global Page Styles
=========================== */
body {
  font-family: 'Cormorant Garamond', serif;
  background: linear-gradient(to bottom, #1a0a2a, #2b0b3f);
  color: #fdf6e3;
  margin: 0;
  padding: 0;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ===========================
   Headers
=========================== */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  color: #e0d4f7;
  text-shadow: 0 0 10px #9f00ff;
}

h2 {
  font-size: 2rem;
  color: #f2d6ff;
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.25rem;
  color: #f2d6ff;
}

/* ===========================
   Links & Buttons
=========================== */
a {
  color: #f3d8a0;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

a:hover {
  color: #fff;
}

.btn, .btn-cast {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff69b4, #ff1493);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(255, 105, 180, 0.8);
  transition: all 0.3s ease;
}

.btn:hover, .btn-cast:hover {
  background: linear-gradient(135deg, #ff1493, #ff69b4);
  box-shadow: 0 0 35px rgba(255, 20, 147, 1);
  transform: scale(1.08);
}

/* Nav spacing */
.nav-buttons a, .header-links a {
  display: inline-block;
  margin: 0.75rem 1rem;
  font-size: 1.25rem;
}

a.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 12px;
  background: linear-gradient(135deg, #8a2be2, #b45cff);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.7);
  transition: all 0.3s ease;
  margin: 0.5rem;
}

a.btn:hover {
  background: linear-gradient(135deg, #b45cff, #8a2be2);
  box-shadow: 0 0 35px rgba(159, 0, 255, 1);
  transform: scale(1.08);
}

/* ===========================
   Card Sections
=========================== */
.card, .spell-card, .about-content, .contact-section, #basket, #cauldronListSection {
  background: rgba(30,0,50,0.85);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 25px rgba(138,43,226,0.6);
  color: #fdf6e3;
}

.spells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  justify-items: center;
  margin-bottom: 3rem;
}

.spell-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 2px solid #9f00ff;
}

.spell-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #ffddff;
  text-shadow: 0 0 5px #9f00ff;
}

.spell-card p {
  font-size: 1rem;
  color: #e0d4f7;
  margin-bottom: auto;
  min-height: 50px;
}

.spell-card button {
  background: #8a2be2;
  color: #fdf6e3;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.spell-card button:hover {
  background: #b45cff;
  box-shadow: 0 0 10px rgba(138,43,226,0.7);
}

/* ===========================
   Products Grid (Clothing)
=========================== */
#products, #product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  justify-items: center;
  margin: 2rem 0;
}

.product, .product-card {
  background: rgba(30,0,50,0.85);
  border-radius: 15px;
  padding: 1.5rem;
  width: 100%;
  max-width: 280px;
  text-align: center;
  box-shadow: 0 0 25px rgba(138,43,226,0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover, .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 40px rgba(159, 0, 255, 0.8);
}

.product img, .product-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 2px solid #9f00ff;
  margin-bottom: 1rem;
}

.product h2, .product-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #ffddff;
  text-shadow: 0 0 5px #9f00ff;
}

.product p, .product-card p {
  font-size: 1rem;
  color: #e0d4f7;
  margin: 0.5rem 0;
}

/* ===========================
   Dropdowns & Buttons
=========================== */
select {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #b45cff;
  background: #2a2a2a;
  color: #fdf6e3;
  font-size: 1rem;
  margin: 0.5rem 0;
  width: 100%;
}

select:focus {
  outline: 2px solid #8a2be2;
  background-color: #3a3a3a;
}

button {
  background: linear-gradient(135deg, #ff69b4, #ff1493);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 0.75rem;
  transition: all 0.3s ease;
  width: 100%;
}

button:hover {
  background: linear-gradient(135deg, #ff1493, #ff69b4);
  box-shadow: 0 0 20px rgba(255, 20, 147, 0.9);
  transform: scale(1.05);
}

/* ===========================
   Forms & Inputs
=========================== */
input, textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #b45cff;
  background: #2a2a2a;
  color: #fdf6e3;
  font-size: 1rem;
  margin-bottom: 1rem;
  resize: vertical;
}

input::placeholder, textarea::placeholder {
  color: #ddd;
}

input:focus, textarea:focus {
  outline: 2px solid #8a2be2;
  background-color: #3a3a3a;
}

/* ===========================
   Notification
=========================== */
.notification-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #8a2be2, #b45cff);
  color: #fdf6e3;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.6);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.notification-popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Footer
=========================== */
footer {
  margin-top: 4rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ccc;
  text-align: center;
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 768px) {
  .spells-grid {
    grid-template-columns: 1fr 1fr;
  }

  #products, #product-list {
    grid-template-columns: 1fr 1fr;
  }

  .nav-buttons a, .header-links a {
    font-size: 1.2rem;
    margin: 0.5rem 0.75rem;
  }

  .btn, .btn-cast {
    font-size: 1.3rem;
    padding: 0.8rem 1.5rem;
  }

  .product, .product-card {
    padding: 1rem;
  }

  a.btn {
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
  }
}

/* ===========================
   Extra Small Mobile Optimisation (≤500px)
=========================== */
@media (max-width: 500px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.1rem;
  }

  .wrap {
    padding: 1rem;
  }

  .spells-grid,
  #products,
  #product-list {
    grid-template-columns: 1fr; /* stack cards */
    gap: 1.2rem;
  }

  .tabs {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn, .btn-cast, a.btn, button {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  #castButton, #checkoutBtn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }
}

