/* =====================================================================
   SoftKart — Design system & component styles
   Palette: electric blue, violet, hot pink, amber on a deep indigo base
   Type:    Space Grotesk (display) + Plus Jakarta Sans (body)
   Signature: cursor-tracked 3D tilt cards with layered depth + glare
   ===================================================================== */

/* ---- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); }
p { margin: 0; }

/* ---- Design tokens --------------------------------------------------- */
:root {
  --color-blue: #3B6DFF;
  --color-violet: #8B5CF6;
  --color-pink: #F72585;
  --color-amber: #FFB020;
  --color-teal: #22D3A5;

  --bg-deep: #150F3D;
  --bg-deep-2: #1E1450;
  --bg-deep-3: #2A1B63;

  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border-glass: rgba(255, 255, 255, 0.13);

  --text-primary: #F5F3FF;
  --text-dim: #B7AEE0;
  --text-dimmer: #8B81B8;

  --grad-primary: linear-gradient(135deg, var(--color-blue), var(--color-violet) 55%, var(--color-pink));
  --grad-warm: linear-gradient(135deg, var(--color-pink), var(--color-amber));
  --grad-text: linear-gradient(100deg, #7FA0FF, var(--color-violet) 45%, var(--color-pink) 90%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-glow-violet: 0 20px 60px -18px rgba(139, 92, 246, 0.5);
  --shadow-glow-pink: 0 20px 50px -18px rgba(247, 37, 133, 0.4);
  --shadow-card: 0 12px 34px -14px rgba(6, 3, 26, 0.65);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
}

/* Ambient background wash so panels don't sit on flat black */
body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(59, 109, 255, 0.16), transparent 40%),
    radial-gradient(circle at 88% 18%, rgba(247, 37, 133, 0.14), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.16), transparent 45%);
  background-attachment: fixed;
}

/* ---- Utility ------------------------------------------------------------ */
.hidden { display: none !important; }
.no-scroll { overflow: hidden; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-violet);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:focus-visible {
  outline: 2px solid var(--color-amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 100px;
  border: none;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth), background 0.25s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow-violet);
}
.btn--primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 24px 50px -14px rgba(139, 92, 246, 0.65); }
.btn--ghost {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--surface-strong); transform: translateY(-2px); }
.btn--danger {
  background: rgba(247, 37, 133, 0.14);
  color: #FF8FC2;
  border: 1px solid rgba(247, 37, 133, 0.35);
}
.btn--danger:hover { background: rgba(247, 37, 133, 0.24); }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }
.btn--small { padding: 9px 16px; font-size: 0.83rem; border-radius: 100px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn--add {
  flex-shrink: 0;
  background: linear-gradient(135deg, #FF6A00, #000000);
  color: #fff;
  border: 1px solid rgba(255, 106, 0, 0.35);
  box-shadow: 0 6px 20px -6px rgba(255, 106, 0, 0.4);
}
.btn--add:hover {
  background: linear-gradient(135deg, #FF8008, #111111);
  box-shadow: 0 8px 24px -4px rgba(255, 106, 0, 0.65);
  transform: translateY(-2px) scale(1.03);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(21, 15, 61, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.navbar--scrolled { box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.6); border-bottom-color: rgba(255, 255, 255, 0.12); }
.navbar__inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.navbar__left, .navbar__right { display: flex; align-items: center; gap: 14px; }

.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo__mark { display: inline-flex; filter: drop-shadow(0 4px 10px rgba(139, 92, 246, 0.5)); }
.logo__word { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -0.01em; }

.filter-wrap { position: relative; }
.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.filter-btn:hover { background: var(--surface-strong); }
.filter-btn__count {
  background: var(--grad-warm);
  color: #24123f;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.filter-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 300px;
  background: linear-gradient(160deg, var(--bg-deep-2), var(--bg-deep-3));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px;
  z-index: 250;
}
.filter-group { margin-bottom: 18px; }
.filter-group h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 10px; font-family: var(--font-body); font-weight: 700; }
.filter-checkboxes { display: flex; flex-direction: column; gap: 9px; max-height: 200px; overflow-y: auto; }
.filter-checkbox { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; cursor: pointer; }
.filter-checkbox input { accent-color: var(--color-violet); width: 15px; height: 15px; }
.filter-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  transition: border-color 0.2s, background 0.2s;
}
.filter-select:focus {
  outline: none;
  border-color: var(--color-violet);
  background: var(--bg-deep-2);
}
.filter-select option {
  background: var(--bg-deep-2);
  color: var(--text-primary);
}
.filter-panel__actions { display: flex; gap: 10px; margin-top: 4px; }
.filter-panel__actions .btn { flex: 1; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  padding: 9px 16px;
  width: 240px;
  color: var(--text-dim);
  transition: border-color 0.2s, width 0.2s;
}
.search-box:focus-within { border-color: var(--color-violet); color: var(--text-primary); }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  width: 100%;
}
.search-box input::placeholder { color: var(--text-dimmer); }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  transition: background 0.2s, transform 0.2s;
}
.icon-btn:hover { background: var(--surface-strong); transform: translateY(-1px); }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--grad-warm);
  color: #26123f;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}
