/* ============================================================
   STYLES.CSS — Component Layer
   Loaded AFTER themes.css. Uses variables from themes.css.
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   1. TYPOGRAPHY
   ──────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }
}

p {
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

small {
  font-size: 0.875rem;
  color: var(--text-muted);
}

strong {
  font-weight: 700;
  color: var(--text);
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-info {
  color: var(--info) !important;
}

/* ────────────────────────────────────────────────────────────
   2. LAYOUT
   ──────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1.5rem;
}

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

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

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

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.flex {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ────────────────────────────────────────────────────────────
   3. NAVIGATION BAR
   ──────────────────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.navbar-brand img {
  height: 2rem;
  width: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-links a,
.navbar-links button {
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.navbar-links a:hover,
.navbar-links button:hover {
  color: var(--text);
  background: var(--glass-bg);
}

.navbar-links a.active,
.navbar-links button.active {
  color: var(--primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-actions button,
.navbar-actions a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.25rem;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.navbar-actions button:hover,
.navbar-actions a:hover {
  color: var(--text);
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  background: var(--danger);
  border-radius: 9999px;
  line-height: 1;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.navbar-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 5rem 1.5rem 2rem;
  background: var(--surface);
  border-left: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.navbar-mobile.open {
  right: 0;
}

.navbar-mobile a,
.navbar-mobile button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.navbar-mobile a:hover,
.navbar-mobile button:hover {
  color: var(--text);
  background: var(--glass-bg);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .navbar__links {
    display: none;
  }

  .mobile-menu-toggle,
  .navbar__hamburger {
    display: flex;
  }
}

/* ── Navbar BEM Aliases (JS generates these classes) ── */
.navbar__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.navbar__brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1.375rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; text-decoration: none; }
.navbar__logo { font-weight: 900; color: var(--primary); }
.navbar__logo-img { height: 40px; width: auto; object-fit: contain; }
.navbar__tagline { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.navbar__links { display: flex; align-items: center; gap: 0.25rem; }
.navbar__links a { padding: 0.5rem 0.875rem; font-size: 0.9375rem; font-weight: 500; color: var(--text-muted); background: transparent; border: none; border-radius: var(--radius-md); cursor: pointer; transition: color 0.2s ease, background 0.2s ease; white-space: nowrap; text-decoration: none; }
.navbar__links a:hover { color: var(--text); background: var(--glass-bg); }
.navbar__links a.active { color: var(--primary); }
.navbar__actions { display: flex; align-items: center; gap: 0.5rem; }
.navbar__cart { position: relative; display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; color: var(--text-muted); background: transparent; border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; font-size: 1.25rem; transition: color 0.2s ease; text-decoration: none; }
.navbar__cart:hover { color: var(--text); background: var(--glass-bg); border-color: var(--glass-border); }
.cart-badge { position: absolute; top: 2px; right: 2px; display: flex; align-items: center; justify-content: center; min-width: 1.125rem; height: 1.125rem; padding: 0 0.25rem; font-size: 0.6875rem; font-weight: 700; color: #fff; background: var(--danger); border-radius: 9999px; line-height: 1; }
.navbar__hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 2.5rem; height: 2.5rem; padding: 0.5rem; background: transparent; border: none; border-radius: var(--radius-md); cursor: pointer; }
.navbar__hamburger span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.navbar__mobile { position: fixed; top: 0; right: -100%; width: 300px; max-width: 85vw; height: 100vh; z-index: 1001; display: flex; flex-direction: column; padding: 5rem 1.5rem 2rem; background: var(--surface); border-left: 1px solid var(--glass-border); box-shadow: var(--shadow-xl); transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto; }
.navbar__mobile.open { right: 0; }
.navbar__mobile-links { display: flex; flex-direction: column; gap: 0.5rem; }
.navbar__mobile-links a { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.875rem 1rem; font-size: 1rem; font-weight: 500; color: var(--text-muted); background: transparent; border: none; border-radius: var(--radius-md); cursor: pointer; transition: color 0.2s ease, background 0.2s ease; text-decoration: none; }
.navbar__mobile-links a:hover { color: var(--text); background: var(--glass-bg); }
.navbar__mobile-theme { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--glass-border); }
.navbar__mobile-theme label { font-size: 0.875rem; color: var(--text-muted); display: block; margin-bottom: 0.5rem; }
.navbar__theme { position: relative; }
.theme-select { padding: 0.375rem 0.5rem; font-size: 0.8125rem; background: var(--input-bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

@media (max-width: 768px) {
  .navbar__links { display: none; }
  .navbar__hamburger { display: flex; }
}

/* ────────────────────────────────────────────────────────────
   4. ANNOUNCEMENT BAR
   ──────────────────────────────────────────────────────────── */

.announcement-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1002;
  min-height: 2.25rem;
}

.announcement-bar-marquee {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.announcement-bar-marquee-inner {
  display: inline-flex;
  gap: 3rem;
  animation: announcement-scroll 30s linear infinite;
  padding-left: 100%;
}

.announcement-bar-marquee-inner span {
  white-space: nowrap;
}

@keyframes announcement-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.announcement-bar-dismiss {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 9999px;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s ease;
  line-height: 1;
}

.announcement-bar-dismiss:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Announcement BEM Aliases ── */
.announcement { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; width: 100%; overflow: hidden; background: linear-gradient(90deg, var(--primary), var(--secondary)); color: #fff; font-size: 0.8125rem; font-weight: 600; z-index: 1100; min-height: 2rem; letter-spacing: 0.02em; }
body:not(.no-announcement) .navbar { top: 2rem; }
body:not(.no-announcement) .navbar__mobile { top: 2rem; }
.announcement__track { width: 100%; overflow: hidden; }
.announcement__scroll { display: flex; gap: 4rem; white-space: nowrap; animation: announcementScroll 25s linear infinite; padding: 0.3rem 0; }
.announcement__item { flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.05em; }
@keyframes announcementScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-33.33%); } }
body.no-announcement { --announcement-height: 0px; }
@keyframes announcementScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ────────────────────────────────────────────────────────────
   5. BUTTONS
   ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-size: 200% 200%;
  border-color: var(--primary);
  transition: background-position 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-position: 100% 0;
  border-color: var(--primary-hover);
  box-shadow: 0 0 20px var(--accent-tint, rgba(139, 92, 246, 0.3));
  transform: translateY(-1px);
}

