/* Kids Store - Global Styles */

/* Custom Properties */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #f472b6;
  --accent: #fbbf24;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #1f2937;
  --gray: #6b7280;
  --light: #f3f4f6;
  --white: #ffffff;
  
  /* Pastel Colors for Kids Theme */
  --pastel-pink: #fce7f3;
  --pastel-blue: #dbeafe;
  --pastel-green: #d1fae5;
  --pastel-yellow: #fef3c7;
  --pastel-purple: #ede9fe;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fafafa;
  color: var(--dark);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 600px;
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-bar input {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--dark);
}

.search-bar button {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  border: none;
  cursor: pointer;
  color: var(--dark);
  font-weight: 600;
  transition: background 0.3s;
}

.search-bar button:hover {
  background: #f59e0b;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.header-action:hover {
  transform: translateY(-2px);
}

.header-action i {
  font-size: 1.5rem;
}

.header-action span {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.cart-count, .wishlist-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: var(--dark);
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation */
.nav {
  background: rgba(0,0,0,0.1);
  padding: 0.75rem 1rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-list a {
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: background 0.3s;
}

.nav-list a:hover {
  background: rgba(255,255,255,0.2);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--pastel-pink) 0%, var(--pastel-blue) 100%);
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
  background: #ec4899;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

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

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Category Cards */
.categories {
  padding: 4rem 1rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 2rem;
}

.section-title span {
  color: var(--primary);
}

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

.category-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.3s;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.category-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.category-card h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.category-card p {
  color: var(--gray);
  font-size: 0.875rem;
}

/* Product Cards */
.products-section {
  padding: 4rem 1rem;
  background: var(--light);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.3s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
}

.badge-sale {
  background: var(--danger);
  color: white;
}

.badge-new {
  background: var(--success);
  color: white;
}

.badge-hot {
  background: var(--warning);
  color: var(--dark);
}

.product-wishlist {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s;
  border: none;
  z-index: 10;
}

.product-wishlist:hover {
  background: var(--secondary);
  color: white;
}

.product-wishlist.active {
  background: var(--secondary);
  color: white;
}

.product-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  cursor: pointer;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.25rem;
}

.product-category {
  color: var(--gray);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stars {
  color: var(--accent);
}

.rating-count {
  color: var(--gray);
  font-size: 0.875rem;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.original-price {
  font-size: 1rem;
  color: var(--gray);
  text-decoration: line-through;
}

.discount {
  font-size: 0.875rem;
  color: var(--success);
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: 0.75rem;
}

.product-actions .btn {
  flex: 1;
}

/* Age Badge */
.age-badge {
  display: inline-block;
  background: var(--pastel-purple);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Filters Sidebar */
.filters-sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light);
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.price-range {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.price-range input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--light);
  border-radius: 8px;
}

/* Product Page */
.product-detail {
  padding: 2rem 1rem;
}

.product-gallery {
  display: flex;
  gap: 1rem;
}

.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--primary);
}

.gallery-main {
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
}

.gallery-main img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

/* Cart Styles */
.cart-page {
  padding: 2rem 1rem;
}

.cart-table {
  width: 100%;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cart-table th {
  background: var(--light);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.cart-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--light);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--light);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

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

.quantity-input {
  width: 50px;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid var(--light);
  border-radius: 8px;
}

.cart-summary {
  background: white;
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light);
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: none;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--light);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-input.error {
  border-color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pastel-pink) 0%, var(--pastel-blue) 100%);
  padding: 2rem;
}

.auth-card {
  background: white;
  padding: 2.5rem;
  border-radius: 25px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 450px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.auth-card .subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 2rem;
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light);
}

.divider span {
  padding: 0 1rem;
  color: var(--gray);
  font-size: 0.875rem;
}

/* Admin Styles */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: var(--dark);
  color: white;
  padding: 1.5rem;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar .logo {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-nav {
  list-style: none;
}

.admin-nav li {
  margin-bottom: 0.5rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  transition: background 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--primary);
}

.admin-main {
  flex: 1;
  margin-left: 250px;
  padding: 2rem;
  background: var(--light);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stat-card h3 {
  color: var(--gray);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
}

.stat-card .change {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.stat-card .change.positive {
  color: var(--success);
}

.stat-card .change.negative {
  color: var(--danger);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 1rem;
  background: var(--light);
  font-weight: 600;
  color: var(--dark);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--light);
}

.data-table tr:hover {
  background: var(--light);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: #d1fae5;
  color: #059669;
}

.status-inactive {
  background: #fee2e2;
  color: #dc2626;
}

.status-pending {
  background: #fef3c7;
  color: #d97706;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
}

/* Footer */
.footer {
  background: var(--dark);
  color: white;
  padding: 4rem 1rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  margin-bottom: 1rem;
  color: var(--accent);
}

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

.footer-col li {
  margin-bottom: 0.5rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--gray);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
  }
  
  .search-bar {
    order: 3;
    width: 100%;
    max-width: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-list {
    display: none;
    flex-direction: column;
    gap: 0;
  }
  
  .nav-list.active {
    display: flex;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .admin-sidebar {
    transform: translateX(-100%);
    z-index: 1001;
  }
  
  .admin-sidebar.active {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .product-gallery {
    flex-direction: column-reverse;
  }
  
  .gallery-thumbs {
    flex-direction: row;
    overflow-x: auto;
  }
}

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-gray { color: var(--gray); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.p-2 { padding: 1rem; }
.p-4 { padding: 2rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-4 { gap: 2rem; }
.grid { display: grid; }
.hidden { display: none; }
.w-full { width: 100%; }