.cart-badge--visible { opacity: 1; transform: scale(1); }

.admin-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 9px 14px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.admin-link:hover { color: var(--text-primary); border-color: var(--border-glass); }

/* ============================================================
   HERO — signature 3D tilt showcase
   ============================================================ */
.hero { position: relative; padding: 64px 28px 100px; overflow: hidden; }
.hero__glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 700px;
  background:
    radial-gradient(circle at 25% 20%, rgba(59, 109, 255, 0.4), transparent 45%),
    radial-gradient(circle at 78% 32%, rgba(247, 37, 133, 0.32), transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(139, 92, 246, 0.36), transparent 50%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-amber);
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.3);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero__subtitle { font-size: 1.1rem; color: var(--text-dim); line-height: 1.6; max-width: 46ch; margin-bottom: 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero__stats { display: flex; gap: 34px; margin: 0; }
.hero__stats dt { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--text-primary); }
.hero__stats dd { margin: 2px 0 0; font-size: 0.85rem; color: var(--text-dim); }

/* Reveal-on-load entrance */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth); transition-delay: var(--reveal-delay, 0s); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-card { opacity: 0; transform: translateY(30px) scale(0.94); transition: opacity 0.75s var(--ease-smooth), transform 0.75s var(--ease-smooth); transition-delay: var(--reveal-delay, 0s); }
.reveal-card.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* Hero 3D card stack */
.hero__visual {
  position: relative;
  height: 460px;
  perspective: 1400px;
  transform-style: preserve-3d;
  transform: rotateY(var(--parallax-y, 0deg)) rotateX(var(--parallax-x, 0deg));
  transition: transform 0.4s var(--ease-smooth);
}
.hero-card {
  position: absolute;
  width: 250px;
  perspective: 1000px;
}
.hero-card:nth-of-type(1) { top: 10px; left: 8%; z-index: 3; animation: floatY 6.5s ease-in-out infinite; }
.hero-card--b { top: 130px; left: 40%; z-index: 2; animation: floatY 7.5s ease-in-out infinite 0.6s; }
.hero-card--c { top: 30px; left: 62%; z-index: 1; animation: floatY 7s ease-in-out infinite 1.2s; }

.hero-card__inner {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  overflow: hidden;
}
.hero-card__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
}
.hero-card__icon { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 14px; }
.hero-card__name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 4px; }
.hero-card__meta { display: block; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 14px; }
.hero-card__price { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--color-amber); }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(21, 15, 61, 0.85);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 100px;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5);
  animation: floatY 5.5s ease-in-out infinite;
}
.floating-badge--1 { top: 60%; left: 0; color: var(--color-teal); animation-delay: 0.4s; }
.floating-badge--2 { top: 4%; right: 2%; color: var(--color-amber); animation-delay: 1.1s; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header { max-width: 1400px; margin: 0 auto 30px; padding: 0 28px; }
.section-header--catalog { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.section-eyebrow { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-violet); margin-bottom: 8px; }
.section-header h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -0.01em; }
.results-count { color: var(--text-dim); font-size: 0.9rem; }

.featured { padding: 20px 0 76px; }
.featured-row {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.catalog { padding: 20px 0 100px; }

/* ============================================================
   PRODUCT CARDS — signature 3D tilt (shared by grid + featured + hero)
   ============================================================ */
.product-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.product-card {
  perspective: 1200px;
  animation: cardFadeUp 0.6s var(--ease-smooth) both;
  animation-delay: var(--card-delay, 0s);
}
@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card__inner {
  position: relative;
  height: 100%;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
}
.product-card:hover .product-card__inner,
.product-card:focus-visible .product-card__inner {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: var(--shadow-glow-violet);
}
.product-card__glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; }

