/* ── ShopZone Global Styles ── */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #f59e0b;
  --success: #22c55e;
  --danger: #ef4444;
  --dark: #1e293b;
  --light: #f8fafc;
  --card-radius: 1rem;
  --transition: .25s ease;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--light); color: var(--dark); }

/* ── Navbar ── */
.navbar { border-bottom: 1px solid #e2e8f0; }
.navbar-brand { letter-spacing: -.5px; }
.nav-link.active { color: var(--primary) !important; font-weight: 600; }

/* ── Hero ── */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 60%, #ec4899 100%);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--light);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* ── Product Cards ── */
.product-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--card-radius);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
  background: #fff;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, .15);
}
.product-card .img-wrap {
  height: 220px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .img-wrap img { transform: scale(1.06); }
.product-card .badge-sale {
  position: absolute; top: 10px; left: 10px;
  background: var(--danger); color: #fff;
  font-size: .7rem; padding: .25rem .5rem; border-radius: .5rem;
}
.product-card .quick-add {
  position: absolute; bottom: -40px; left: 0; right: 0;
  background: rgba(99,102,241,.9); color: #fff;
  border: none; cursor: pointer; padding: .5rem;
  transition: bottom var(--transition); font-size: .85rem;
}
.product-card:hover .quick-add { bottom: 0; }
.product-card .card-body { padding: 1rem; }
.product-card .product-title { font-weight: 600; font-size: .95rem; color: var(--dark); text-decoration: none; }
.product-card .product-title:hover { color: var(--primary); }
.price-new { font-weight: 700; color: var(--primary); }
.price-old { text-decoration: line-through; color: #94a3b8; font-size: .85rem; }

/* ── Stars ── */
.stars { color: var(--secondary); }
.stars-empty { color: #e2e8f0; }

/* ── Category Cards ── */
.category-card {
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition);
}
.category-card:hover { transform: translateY(-4px); }
.category-card img { height: 180px; width: 100%; object-fit: cover; filter: brightness(.7); transition: filter var(--transition); }
.category-card:hover img { filter: brightness(.5); }
.category-card .label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: .75rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff; font-weight: 600;
}

/* ── Buttons ── */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-wishlist { background: transparent; border: 1px solid #e2e8f0; color: #64748b; transition: all var(--transition); }
.btn-wishlist:hover, .btn-wishlist.active { background: #fee2e2; border-color: var(--danger); color: var(--danger); }

/* ── Cart & Checkout ── */
.cart-item { border-bottom: 1px solid #e2e8f0; padding: 1rem 0; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: .5rem; }
.qty-control { display: flex; align-items: center; gap: .5rem; }
.qty-control button { width: 30px; height: 30px; border: 1px solid #cbd5e1; background: #fff; border-radius: .375rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-control input { width: 50px; text-align: center; border: 1px solid #cbd5e1; border-radius: .375rem; height: 30px; }

/* ── Order Status Badges ── */
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-shipped    { background: #e0e7ff; color: #3730a3; }
.badge-delivered  { background: #d1fae5; color: #065f46; }
.badge-cancelled  { background: #fee2e2; color: #991b1b; }
.badge-refunded   { background: #f3e8ff; color: #6b21a8; }

/* ── Admin Sidebar ── */
.admin-sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--dark);
  color: #cbd5e1;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform var(--transition);
}
.admin-sidebar .brand { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar .nav-link {
  color: #94a3b8;
  padding: .65rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  border-radius: 0;
  transition: all var(--transition);
  font-size: .9rem;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(99,102,241,.2);
  border-left: 3px solid var(--primary);
}
.admin-sidebar .nav-link i { font-size: 1.1rem; }
.admin-main { margin-left: 260px; padding: 2rem; min-height: 100vh; }
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2rem -2rem 2rem;
}
.stat-card { border-radius: var(--card-radius); border: none; overflow: hidden; }
.stat-card .icon { width: 56px; height: 56px; border-radius: .75rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

/* ── Tables ── */
.table-hover tbody tr:hover { background: #f1f5f9; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; font-weight: 600; }

/* ── Forms ── */
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .25rem rgba(99,102,241,.15); }

/* ── Alerts ── */
.alert-flash { position: fixed; top: 80px; right: 20px; z-index: 9999; min-width: 280px; animation: slideIn .3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Loading ── */
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid #e2e8f0; border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 1rem; }
  .admin-topbar { margin: -1rem -1rem 1rem; }
}
@media (max-width: 576px) {
  .hero-section { padding: 50px 0; }
  .hero-section h1 { font-size: 1.75rem; }
}

/* ── Hero Slider ── */
.hero-slider .carousel-item { position: relative; }
.hero-slider .carousel-caption { text-align: center; }
.hero-slider .carousel-caption h1 {
  animation: heroSlideUp .6s ease both;
}
.hero-slider .carousel-caption p {
  animation: heroSlideUp .7s .1s ease both;
}
.hero-slider .carousel-caption .btn {
  animation: heroSlideUp .8s .2s ease both;
}
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-slider .carousel-indicators [data-bs-target] {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  transition: background .3s, transform .3s;
}
.hero-slider .carousel-indicators .active {
  background: #fff; transform: scale(1.2); border-color: #fff;
}
.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
  width: 5%;
}
@media (max-width: 576px) {
  .hero-slider .carousel-item > div[style*="height:480px"],
  .hero-slider .carousel-item img { height: 320px !important; }
  .hero-slider .carousel-caption h1 { font-size: 1.5rem; }
  .hero-slider .carousel-caption p  { font-size: .95rem; }
}

/* ── Image placeholder ── */
.img-placeholder { background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 2rem; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Footer ── */
.footer-link {
  color: #64748b;
  text-decoration: none;
  transition: color .2s;
}
.footer-link:hover { color: #6366f1; }

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #c7d2fe;
  color: #6366f1;
  text-decoration: none;
  font-size: 1rem;
  transition: background .2s, color .2s, border-color .2s;
}
.social-btn:hover { background: #6366f1; color: #fff; border-color: #6366f1; }

.payment-badge {
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  padding: .2rem .65rem;
  border-radius: 2rem;
  border: 1px solid #c7d2fe;
  background: #fff;
  color: #6366f1;
}

/* ── Breadcrumb ── */
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* ── Pagination ── */
.pagination .page-link { color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ── Section Titles ── */
.section-title { font-weight: 700; position: relative; display: inline-block; }
.section-title::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 40px; height: 3px; background: var(--primary); border-radius: 2px; }