.btn-secondary {
  color: #fff;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  background-size: 200% 200%;
  border-color: var(--secondary);
  transition: background-position 0.3s ease, transform 0.2s ease;
}

.btn-secondary:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
}
}

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

.btn-outline:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  filter: brightness(0.9);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-success {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.btn-success:hover {
  filter: brightness(0.9);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--glass-bg);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 2rem;
  height: 2rem;
}

.btn-icon.btn-lg {
  width: 3rem;
  height: 3rem;
}

/* ────────────────────────────────────────────────────────────
   6. CARDS
   ──────────────────────────────────────────────────────────── */

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--glass-border);
}

/* Product Card */

.product-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}

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

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

.product-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.product-card-actions {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card:hover .product-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.product-card-info {
  padding: 1rem 1.25rem 1.25rem;
}

.product-card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.375rem;
}

.product-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-card-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0.625rem;
  margin-top: 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.product-card-add:hover {
  background: var(--primary-hover);
}

.product-card-add:active {
  transform: scale(0.98);
}

/* Category Card */

.category-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
}

.category-card-content {
  position: relative;
  z-index: 1;
  padding: 1.25rem;
  text-align: center;
  width: 100%;
}

.category-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.category-card-count {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ────────────────────────────────────────────────────────────
   7. FORMS
   ──────────────────────────────────────────────────────────── */

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

.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-tint, rgba(139, 92, 246, 0.15));
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--glass-bg);
}

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

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text);
  user-select: none;
}

.form-checkbox input,
.form-radio input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--danger);
}