.product-card__category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-teal);
  margin-bottom: 12px;
}
.product-card__image { width: 224px; height: 224px; border-radius: 18px; margin: 0 auto 16px; overflow: hidden; box-shadow: 0 10px 22px -10px rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.03); }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.product-card__name { font-size: 1.06rem; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.product-card__desc { font-size: 0.86rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 14px; flex-grow: 1; }
.product-card__rating { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 16px; }
.product-card__rating-num { font-weight: 700; color: var(--text-primary); }

.product-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.product-card__price { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; }

/* Star rating (CSS-only fill overlay) */
.stars { position: relative; display: inline-block; font-size: 0.95rem; line-height: 1; letter-spacing: 2px; }
.stars__track { color: rgba(255, 255, 255, 0.18); }
.stars__fill { position: absolute; top: 0; left: 0; overflow: hidden; color: var(--color-amber); white-space: nowrap; }

/* Skeleton loading state */
.product-card--skeleton {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  height: 100%;
  min-height: 290px;
}
.skeleton-block { background: linear-gradient(100deg, rgba(255,255,255,0.05) 20%, rgba(255,255,255,0.13) 40%, rgba(255,255,255,0.05) 60%); background-size: 200% 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: 8px; }
.skeleton-block--img { width: 224px; height: 224px; border-radius: 18px; margin: 0 auto 16px; }
.skeleton-block--line { height: 14px; margin-bottom: 10px; width: 90%; }
.skeleton-block--line.short { width: 55%; }
.skeleton-block--line.price { width: 40%; height: 20px; margin-top: 14px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.no-results { max-width: 1400px; margin: 0 auto; padding: 70px 28px; text-align: center; color: var(--text-dim); }
.no-results svg { margin-bottom: 16px; color: var(--color-violet); }
.no-results h3 { font-size: 1.3rem; color: var(--text-primary); margin-bottom: 8px; }
.no-results p { margin-bottom: 20px; }

/* ============================================================
   MODALS (shared overlay + detail + form + result)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(8, 5, 26, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%;
  background: linear-gradient(165deg, var(--bg-deep-2), var(--bg-deep));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
  max-height: 88vh;
  overflow-y: auto;
  animation: modalPop 0.3s var(--ease-smooth);
}
@keyframes modalPop { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal--detail { max-width: 880px; }
.modal--form { max-width: 460px; padding: 34px; }
.modal--product { max-width: 620px; }
.modal--result { max-width: 460px; }

.modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal__close:hover { background: rgba(255, 255, 255, 0.16); }

/* Detail modal */
.detail { display: grid; grid-template-columns: 300px 1fr; }
.detail__image { background: linear-gradient(160deg, var(--bg-deep-3), var(--bg-deep-2)); display: flex; align-items: center; justify-content: center; padding: 30px; }
.detail__image img { width: 240px; height: 240px; border-radius: 28px; box-shadow: var(--shadow-glow-violet); object-fit: contain; }
.detail__content { padding: 40px 38px; }
.detail__category { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-teal); }
.detail__content h2 { font-size: 1.7rem; margin: 10px 0 12px; }
.detail__rating { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 18px; }
.detail__desc { color: var(--text-dim); line-height: 1.7; margin-bottom: 22px; }
.detail__features { display: flex; flex-direction: column; gap: 11px; margin-bottom: 28px; }
.detail__features li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; }
.detail__features svg { color: var(--color-teal); flex-shrink: 0; margin-top: 3px; }
.detail__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.detail__price { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }
.detail__actions { display: flex; gap: 10px; }

/* Form modal (checkout + admin product form) */
.modal--form h3, .modal--product h3 { font-size: 1.35rem; margin-bottom: 8px; }
.modal__subtitle { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 26px; }
.modal--product { padding: 34px; }

.form-field { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field label { display: block; font-size: 0.84rem; font-weight: 600; margin-bottom: 7px; color: var(--text-dim); }
.form-hint-inline { font-weight: 400; color: var(--text-dimmer); }
.form-hint { display: block; font-size: 0.78rem; color: var(--text-dimmer); margin-top: 6px; }
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="file"],
.form-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: border-color 0.2s, background 0.2s;
}
.form-field textarea { resize: vertical; font-family: var(--font-body); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--color-violet); background: rgba(255, 255, 255, 0.08); }
.input--invalid { border-color: var(--color-pink) !important; }
.form-error { display: block; min-height: 18px; font-size: 0.78rem; color: #FF8FC2; margin-top: 6px; }
.admin-image-preview { width: 64px; height: 64px; border-radius: 12px; margin-top: 10px; object-fit: cover; }

.checkout-summary { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px; font-size: 0.86rem; }
.checkout-summary__row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--text-dim); }
.checkout-summary__row--total { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 6px; padding-top: 10px; font-weight: 700; color: var(--text-primary); font-size: 0.98rem; }
.checkout-secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.78rem; color: var(--text-dimmer); margin-top: 16px; }

