/* Toy Store Fun Styles */
:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --accent-color: #ffe66d;
  --purple: #a8e6cf;
  --orange: #ffa500;
  --text-primary: #333;
  --text-secondary: #666;
  --background: #f7f9fc;
  --white: #ffffff;
  --border-color: #e8ecf1;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 230, 109, 0.1) 0%, transparent 50%);
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.logo {
  font-size: 32px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
}

.logo span {
  color: var(--accent-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
  position: relative;
}

nav a:hover {
  transform: translateY(-2px);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--accent-color);
  transition: width 0.3s;
}

nav a:hover::after {
  width: 100%;
}

.cart-link {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.cart-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.cart-count {
  background-color: var(--accent-color);
  color: var(--text-primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

/* Search Bar */
.search-form {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 5px 20px;
  transition: all 0.3s;
}

.search-form:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.search-form input {
  background: none;
  border: none;
  color: var(--white);
  padding: 5px 10px;
  width: 200px;
  font-size: 14px;
  font-weight: 500;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.search-form button {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 5px;
  font-size: 18px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '🎈';
  position: absolute;
  top: 20px;
  left: 10%;
  font-size: 60px;
  animation: float 6s ease-in-out infinite;
}

.hero::after {
  content: '🧸';
  position: absolute;
  bottom: 20px;
  right: 10%;
  font-size: 60px;
  animation: float 6s ease-in-out infinite 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero h1 {
  font-size: 56px;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 24px;
  margin-bottom: 30px;
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-primary);
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.product-card {
  background-color: var(--white);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: var(--shadow-hover);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 1;
}

.product-badge.hot {
  background-color: var(--orange);
}

.product-badge.sale {
  background-color: var(--secondary-color);
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: #f5f5f5;
}

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.product-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 15px;
  height: 40px;
  overflow: hidden;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.age-range {
  background-color: var(--purple);
  color: var(--text-primary);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.product-price {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #ff5252;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: #45b7b8;
  transform: translateY(-2px);
}

.add-to-cart {
  width: 100%;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 15px;
}

.add-to-cart:hover {
  background-color: #45b7b8;
  transform: scale(1.05);
}

/* Categories */
.categories {
  margin-bottom: 60px;
}

.categories h2 {
  font-size: 40px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
  text-transform: uppercase;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.category-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 30px 20px;
  text-align: center;
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.3s;
  font-weight: bold;
  font-size: 16px;
  box-shadow: var(--shadow);
}

.category-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-hover);
}

/* Product Detail Page */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
  background-color: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.product-detail-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 20px;
}

.product-detail-info {
  padding: 20px 0;
}

.product-detail-info h1 {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.product-detail-price {
  font-size: 42px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.product-detail-description {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.product-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 3px solid var(--secondary-color);
  border-radius: 25px;
  overflow: hidden;
}

.quantity-selector button {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  font-size: 20px;
  cursor: pointer;
  font-weight: bold;
}

.quantity-selector input {
  border: none;
  width: 60px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

/* Cart Page */
.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.cart-items {
  background-color: var(--white);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 30px;
  padding: 20px;
  border-bottom: 2px dashed var(--border-color);
  align-items: center;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 15px;
}

.cart-item-details h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.cart-item-price {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
}

.cart-summary {
  background-color: var(--white);
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  margin-left: auto;
  box-shadow: var(--shadow);
}

.cart-summary h2 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 18px;
}

.summary-total {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 3px solid var(--border-color);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 60px 20px 30px;
  margin-top: 100px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .product-detail {
    grid-template-columns: 1fr;
  }
  
  nav ul {
    flex-direction: column;
    gap: 15px;
  }
  
  .hero h1 {
    font-size: 36px;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fun animations */
.wiggle {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.bounce {
  animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}