.form-hint {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ────────────────────────────────────────────────────────────
   8. BADGE / TAG
   ──────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.badge-success {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.badge-warning {
  color: #000;
  background: var(--warning);
  border-color: var(--warning);
}

.badge-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.badge-info {
  color: #fff;
  background: var(--info);
  border-color: var(--info);
}

.badge-sm {
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tag:hover {
  color: var(--text);
  border-color: var(--primary);
}

.tag.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* ────────────────────────────────────────────────────────────
   9. TOAST NOTIFICATIONS
   ──────────────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
  width: calc(100% - 3rem);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toast-slide-in 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
  opacity: 0;
  transform: translateX(100%);
}

@keyframes toast-slide-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-dismissing {
  animation: toast-slide-out 0.3s cubic-bezier(0.55, 0.09, 0.68, 0.53) forwards;
}

@keyframes toast-slide-out {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.125rem;
  font-size: 1rem;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.125rem;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.toast-close:hover {
  color: var(--text);
  background: var(--glass-bg);
}

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

.toast-success .toast-icon {
  color: var(--success);
}

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

.toast-error .toast-icon {
  color: var(--danger);
}

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

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 3px solid var(--info);
}

.toast-info .toast-icon {
  color: var(--info);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  animation: toast-progress linear forwards;
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 480px) {
  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    width: auto;
  }
}

/* ────────────────────────────────────────────────────────────
   10. MODAL
   ──────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.21, 1.02, 0.73, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
  background: var(--glass-bg);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: none;
    max-height: 95vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
  }

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

/* ────────────────────────────────────────────────────────────
   11. TABLE
   ──────────────────────────────────────────────────────────── */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table th,
.table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.table th {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--glass-bg);
  white-space: nowrap;
}

.table-striped tr:nth-child(even) {
  background: var(--glass-bg);
}

.table-hover tbody tr {
  transition: background 0.2s ease;
}

.table-hover tbody tr:hover {
  background: var(--glass-bg);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ────────────────────────────────────────────────────────────
   12. PAGINATION
   ──────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.page-link:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.page-link.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.page-link:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ────────────────────────────────────────────────────────────
   13. PRODUCT IMAGE GALLERY
   ──────────────────────────────────────────────────────────── */

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

.gallery-main {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-main img.zoomed {
  transform: scale(1.5);
  cursor: zoom-out;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 4.5rem;
  height: 6rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.gallery-thumb:hover {
  opacity: 0.85;
}

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .gallery-thumbs {
    gap: 0.375rem;
  }

  .gallery-thumb {
    width: 3.5rem;
    height: 4.75rem;
  }
}

/* ────────────────────────────────────────────────────────────
   14. QUANTITY SELECTOR
   ──────────────────────────────────────────────────────────── */

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-selector button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--glass-bg);
  border: none;
  color: var(--text);
  font-size: 1.125rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.qty-selector button:hover {
  background: var(--primary);
  color: #fff;
}

.qty-selector button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-selector input {
  width: 3.5rem;
  height: 2.5rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  background: var(--input-bg);
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  outline: none;
  -moz-appearance: textfield;
}

.qty-selector input::-webkit-inner-spin-button,
.qty-selector input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ────────────────────────────────────────────────────────────
   15. SIZE / COLOR PICKERS
   ──────────────────────────────────────────────────────────── */

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.size-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.size-option:hover {
  color: var(--text);
  border-color: var(--primary);
}

.size-option.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.size-option.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.color-swatch {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  cursor: pointer;
  border: 3px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.2s ease, transform 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  outline-color: var(--primary);
}

.color-swatch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ────────────────────────────────────────────────────────────
   16. PRICE DISPLAY
   ──────────────────────────────────────────────────────────── */

.price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price-current {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
}

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

.price-discount {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--danger);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.price-lg .price-current {
  font-size: 1.75rem;
}

.price-sm .price-current {
  font-size: 1.125rem;
}

/* ────────────────────────────────────────────────────────────
   17. BREADCRUMB
   ──────────────────────────────────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item:last-child {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--text-muted);
  opacity: 0.5;
  margin-right: 0.25rem;
}

/* ────────────────────────────────────────────────────────────
   18. STEPPER (Checkout Steps)
   ──────────────────────────────────────────────────────────── */

.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding: 1rem 0;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 140px;
}