.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.modal__actions .btn--ghost { flex: 0 0 auto; }
.modal__actions .btn--primary { flex: 1; }

/* Result modal */
.result { padding: 44px 34px; text-align: center; }
.result__icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; background: rgba(34, 211, 165, 0.14); color: var(--color-teal); }
.result__icon--error { background: rgba(247, 37, 133, 0.14); color: var(--color-pink); }
.result h3 { font-size: 1.4rem; margin-bottom: 8px; }
.result__order-id { color: var(--text-dimmer); font-size: 0.82rem; margin-bottom: 20px; }
.result__items { text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 6px 16px; margin-bottom: 16px; max-height: 200px; overflow-y: auto; }
.result-item { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.result-item:last-child { border-bottom: none; }
.result-item__row { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 6px; }
.result-item__key { font-size: 0.78rem; color: var(--text-dim); }
.result-item__key code { background: rgba(255, 255, 255, 0.08); padding: 2px 7px; border-radius: 5px; color: var(--color-amber); font-size: 0.76rem; }
.result__total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; padding: 12px 4px; margin-bottom: 20px; }
.result__note { font-size: 0.8rem; color: var(--text-dimmer); margin-bottom: 22px; line-height: 1.5; }

/* ============================================================
   CART SIDEBAR
   ============================================================ */
.overlay-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(8, 5, 26, 0.6); backdrop-filter: blur(4px); animation: fadeIn 0.25s ease-out; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: linear-gradient(180deg, var(--bg-deep-2), var(--bg-deep));
  border-left: 1px solid var(--border-glass);
  z-index: 450;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-smooth);
  box-shadow: -30px 0 60px -20px rgba(0, 0, 0, 0.6);
}
.cart-sidebar--open { transform: translateX(0); }

.cart-sidebar__header { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.cart-sidebar__header h3 { font-size: 1.2rem; }
.cart-sidebar__header .modal__close { position: static; }

.cart-sidebar__items { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); align-items: center; }
.cart-item__img { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__info h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item__price { font-size: 0.84rem; color: var(--text-dim); display: block; margin-bottom: 8px; }
.qty-control { display: inline-flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, 0.05); border-radius: 100px; padding: 4px 12px; }
.qty-btn { background: none; border: none; color: var(--text-primary); font-size: 1.05rem; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.qty-value { font-size: 0.86rem; font-weight: 700; min-width: 14px; text-align: center; }
.cart-item__remove { background: none; border: none; color: var(--text-dimmer); flex-shrink: 0; padding: 6px; border-radius: 50%; transition: color 0.2s, background 0.2s; }
.cart-item__remove:hover { color: var(--color-pink); background: rgba(247, 37, 133, 0.1); }

.cart-sidebar__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--text-dimmer); text-align: center; padding: 0 30px; }

.cart-sidebar__footer { padding: 20px 24px 26px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.cart-sidebar__row { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-dim); padding: 5px 0; }
.cart-sidebar__row--total { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); padding: 8px 0 16px; }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container { position: fixed; bottom: 26px; right: 26px; z-index: 900; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--bg-deep-3), var(--bg-deep-2));
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.6);
  transform: translateX(30px);
  opacity: 0;
  transition: transform 0.35s var(--ease-smooth), opacity 0.35s var(--ease-smooth);
  max-width: 340px;
}
.toast--visible { transform: translateX(0); opacity: 1; }
.toast--success .toast__icon { color: var(--color-teal); }
.toast--error .toast__icon { color: var(--color-pink); }
.toast--info .toast__icon { color: var(--color-blue); }
.toast__icon { display: flex; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 60px; margin-top: 40px; }
.footer__inner { max-width: 1400px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.6; margin: 14px 0 20px; max-width: 32ch; }
.footer__social { display: flex; gap: 10px; }
.footer__social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-glass); color: var(--text-dim); transition: color 0.2s, border-color 0.2s; }
.footer__social a:hover { color: var(--color-pink); border-color: var(--color-pink); }
.footer__col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dimmer); margin-bottom: 16px; }
.footer__col ul { display: flex; flex-direction: column; gap: 11px; }
.footer__col li { color: var(--text-dim); font-size: 0.89rem; }
.footer__col a:hover { color: var(--color-amber); }

