/* ================================================
   SJ Men's Fashion - Main Stylesheet
   Theme: Black & White Minimal + Blue/Green/Orange
   Font: Nunito Sans
   ================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --grey-50: #fafafa;
  --grey-100: #f5f5f5;
  --grey-200: #e5e5e5;
  --grey-300: #d4d4d4;
  --grey-400: #a3a3a3;
  --grey-500: #737373;
  --grey-600: #525252;
  --grey-700: #404040;
  --grey-800: #262626;
  --grey-900: #171717;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #dbeafe;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-light: #dcfce7;
  --orange: #ea580c;
  --orange-light: #fff7ed;
  --red: #dc2626;
  --red-light: #fee2e2;
  --font: 'Nunito Sans', sans-serif;
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.14);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.18);
  --transition: all 0.2s ease;
  --transition-slow: all 0.35s ease;
  --navbar-height: 68px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

main { flex: 1; }

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

a { text-decoration: none; color: inherit; transition: var(--transition); }

ul, ol { list-style: none; }

button { cursor: pointer; font-family: var(--font); border: none; outline: none; }

input, select, textarea {
  font-family: var(--font);
  outline: none;
  border: none;
}

/* ---------- Typography ---------- */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
p {
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--grey-600);
  line-height: 1.7;
}

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

.section-padding { padding: 64px 0; }
.section-padding-sm { padding: 40px 0; }

.text-center { text-align: center; }
.text-muted { color: var(--grey-400); }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-blue { background: var(--blue-light); color: var(--blue-dark); }
.badge-green { background: var(--green-light); color: var(--green-dark); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-grey { background: var(--grey-100); color: var(--grey-600); }
.badge-red { background: var(--red-light); color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-primary:hover { background: var(--grey-800); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--black);
  border-color: var(--grey-300);
}
.btn-outline:hover { border-color: var(--black); background: var(--grey-50); }

.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-blue:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-green:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,0.3); }

.btn-orange {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-orange:hover { background: #c2410c; transform: translateY(-1px); }

.btn-danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Navbar ---------- */
#navbar-container { position: sticky; top: 0; z-index: 1000; }

.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  height: var(--navbar-height);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--black);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -1px;
}

.navbar-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.navbar-logo .logo-text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--grey-500);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.navbar-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--grey-700);
  transition: var(--transition);
  position: relative;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--black);
  background: var(--grey-100);
}

.navbar-dropdown {
  position: relative;
}

.navbar-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-dropdown > a::after {
  content: '▾';
  font-size: 0.7rem;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition-slow);
  z-index: 100;
}

.navbar-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.87rem;
  color: var(--grey-700);
  font-weight: 600;
}

.dropdown-menu a:hover {
  background: var(--grey-50);
  color: var(--black);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-auth-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn-login {
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--black);
  border: 1.5px solid var(--grey-300);
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.nav-btn-login:hover {
  border-color: var(--black);
  background: var(--grey-50);
}

.nav-btn-register {
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--white);
  background: var(--black);
  border: 1.5px solid var(--black);
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.nav-btn-register:hover {
  background: var(--grey-800);
  border-color: var(--grey-800);
}

.navbar-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-600);
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

.navbar-icon-btn:hover {
  background: var(--grey-100);
  color: var(--black);
  border-color: var(--grey-300);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--black);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  transition: var(--transition);
}

.cart-badge.hidden { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  background: transparent;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: var(--transition-slow);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--grey-200);
  padding: 12px 20px 20px;
  box-shadow: var(--shadow-lg);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--grey-700);
}

.mobile-nav a:hover { background: var(--grey-50); color: var(--black); }

.mobile-nav .mobile-nav-divider {
  height: 1px;
  background: var(--grey-200);
  margin: 8px 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 56px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--grey-800);
}

.footer-brand .logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
}