.stepper-step-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.stepper-step.active .stepper-step-circle {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--accent-tint, rgba(139, 92, 246, 0.2));
}

.stepper-step.completed .stepper-step-circle {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.stepper-step-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  transition: color 0.2s ease;
}

.stepper-step.active .stepper-step-label {
  color: var(--text);
  font-weight: 600;
}

.stepper-step.completed .stepper-step-label {
  color: var(--success);
}

.stepper-connector {
  position: absolute;
  top: 1.25rem;
  left: calc(50% + 1.5rem);
  width: calc(100% - 3rem);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.stepper-step.completed .stepper-connector {
  background: var(--success);
}

.stepper-step:last-child .stepper-connector {
  display: none;
}

@media (max-width: 480px) {
  .stepper-step-label {
    font-size: 0.6875rem;
  }

  .stepper-step-circle {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .stepper-connector {
    top: 1rem;
  }
}

/* ────────────────────────────────────────────────────────────
   19. FOOTER
   ──────────────────────────────────────────────────────────── */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--glass-border);
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.footer-brand-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 0.625rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.footer-column-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-newsletter {
  margin-top: 1rem;
}

.footer-newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.footer-newsletter-form input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease;
}

.footer-newsletter-form input:focus {
  border-color: var(--primary);
}

.footer-newsletter-form button {
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-payments {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-payments img {
  height: 1.5rem;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.footer-payments img:hover {
  opacity: 1;
}

/* ── Footer BEM Aliases ── */
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--glass-border); }
.footer__col { display: flex; flex-direction: column; }
.footer__brand-col { gap: 1rem; }
.footer__logo { font-size: 1.5rem; font-weight: 800; color: var(--text); text-decoration: none; display: inline-block; }
.footer__desc { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.6; max-width: 320px; }
.footer__social { display: flex; gap: 0.625rem; margin-top: 0.5rem; }
.footer__social-link { display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; color: var(--text-muted); background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-md); transition: color 0.2s ease, background 0.2s ease; }
.footer__social-link:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.footer__heading { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin-bottom: 1rem; margin-top: 0; }
.footer__list { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.footer__list a { font-size: 0.9375rem; color: var(--text-muted); transition: color 0.2s ease; text-decoration: none; }
.footer__list a:hover { color: var(--primary); }
.footer__newsletter { margin-top: 0; }
.footer__newsletter-desc { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.footer__newsletter-form { display: flex; gap: 0.5rem; }
.footer__newsletter-input { flex: 1; padding: 0.625rem 0.875rem; font-size: 0.875rem; color: var(--text); background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-md); outline: none; transition: border-color 0.2s ease; font-family: inherit; }
.footer__newsletter-input:focus { border-color: var(--primary); }
.footer__newsletter-btn { flex-shrink: 0; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.5rem 0; }
.footer__payments { display: flex; align-items: center; gap: 0.75rem; }
.footer__payment-icon { font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.5rem; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); color: var(--text-muted); }

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer__brand-col { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ────────────────────────────────────────────────────────────
   20. LOADING STATES
   ──────────────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 9999px;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 3px;
}

.spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 1.5px;
}

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

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  border-radius: var(--radius-md);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-text {
  height: 0.875rem;
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-title {
  height: 1.5rem;
  width: 40%;
  margin-bottom: 0.75rem;
}

.skeleton-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 3 / 4;
}

.skeleton-btn {
  height: 2.5rem;
  width: 8rem;
  border-radius: var(--radius-md);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  border-radius: inherit;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

/* ────────────────────────────────────────────────────────────
   21. SEARCH BAR
   ──────────────────────────────────────────────────────────── */

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

.search-bar-icon {
  position: absolute;
  left: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-bar input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.75rem;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, width 0.3s ease;
}

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

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-tint, rgba(139, 92, 246, 0.15));
}

.search-bar input:focus ~ .search-bar-icon {
  color: var(--primary);
}

.search-bar-clear {
  position: absolute;
  right: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: transparent;
  border: none;
  border-radius: 9999px;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease;
}

.search-bar input:not(:placeholder-shown) ~ .search-bar-clear {
  opacity: 1;
  visibility: visible;
}