.footer__badges { max-width: 1400px; margin: 46px auto 0; padding: 22px 28px; border-top: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-wrap: wrap; gap: 26px; }
.footer__badges span { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--text-dimmer); font-weight: 600; }
.footer__badges svg { color: var(--color-teal); }

.footer__bottom { text-align: center; padding: 22px 28px 34px; color: var(--text-dimmer); font-size: 0.8rem; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-body { background: var(--bg-deep); }

.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-login__card { width: 100%; max-width: 400px; background: linear-gradient(165deg, var(--bg-deep-2), var(--bg-deep)); border: 1px solid var(--border-glass); border-radius: var(--radius-lg); padding: 40px 34px; box-shadow: var(--shadow-card); }
.admin-login__logo { justify-content: center; margin-bottom: 28px; }
.admin-login h1 { font-size: 1.5rem; margin-bottom: 8px; text-align: center; }
.admin-login__subtitle { color: var(--text-dim); font-size: 0.88rem; text-align: center; margin-bottom: 28px; }
.admin-login__error { min-height: 18px; color: #FF8FC2; font-size: 0.83rem; text-align: center; margin: 4px 0 14px; }
.admin-login__hint { font-size: 0.78rem; color: var(--text-dimmer); text-align: center; margin-top: 20px; line-height: 1.6; }
.admin-login__hint code { background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 5px; }
.admin-login__back { display: block; text-align: center; margin-top: 18px; font-size: 0.84rem; color: var(--text-dim); }
.admin-login__back:hover { color: var(--text-primary); }

.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); position: sticky; top: 0; background: rgba(21, 15, 61, 0.85); backdrop-filter: blur(14px); z-index: 100; }
.admin-topbar__badge { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; background: var(--grad-warm); color: #26123f; padding: 3px 9px; border-radius: 100px; margin-left: 6px; vertical-align: middle; }
.admin-topbar__actions { display: flex; gap: 10px; }

.admin-content { max-width: 1200px; margin: 0 auto; padding: 34px 32px 80px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px; }
.admin-stat-card { background: var(--surface); border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 20px 22px; }
.admin-stat-card__label { display: block; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 8px; }
.admin-stat-card__value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }

.admin-panel { background: var(--surface); border: 1px solid var(--border-glass); border-radius: var(--radius-lg); overflow: hidden; }
.admin-panel__header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 22px 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.admin-panel__header h2 { font-size: 1.15rem; }
.admin-panel__header-actions { display: flex; gap: 12px; align-items: center; }
.search-box--admin { width: 220px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dimmer); padding: 14px 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.admin-table td { padding: 14px 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; font-size: 0.9rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table__loading { text-align: center; color: var(--text-dimmer); padding: 40px !important; }
.admin-table__img img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.admin-table__name { font-weight: 600; margin-bottom: 3px; }
.admin-table__desc { font-size: 0.78rem; color: var(--text-dimmer); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-table__tag { background: rgba(139, 92, 246, 0.15); color: #C4B5FD; font-size: 0.76rem; font-weight: 600; padding: 4px 10px; border-radius: 100px; white-space: nowrap; }
.admin-table__actions { display: flex; gap: 8px; white-space: nowrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { height: 360px; margin-top: 20px; }
  .detail { grid-template-columns: 1fr; }
  .detail__image { padding: 34px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .navbar__inner { padding: 0 16px; gap: 10px; }
  .filter-btn__label { display: none; }
  .search-box { width: 150px; }
  .admin-link span { display: none; }
  .hero { padding: 40px 16px 70px; }
  .section-header, .product-grid, .featured-row, .no-results { padding-left: 16px; padding-right: 16px; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-content { padding: 24px 16px 60px; }
  .admin-topbar { padding: 16px; }
}

@media (max-width: 640px) {
  .hero__stats { gap: 22px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero-card { width: 200px; }
  .hero-card--b { left: 30%; }
  .hero-card--c { left: 52%; }
  .search-box { width: 120px; }
  .footer__inner { grid-template-columns: 1fr; gap: 30px; }
  .cart-sidebar { width: 100vw; }
  .modal--form, .modal--product { padding: 26px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .modal__actions { flex-direction: column-reverse; }
  .modal__actions .btn { width: 100%; }
  .admin-panel__header { flex-direction: column; align-items: stretch; }
  .search-box--admin { width: 100%; }
}

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-card { opacity: 1; transform: none; }
  .hero-card, .floating-badge { animation: none; }
}
