/* ============================================================
   TOP SHOES - Complete Standalone & Offline-Ready Stylesheet
   Works with or without Tailwind CDN / FontAwesome / Internet
   ============================================================ */

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

:root {
  --bg-dark: #0b0d13;
  --bg-surface: #141822;
  --bg-card: #1b202c;
  --border-color: #222a3a;
  --border-highlight: #f59e0b;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --secondary: #ff5e14;
  --text-white: #ffffff;
  --text-gray: #9ca3af;
  --text-muted: #6b7280;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: #f3f4f6;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #252d3d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

img {
  max-width: 100%;
  display: block;
}

/* Category Filter Buttons */
.category-btn {
  background-color: #151924;
  border: 1px solid #273042;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
}
.category-btn:hover {
  border-color: #f59e0b;
  color: #ffffff;
  background-color: #1c2230;
}
.category-btn.active {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #000000;
  border-color: #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
  font-weight: 800;
}

/* Size Selection Buttons */
.size-btn {
  background-color: #10141d;
  border: 1px solid #2a3344;
  color: #cbd5e1;
  transition: all 0.2s ease;
  cursor: pointer;
}
.size-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background-color: #181f2c;
}
.size-btn.active {
  background-color: #f59e0b;
  color: #000000;
  border-color: #f59e0b;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Product Card Effects */
.product-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  background-color: #141822;
  border: 1px solid #222a3a;
  border-radius: 1rem;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7), 0 0 20px 0 rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

.product-card img {
  transition: transform 0.5s ease;
}
.product-card:hover img {
  transform: scale(1.04);
}

/* Utility to hide horizontal scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1f2937;
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid #f59e0b;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Fallback Grid & Container styles if CDN is offline */
.max-w-7xl {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

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

@media (min-width: 640px) {
  #productGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #productGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  #productGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Modal offline support */
#sizeGuideModal:not(.hidden) {
  display: flex !important;
}

#mobileMenu:not(.hidden) {
  display: block !important;
}
