/* =====================================================
   404 Informatika — Master Stylesheet
   ===================================================== */

/* ---- Design Tokens ---- */
:root {
  --red:         #9B2020;
  --red-dark:    #7A1818;
  --red-glow:    rgba(155, 32, 32, 0.22);
  --red-glow-lg: rgba(155, 32, 32, 0.4);
  --charcoal:    #3A3A3A;
  --bg:          #0F0F0F;
  --surface:     #1A1A1A;
  --surface2:    #242424;
  --surface3:    #2E2E2E;
  --border:      #2E2E2E;
  --border-hover:#4A4A4A;
  --text:        #E8E8E8;
  --text-muted:  #888;
  --text-dim:    #555;
  --white:       #FFFFFF;
  --wa-green:    #25D366;
  --wa-glow:     rgba(37, 211, 102, 0.35);
  --stock-in:    #22c55e;
  --stock-low:   #f59e0b;
  --stock-out:   #ef4444;

  --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
  --font-body:    'Inter', system-ui, sans-serif;

  --sp-1:  4px;  --sp-2:  8px;  --sp-3: 12px;
  --sp-4: 16px;  --sp-5: 20px;  --sp-6: 24px;
  --sp-8: 32px;  --sp-10:40px;  --sp-12:48px;
  --sp-16:64px;  --sp-20:80px;

  --r-sm:  4px;
  --r-md:  8px;
  --r-lg: 16px;
  --r-xl: 24px;

  --ease: cubic-bezier(0.25, 0, 0, 1);
  --t-fast: 150ms;
  --t-mid:  300ms;

  --max-w: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }
address { font-style: normal; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Typography ---- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--white);
}
.mono, .price { font-family: var(--font-mono); }

/* ---- Site Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-404  { color: var(--red); }
.logo-name { color: var(--white); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-inline: auto;
}
.nav-link {
  padding: var(--sp-2) var(--sp-3);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link:hover, .nav-link.active { color: var(--white); background: var(--surface2); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-2);
  min-width: 200px;
  display: none;
  z-index: 200;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; flex-direction: column; }
.nav-dropdown-item {
  padding: var(--sp-2) var(--sp-3);
  font-size: 0.875rem;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-dropdown-item:hover { color: var(--white); background: var(--surface2); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.lang-btn {
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.lang-btn:hover { color: var(--white); border-color: var(--border-hover); }
.btn-wa-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 16px;
  background: var(--wa-green);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.btn-wa-nav:hover { opacity: 0.9; transform: translateY(-1px); }

/* Mobile hamburger (CSS-only) */
.nav-toggle-input { display: none; }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--sp-2);
  margin-left: auto;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-mid), opacity var(--t-fast);
}
.nav-toggle-input:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle-input:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle-input:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle-input:checked ~ .nav-links { display: flex; }

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4);
    gap: var(--sp-1);
  }
  .nav-link { justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--surface3);
    margin-top: var(--sp-1);
  }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown .nav-link--has-dropdown { pointer-events: none; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: opacity var(--t-fast), transform var(--t-fast), box-shadow var(--t-mid);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 24px var(--red-glow); }
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--border-hover);
}
.btn--outline:hover { border-color: var(--white); transform: translateY(-2px); }
.btn--wa {
  background: var(--wa-green);
  color: var(--white);
}
.btn--wa:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 8px 24px var(--wa-glow); }
.btn--large { padding: 16px 32px; font-size: 1rem; }

