/* General Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(135deg, #f9f9f9, #f3f0ff);
  color: #333;
  line-height: 1.6;
  animation: bgShift 10s infinite alternate ease-in-out;
}

ul, li {
  list-style-type: none;   
  margin: 0;             
  padding: 0;             
}


/* Background Gradient Animation */
@keyframes bgShift {
  0% { background: linear-gradient(135deg, #f9f9f9, #f3f0ff); }
  50% { background: linear-gradient(135deg, #ffe7f0, #e0f7fa); }
  100% { background: linear-gradient(135deg, #f9f9f9, #f3f0ff); }
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Header */
header {
  background: linear-gradient(135deg, #6e4092, #5e208b);
  padding: 20px 0;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

header h1 {
  display: inline-block;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* Navigation */
nav {
  float: right;
}

nav a {
  color: white;
  margin-left: 25px;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: #ffcc00;
  left: 0;
  bottom: -5px;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #ffcc00;
}

nav a:hover::after {
  width: 100%;
}

#sidebar {
  position: fixed;
  top: 0;
  left: -280px; /* hidden initially */
  width: 260px;
  height: 100%;
  background: linear-gradient(135deg, #462c39, #7a1c5d);
  color: white;
  padding: 20px;
  box-shadow: 4px 0 12px rgba(0,0,0,0.2);
  transition: left 0.3s ease;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

#sidebar h2 {
  margin-bottom: 20px;
}

#sidebar a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  margin: 12px 0;
  transition: color 0.3s;
}

#sidebar a:hover {
  color: #ffcc00;
}

/* Close Button */
#closeSidebar {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  align-self: flex-end;
  cursor: pointer;
  margin-bottom: 15px;
}

/* Overlay */
#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1500;
}
#sidebar.active {
  left: 0;
}

#overlay.active {
  display: block;
}
/* Custom Alert Styles */
.alert-box {
  position: fixed;
  top: 0; left: 0; 
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.alert-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  animation: pop 0.3s ease;
}

.alert-content button {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  background: #462c39;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

@keyframes pop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}


/* Main */
main {
  padding: 50px 0;
}

/* Products Grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.2s; }
.product-card:nth-child(2) { animation-delay: 0.4s; }
.product-card:nth-child(3) { animation-delay: 0.6s; }
.product-card:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 22px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card img {
  width: 220px;
  max-height: 220px;
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: 8px;
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
}

.product-card p {
  font-size: 18px;
  color: #1e88e5;
  margin-bottom: 12px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.product-card p:hover {
  color: #ff4081;
}

/* Buttons */
button {
  padding: 12px 18px;
  background: linear-gradient(135deg, #642296, #9432a8);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.3);
  transform: skewX(-20deg);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: scale(1.08);
}

button:active {
  transform: scale(0.95);
}

/* Responsive Nav */
@media (max-width: 768px) {
  nav {
    float: none;
    margin-top: 15px;
    text-align: center;
  }

  nav a {
    display: inline-block;
    margin: 0 12px;
  }
}
#ad {
  width: 100%;
  margin: 0;
  text-align: center;
  overflow: hidden;
}

#ad img {
  width: 100%;
  height: 300px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  animation: fadeIn 1.2s ease forwards;
}

/* Fade-in Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}