.footer-brand .logo-text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--grey-500);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.footer-brand p {
  color: var(--grey-400);
  font-size: 0.88rem;
  margin-top: 12px;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 18px;
  margin-top: 20px;
  align-items: center;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: opacity 0.2s;
  opacity: 0.7;
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  display: block;
}

.footer-social a:hover { opacity: 1; }

.footer-col h5 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--grey-400);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-col ul li a:hover { color: var(--white); }

.footer-map {
  border-top: 1px solid var(--grey-800);
  padding-top: 32px;
  margin-top: 0;
  padding-bottom: 32px;
}

.footer-map-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-500);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.footer-map-label svg {
  width: 13px;
  height: 13px;
  stroke: var(--blue);
  flex-shrink: 0;
}

.footer-map-frame {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--grey-800);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  color: var(--grey-500);
  font-size: 0.82rem;
}

/* ---------- Hero Section ---------- */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(37,99,235,0.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(22,163,74,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text .badge { margin-bottom: 20px; }

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-text h1 span { color: var(--blue); }

.hero-text p {
  font-size: 1.05rem;
  color: var(--grey-400);
  margin-bottom: 32px;
  max-width: 460px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}

.hero-stat .number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
}

.hero-stat .label {
  font-size: 0.8rem;
  color: var(--grey-500);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero-card {
  background: var(--grey-800);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
}

.hero-card:first-child { margin-top: -40px; }
.hero-card:last-child { margin-top: 40px; }

.hero-card-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-direction: column;
  gap: 8px;
}

.hero-card-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey-400);
}

/* ---------- Section Headers ---------- */
.section-header {
  margin-bottom: 40px;
}

.section-header .overline {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-header h2 { margin-bottom: 12px; }

.section-header p {
  font-size: 0.95rem;
  max-width: 500px;
}

/* ---------- Categories Section ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-xl);
  padding: 28px 16px;
  text-align: center;
  transition: var(--transition-slow);
  cursor: pointer;
  text-decoration: none;
  color: var(--black);
  display: block;
}

.category-card:hover {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card:hover .category-count { color: var(--grey-400); }

.category-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}

.category-name {
  font-size: 0.88rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.category-count {
  font-size: 0.75rem;
  color: var(--grey-500);
  font-weight: 600;
}

/* ---------- Products Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.products-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- Page Header ---------- */
.page-header {
  background: var(--grey-50);
  border-bottom: 1px solid var(--grey-200);
  padding: 40px 0;
}

.page-header h1 { margin-bottom: 8px; }
.page-header p { font-size: 0.95rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.breadcrumb a { color: var(--grey-500); font-weight: 600; }
.breadcrumb a:hover { color: var(--black); }
.breadcrumb span { color: var(--grey-400); }
.breadcrumb .current { color: var(--black); font-weight: 700; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--grey-500);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--grey-200);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  color: var(--grey-600);
}

.filter-chip:hover { border-color: var(--grey-500); color: var(--black); }
.filter-chip.active { background: var(--black); color: var(--white); border-color: var(--black); }

.results-info {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--grey-500);
  font-weight: 600;
  flex-shrink: 0;
}

/* ---------- Search Bar ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--grey-100);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: 0 16px;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--black);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--black);
}

.search-bar input::placeholder { color: var(--grey-400); }

.search-bar button {
  background: transparent;
  border: none;
  color: var(--grey-500);
  cursor: pointer;
  display: flex;
  padding: 4px;
}

/* ---------- Toast Notification ---------- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--black);
  color: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  animation: toastIn 0.3s ease;
  max-width: 380px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--orange); }

.toast.fade-out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.modal-header h3 { margin-bottom: 4px; }
.modal-header p { font-size: 0.88rem; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--grey-100);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--grey-600);
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.modal-close:hover { background: var(--grey-200); color: var(--black); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Loader ---------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.4s ease;
}

.loader-overlay.hidden { opacity: 0; pointer-events: none; }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--grey-200);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

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

.products-loading {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.skeleton-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--grey-200);
}

.skeleton {
  background: linear-gradient(90deg, var(--grey-100) 25%, var(--grey-200) 50%, var(--grey-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer { to { background-position: -200% 0; } }

.skeleton-img { height: 280px; border-radius: 0; }
.skeleton-text { height: 14px; margin: 8px 16px; }
.skeleton-text-sm { height: 12px; margin: 6px 16px; width: 60%; }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--grey-400);
}

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

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--grey-600);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* ---------- Features/Banner ---------- */
.features-bar {
  background: var(--grey-50);
  border-top: 1px solid var(--grey-200);
  border-bottom: 1px solid var(--grey-200);
  padding: 28px 0;
}