/* ---- WhatsApp Float ---- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  background: var(--wa-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--wa-glow);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  z-index: 999;
  color: var(--white);
}
.whatsapp-float:hover { transform: scale(1.12); box-shadow: 0 8px 32px var(--wa-glow); }

/* ---- Hero Section ---- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(155,32,32,0.18) 0%, transparent 70%),
    linear-gradient(160deg, #0F0F0F 0%, #1A0A0A 55%, #200808 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.015) 3px, rgba(255,255,255,0.015) 4px);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding-block: var(--sp-20);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--sp-4);
}
.hero h1 {
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.92;
  margin-bottom: var(--sp-6);
}
.hero h1 .accent { color: var(--red); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--sp-10);
  max-width: 480px;
}
.hero-ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.hero-badge {
  position: absolute;
  right: var(--gutter);
  bottom: var(--sp-12);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  writing-mode: vertical-rl;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
}
@media (max-width: 600px) {
  .hero-badge { display: none; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; }
}

/* ---- Section Titles ---- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
}
.section-link {
  font-size: 0.875rem;
  color: var(--red);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.section-link:hover { color: var(--white); }

/* ---- Categories Strip ---- */
.categories-section {
  padding-block: var(--sp-16);
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.categories-scroll {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-width: 140px;
  scroll-snap-align: start;
  transition: border-color var(--t-mid), transform var(--t-mid), background var(--t-mid);
  cursor: pointer;
  flex-shrink: 0;
}
.category-tile:hover {
  border-color: var(--red);
  background: var(--surface3);
  transform: translateY(-3px);
}
.category-tile .icon {
  font-size: 2rem;
  line-height: 1;
}
.category-tile span {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  transition: color var(--t-fast);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.category-tile:hover span { color: var(--white); }

/* ---- Products Grid ---- */
.featured-section { padding-block: var(--sp-16); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-5);
}
.products-grid .product-card:nth-child(1) { grid-column: span 8; }
.products-grid .product-card:nth-child(2) { grid-column: span 4; }
.products-grid .product-card:nth-child(n+3) { grid-column: span 4; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-5);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Product Card ---- */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
  animation: fadeUp 0.5s var(--ease) both;
}
.product-card:hover {
  border-color: var(--red);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px var(--red-glow-lg);
}
.card-link { display: contents; }
.card-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-4);
  transition: transform var(--t-mid);
}
.product-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.stock-in     { background: rgba(34,197,94,0.18);  color: var(--stock-in);  }
.stock-low    { background: rgba(245,158,11,0.18); color: var(--stock-low); }
.stock-out    { background: rgba(239,68,68,0.18);  color: var(--stock-out); }
.stock-unknown { background: rgba(136,136,136,0.18); color: var(--text-muted); }

.card-body {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.card-brand {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.card-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  flex: 1;
}
.card-price {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--red);
  margin-top: auto;
}
.card-price-orig {
  font-size: 0.875rem;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-left: var(--sp-2);
}
.card-footer {
  padding: var(--sp-3) var(--sp-5) var(--sp-4);
  border-top: 1px solid var(--surface3);
}
.btn-card-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--surface3);
  border-radius: var(--r-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  cursor: pointer;
}
.btn-card-wa:hover {
  background: rgba(37,211,102,0.1);
  border-color: var(--wa-green);
  color: var(--wa-green);
}

/* Responsive grid */
@media (max-width: 1024px) {
  .products-grid .product-card:nth-child(1) { grid-column: span 12; }
  .products-grid .product-card:nth-child(2) { grid-column: span 6; }
  .products-grid .product-card:nth-child(n+3) { grid-column: span 6; }
}
@media (max-width: 640px) {
  .products-grid .product-card { grid-column: span 12 !important; }
}

/* ---- Catalog Page ---- */
.catalog-page { padding-block: var(--sp-12); }
.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.catalog-title { font-size: clamp(2rem, 5vw, 3.5rem); }
.results-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.filter-search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.filter-search {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: 0.875rem;
  transition: border-color var(--t-fast);
  outline: none;
}
.filter-search:focus { border-color: var(--red); }
.filter-search::placeholder { color: var(--text-dim); }
.filter-select {
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.filter-select:focus { border-color: var(--red); }
.filter-select option { background: var(--surface2); }

/* Category pills */
.cat-pills {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.cat-pill {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--t-fast);
  cursor: pointer;
}
.cat-pill:hover { border-color: var(--border-hover); color: var(--white); }
.cat-pill.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-12);
}
.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--t-fast);
}
.page-btn:hover { border-color: var(--border-hover); color: var(--white); }
.page-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  font-weight: 600;
}
.page-btn.disabled { opacity: 0.3; pointer-events: none; }

/* No results */
.no-results {
  text-align: center;
  padding: var(--sp-20);
  color: var(--text-muted);
}
.no-results h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

/* ---- Product Detail Page ---- */
.product-page { padding-block: var(--sp-12); }
.product-breadcrumb {
  margin-bottom: var(--sp-8);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.product-breadcrumb a { color: var(--text-muted); transition: color var(--t-fast); }
.product-breadcrumb a:hover { color: var(--white); }
.product-breadcrumb span { color: var(--text-dim); }
.product-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--sp-10);
  align-items: start;
}
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; }
}
.product-img-main {
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-img-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-8);
}
.product-info { display: flex; flex-direction: column; gap: var(--sp-5); }
.product-brand {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.product-name {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}
.product-price {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--red);
}
.product-price-orig {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-dim);
  text-decoration: line-through;
}
.product-stock { display: flex; align-items: center; gap: var(--sp-2); }
.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.stock-in .stock-dot    { background: var(--stock-in);  box-shadow: 0 0 6px var(--stock-in); }
.stock-low .stock-dot   { background: var(--stock-low); box-shadow: 0 0 6px var(--stock-low); }
.stock-out .stock-dot   { background: var(--stock-out); }
.stock-unknown .stock-dot { background: var(--text-dim); }
.stock-label { font-size: 0.85rem; font-weight: 500; }
.product-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-5);
}
.product-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.product-ean {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* Specs table */
.specs-section { margin-top: var(--sp-10); }
.specs-title {
  font-size: 1.8rem;
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-4);
}
.specs-dl { display: grid; grid-template-columns: 1fr 2fr; gap: 0; }
.specs-dl dt,
.specs-dl dd {
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--surface3);
}
.specs-dl dt {
  color: var(--text-muted);
  font-weight: 500;
}
.specs-dl dd { color: var(--text); }
.specs-dl dt:nth-child(4n+1),
.specs-dl dd:nth-child(4n+2) { background: var(--surface); }