.search-bar-clear:hover {
  background: var(--glass-bg);
  color: var(--text);
}

/* ────────────────────────────────────────────────────────────
   22. DROPDOWN
   ──────────────────────────────────────────────────────────── */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  min-width: 12rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.375rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}

.dropdown-item:hover {
  color: var(--text);
  background: var(--glass-bg);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
  height: 1px;
  margin: 0.375rem 0;
  background: var(--glass-border);
}

/* ────────────────────────────────────────────────────────────
   23. TOOLTIP
   ──────────────────────────────────────────────────────────── */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

[data-tooltip=""]::after,
[data-tooltip]::after {
  content: none;
}

[data-tooltip]:not([data-tooltip=""])::after {
  content: attr(data-tooltip);
}

/* ────────────────────────────────────────────────────────────
   24. UTILITY CLASSES
   ──────────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

.block {
  display: block !important;
}

.inline-block {
  display: inline-block !important;
}

.inline-flex {
  display: inline-flex !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-left {
  text-align: left !important;
}

.text-uppercase {
  text-transform: uppercase !important;
  letter-spacing: 0.05em;
}

.text-lowercase {
  text-transform: lowercase !important;
}

.text-capitalize {
  text-transform: capitalize !important;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.w-full {
  width: 100% !important;
}

.w-auto {
  width: auto !important;
}

.h-full {
  height: 100% !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.overflow-auto {
  overflow: auto !important;
}

.relative {
  position: relative !important;
}

.absolute {
  position: absolute !important;
}

.fixed {
  position: fixed !important;
}

.sticky {
  position: sticky !important;
  top: 0;
}

.inset-0 {
  inset: 0 !important;
}

.rounded-full {
  border-radius: 9999px !important;
}

.rounded-lg {
  border-radius: var(--radius-lg) !important;
}

.rounded-md {
  border-radius: var(--radius-md) !important;
}

.rounded-sm {
  border-radius: var(--radius-sm) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.shadow-xl {
  box-shadow: var(--shadow-xl) !important;
}

.transition {
  transition: all 0.2s ease !important;
}

.transition-fast {
  transition: all 0.1s ease !important;
}

.transition-slow {
  transition: all 0.4s ease !important;
}

.cursor-pointer {
  cursor: pointer !important;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

.select-none {
  user-select: none !important;
}

.pointer-events-none {
  pointer-events: none !important;
}

/* Spacing utilities */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-5 { margin-top: 1.25rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-8 { margin-top: 2rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.mx-auto { margin-inline: auto !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }

.px-0 { padding-inline: 0 !important; }
.px-1 { padding-inline: 0.25rem !important; }
.px-2 { padding-inline: 0.5rem !important; }
.px-3 { padding-inline: 0.75rem !important; }
.px-4 { padding-inline: 1rem !important; }
.px-5 { padding-inline: 1.25rem !important; }
.px-6 { padding-inline: 1.5rem !important; }
.px-8 { padding-inline: 2rem !important; }

.py-0 { padding-block: 0 !important; }
.py-1 { padding-block: 0.25rem !important; }
.py-2 { padding-block: 0.5rem !important; }
.py-3 { padding-block: 0.75rem !important; }
.py-4 { padding-block: 1rem !important; }
.py-5 { padding-block: 1.25rem !important; }
.py-6 { padding-block: 1.5rem !important; }
.py-8 { padding-block: 2rem !important; }

/* Section spacing */

.section {
  padding-block: 3rem;
}

.section-lg {
  padding-block: 5rem;
}

@media (max-width: 768px) {
  .section {
    padding-block: 2rem;
  }

  .section-lg {
    padding-block: 3rem;
  }
}

/* ────────────────────────────────────────────────────────────
   GLOBAL TRANSITIONS
   ──────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: ease;
  transition-duration: 0s;
}

a,
button,
input,
select,
textarea,
.card,
.product-card,
.tag,
.badge,
.btn,
.page-link,
.gallery-thumb,
.color-swatch,
.size-option,
.dropdown-item,
.toast,
.modal,
.navbar {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: ease;
  transition-duration: 0.2s;
}