.features-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-item .feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.feature-item .feature-text h5 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.feature-item .feature-text p {
  font-size: 0.78rem;
  color: var(--grey-500);
}

/* ---------- Newsletter ---------- */
.newsletter-section {
  background: var(--black);
  padding: 56px 0;
}

.newsletter-section h2 { color: var(--white); }
.newsletter-section p { color: var(--grey-400); }

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin-top: 24px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--grey-800);
  border: 1px solid var(--grey-700);
  color: var(--white);
  font-size: 0.9rem;
}

.newsletter-form input::placeholder { color: var(--grey-500); }
.newsletter-form input:focus { border-color: var(--grey-500); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--grey-100); }
::-webkit-scrollbar-thumb { background: var(--grey-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-400); }

@media (max-width: 768px) {
  ::-webkit-scrollbar { display: none; width: 0; }
  * { scrollbar-width: none; -ms-overflow-style: none; }
}

/* ---------- Selection ---------- */
::selection { background: var(--black); color: var(--white); }

/* ============================================================
   MOBILE BOTTOM NAV  (global — shown on all pages ≤768px)
============================================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #fff;
  border-top: 1px solid var(--grey-200);
  z-index: 1000;
  align-items: stretch;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: 60px; }
}

.mbn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--grey-500);
  font-family: var(--font);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.18s;
  position: relative;
  padding: 6px 0 4px;
}

.mbn-item:hover,
.mbn-item.active {
  color: var(--blue);
}

.mbn-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--blue);
  border-radius: 0 0 4px 4px;
}

.mbn-svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.mbn-label {
  line-height: 1;
  white-space: nowrap;
}

.mbn-cart-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mbn-cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  font-family: var(--font);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mbn-cart-badge.hidden { display: none; }

/* ============================================================
   PAGE LOADER
============================================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #080808;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Logo mark */
.pl-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: plFadeUp 0.5s ease both;
}

.pl-monogram {
  font-family: var(--font);
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -3px;
  color: #fff;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.pl-monogram::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: plShimmer 1.4s ease 0.3s infinite;
}

.pl-tagline {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  animation: plFadeUp 0.5s ease 0.2s both;
}

/* Progress bar */
.pl-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.06);
}

.pl-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, #60a5fa 50%, var(--blue) 100%);
  background-size: 200% 100%;
  width: 0;
  animation: plProgress 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards,
             plBarShine 1.2s linear 0.1s infinite;
}

/* Dots */
.pl-dots {
  display: flex;
  gap: 6px;
  margin-top: 32px;
  animation: plFadeUp 0.5s ease 0.35s both;
}

.pl-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}

.pl-dot:nth-child(1) { animation: plDotPulse 1.2s ease 0s infinite; }
.pl-dot:nth-child(2) { animation: plDotPulse 1.2s ease 0.2s infinite; }
.pl-dot:nth-child(3) { animation: plDotPulse 1.2s ease 0.4s infinite; }

/* Keyframes */
@keyframes plFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes plShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes plProgress {
  0%   { width: 0; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

@keyframes plBarShine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes plDotPulse {
  0%, 80%, 100% { background: rgba(255,255,255,0.15); transform: scale(1); }
  40%           { background: #fff; transform: scale(1.4); }
}