/* Related */
.related-section { margin-top: var(--sp-16); padding-top: var(--sp-12); border-top: 1px solid var(--border); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

/* ---- Contact Section ---- */
.contact-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: var(--sp-16);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-map { height: 300px; }
}
.contact-title { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: var(--sp-6); }
.contact-address { display: flex; flex-direction: column; gap: var(--sp-3); color: var(--text-muted); line-height: 1.6; }
.contact-link { color: var(--text-muted); transition: color var(--t-fast); }
.contact-link:hover { color: var(--white); }
.contact-hours {
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-8);
}
.contact-hours h3 {
  font-size: 1rem;
  margin-bottom: var(--sp-3);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.contact-hours li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: var(--sp-1) 0;
}
.hours-closed { color: var(--text-dim); }
.contact-map {
  height: 380px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}
.contact-map iframe { width: 100%; height: 100%; }

/* ---- Footer ---- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: var(--sp-10);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: var(--sp-8);
}
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-logo { font-size: 1.2rem; }
.footer-tagline { font-size: 0.8rem; color: var(--text-dim); margin-top: var(--sp-2); }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-align: right;
}
.footer-links a { font-size: 0.8rem; color: var(--text-dim); transition: color var(--t-fast); }
.footer-links a:hover { color: var(--text-muted); }
.footer-copy {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--surface3);
  margin-top: var(--sp-4);
}

/* ---- 404 Page ---- */
.page-404 {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-16);
}
.page-404-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 14rem);
  line-height: 1;
  color: var(--red);
  opacity: 0.25;
  position: absolute;
  user-select: none;
  pointer-events: none;
}
.page-404-content { position: relative; z-index: 1; }
.page-404-heading {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: var(--sp-3);
}
.page-404-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-8);
}

/* ---- Admin ---- */
.admin-body { background: #0A0A0A; }
.admin-wrap {
  min-height: 100vh;
  display: flex;
}
.admin-sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  flex-shrink: 0;
}
.admin-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.admin-nav a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  margin-bottom: var(--sp-1);
}
.admin-nav a:hover, .admin-nav a.active { color: var(--white); background: var(--surface2); }
.admin-content {
  flex: 1;
  padding: var(--sp-8);
  overflow: auto;
}
.admin-title {
  font-size: 2rem;
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-4);
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--red);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.stat-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--surface3);
  color: var(--text-muted);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--surface2); }
.admin-table img { width: 48px; height: 48px; object-fit: contain; border-radius: var(--r-sm); background: var(--surface2); }
.admin-form {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.form-input,
.form-textarea,
.form-select {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--t-fast);
  width: 100%;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus { border-color: var(--red); }
.form-textarea { min-height: 120px; resize: vertical; }
.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
}
.toggle-on  { background: rgba(34,197,94,0.15); color: var(--stock-in); }
.toggle-off { background: var(--surface3); color: var(--text-dim); }
.alert {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  margin-bottom: var(--sp-6);
  border-left: 3px solid;
}
.alert-success { background: rgba(34,197,94,0.1);  border-color: var(--stock-in);  color: var(--stock-in); }
.alert-error   { background: rgba(239,68,68,0.1);  border-color: var(--stock-out); color: var(--stock-out); }
.alert-info    { background: rgba(59,130,246,0.1); border-color: #3b82f6;          color: #60a5fa; }
.sync-log pre {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #0f0;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ---- Login Page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-box {
  width: 100%;
  max-width: 360px;
  padding: var(--sp-10);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.login-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: var(--sp-8);
}

/* ---- Utilities ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-red  { color: var(--red); }
.text-muted { color: var(--text-muted); }
.mt-auto  { margin-top: auto; }
.text-center { text-align: center; }
