/* ============================================
   ShopWithNishant — Public Storefront Styles
   ============================================ */

/* ---------- Modern CSS Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

/* ---------- Custom Properties ---------- */
:root {
  --bg-primary: #040d1a;
  --bg-secondary: #081224;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #0d1e35;
  --bg-input-hover: #112340;
  --accent: #c1f80a;
  --accent-glow: rgba(193, 248, 10, 0.4);
  --accent-gradient: linear-gradient(135deg, #c1f80a, #8db500);
  --text-primary: #f6f6f1;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(193, 248, 10, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 30px rgba(193, 248, 10, 0.06);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Body ---------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* Subtle radial glow behind the page */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(193, 248, 10, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 24px 48px;
  z-index: 1;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 12px;
}

.tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  color: var(--bg-primary);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(193, 248, 10, 0.35);
}

/* ============================================
   CONTROLS BAR (Sticky filter/sort)
   ============================================ */
.controls-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 24px;
  margin: 0 auto;
  max-width: 1280px;
  /* Glassmorphism */
  background: rgba(4, 13, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Search Input --- */
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 400;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-input-hover);
  box-shadow: 0 0 0 3px rgba(193, 248, 10, 0.15);
}

.search-input:focus~.search-icon {
  color: var(--accent-glow);
}

/* --- Category Pills --- */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  flex: 1;
  min-width: 0;
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  scroll-snap-align: start;
  flex-shrink: 0;
  padding: 8px 20px;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.pill:hover {
  color: var(--text-primary);
  background: var(--bg-input-hover);
  border-color: var(--border-hover);
}

.pill.active {
  color: #040d1a;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(193, 248, 10, 0.35);
}

/* --- Sort Select --- */
.sort-wrapper {
  position: relative;
  flex-shrink: 0;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 12px 40px 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  min-width: 170px;
}

.sort-select:hover,
.sort-select:focus {
  border-color: var(--border-hover);
  background: var(--bg-input-hover);
  color: var(--text-primary);
}

.sort-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.sort-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px 24px 64px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth), background var(--transition-smooth);
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}

/* --- Card Image Container --- */
.card-image-container {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform var(--transition-smooth);
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  padding: 16px;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-smooth);
}

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

/* Image placeholder */
.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f7;
  color: var(--text-muted);
  font-size: 2.5rem;
}

/* --- Carousel Dots --- */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-dot.active {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}

/* --- Carousel Nav Buttons --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 22, 41, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.carousel-btn svg {
  width: 14px;
  height: 14px;
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}

.product-card:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: rgba(11, 22, 41, 1);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Card Body --- */
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #040d1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.product-desc {
  font-size: 0.88rem;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* --- Buy Button --- */
.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  background: var(--accent-gradient);
  color: #040d1a;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.buy-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.buy-btn:hover {
  box-shadow: 0 4px 24px rgba(193, 248, 10, 0.45), 0 0 48px rgba(193, 248, 10, 0.2);
  transform: translateY(-1px);
}

.buy-btn:hover::before {
  opacity: 1;
}

.buy-btn:active {
  transform: translateY(0) scale(0.98);
}

.buy-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  max-width: 1280px;
  margin: 0 auto;
  z-index: 1;
  position: relative;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ============================================
   SCROLL-REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal delay for grid children */
.product-card:nth-child(1) {
  transition-delay: 0ms;
}

.product-card:nth-child(2) {
  transition-delay: 60ms;
}

.product-card:nth-child(3) {
  transition-delay: 120ms;
}

.product-card:nth-child(4) {
  transition-delay: 180ms;
}

.product-card:nth-child(5) {
  transition-delay: 240ms;
}

.product-card:nth-child(6) {
  transition-delay: 300ms;
}

.product-card:nth-child(7) {
  transition-delay: 360ms;
}

.product-card:nth-child(8) {
  transition-delay: 420ms;
}

/* ============================================
   LOADING SKELETON
   ============================================ */
@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.02) 25%, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.02) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
}

.skeleton-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-title {
  height: 18px;
  width: 70%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.03) 25%, rgba(0, 0, 0, 0.06) 50%, rgba(0, 0, 0, 0.03) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
}

.skeleton-button {
  height: 46px;
  width: 100%;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(193, 248, 10, 0.15) 25%, rgba(193, 248, 10, 0.25) 50%, rgba(193, 248, 10, 0.15) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  text-align: center;
  padding: 40px 24px 48px;
  border-top: 1px solid var(--border);
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.footer-text .footer-brand {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-heart {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE — 768px and below
   ============================================ */
@media (max-width: 768px) {
  .hero {
    padding: 56px 20px 36px;
  }

  .hero-icon {
    font-size: 2.4rem;
  }

  .controls-bar {
    padding: 12px 16px;
    gap: 12px;
  }

  .controls-row {
    gap: 8px;
  }

  .search-wrapper {
    max-width: none;
    flex: 1 1 100%;
  }

  .sort-wrapper {
    flex: 1 1 100%;
  }

  .sort-select {
    width: 100%;
    min-width: unset;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 16px 48px;
  }

  .card-body {
    padding: 14px 16px 16px;
  }

  .product-name {
    font-size: 0.98rem;
  }

  .buy-btn {
    padding: 12px 20px;
    font-size: 0.88rem;
  }

  /* Show carousel buttons on mobile (no hover) */
  .carousel-btn {
    opacity: 0.7;
  }

  footer {
    padding: 32px 16px 40px;
  }
}

/* Extra small devices */
@media (max-width: 380px) {
  .hero {
    padding: 44px 16px 28px;
  }

  .product-grid {
    padding: 20px 12px 40px;
  }
}