/* ================================================
   NaMašinky.tech – Stylesheet
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ─── Variables ─────────────────────────────────── */
:root {
  --bg:          #0e0e0f;
  --bg-card:     #141416;
  --bg-elevated: #1c1c1e;
  --accent-gold: #e8b84b;
  --accent-red:  #c9402a;
  --text:        #e8e6e1;
  --text-muted:  #7a7870;
  --border:      #252527;
  --border-hover:#3a3a3d;

  --font-heading: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --radius:       6px;
  --max-width:    1280px;
}

/* ─── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Track line divider ─────────────────────────── */
.track-line {
  height: 14px;
  position: relative;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 21px,
    var(--border) 21px,
    var(--border) 26px
  );
}
.track-line::before,
.track-line::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #2a2826;
}
.track-line::before { top: 2px; }
.track-line::after  { bottom: 2px; }

/* ─── Navigation ─────────────────────────────────── */
.site-header {
  background: rgba(14, 14, 15, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  color: var(--text);
  flex-shrink: 0;
}
.nav__logo span { color: var(--accent-gold); }

.nav__links {
  display: flex;
  gap: 0.15rem;
  list-style: none;
}
.nav__links a {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: color 0.18s, background 0.18s;
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--accent-gold);
  background: rgba(232, 184, 75, 0.09);
}

/* ─── Footer ─────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--accent-gold); }
.site-footer a:hover { text-decoration: underline; }

/* ================================================
   INDEX PAGE
   ================================================ */

/* Hero */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
  background-image: radial-gradient(rgba(232, 184, 75, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.35em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 9vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.hero__title span { color: var(--accent-gold); }
.hero__logo {
  display: block;
  margin: 0 auto 1.5rem;
  width: clamp(8rem, 18vw, 16rem);
  height: auto;
  border-radius: 12px;
  border: 2px solid var(--accent-gold);
  padding: 4px;
}
.hero__desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Category tiles */
.categories {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}
.categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.category-tile {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.22s, transform 0.22s, background 0.22s;
}
.category-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), #f0c55a);
  opacity: 0;
  transition: opacity 0.22s;
}
.category-tile:hover {
  border-color: rgba(232, 184, 75, 0.4);
  background: var(--bg-elevated);
  transform: translateY(-4px);
}
.category-tile:hover::before { opacity: 1; }

.category-tile__scale {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.category-tile__scale--label {
  font-size: 4.5rem;
  letter-spacing: 0.04em;
}
.category-tile__ratio {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 1.25rem;
}
.category-tile__desc {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.75rem;
}
.category-tile__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.category-tile__cta::after {
  content: '→';
  transition: transform 0.18s;
}
.category-tile:hover .category-tile__cta::after {
  transform: translateX(5px);
}

/* ================================================
   CATEGORY PAGES
   ================================================ */

/* Page header */
.page-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}
.page-header__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.page-header__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
}
.page-header__title span { color: var(--accent-gold); }

/* Filter bar */
.filters {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.38rem 0.9rem;
  border-radius: 2rem;
  font-family: var(--font-body);
  font-size: 0.83rem;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.filter-btn.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #0e0e0f;
  font-weight: 600;
}

/* Products section */
.products-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* Product card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.22s, transform 0.22s;
}
.product-card:hover {
  border-color: rgba(232, 184, 75, 0.3);
  transform: translateY(-3px);
}

/* Card image */
.product-card__image {
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  overflow: hidden;
  position: relative;
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .product-card__image img {
  transform: scale(1.05);
}
/* Placeholder when image fails to load */
.product-card__image.no-image img { display: none; }
.product-card__image.no-image::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none' stroke='%237a7870' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E")
    center / 40px no-repeat;
}

/* Card body */
.product-card__body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card__tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.product-card__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 0.45rem;
  color: var(--text);
}
.product-card__desc {
  font-size: 0.865rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1.1rem;
}
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}
.product-card__price {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.price-note {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.btn-inquire {
  display: inline-flex;
  align-items: center;
  background: var(--accent-gold);
  color: #0e0e0f;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.48rem 1rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.18s, transform 0.15s;
}
.btn-inquire:hover {
  background: #f0c55a;
  transform: translateY(-1px);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.empty-state p { font-size: 0.95rem; margin-top: 0.4rem; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 960px) {
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav { padding: 0 1rem; }
  .nav__logo { font-size: 1.5rem; }
  .nav__links a { font-size: 0.95rem; padding: 0.3rem 0.6rem; }
  .hero { padding: 3.5rem 1rem 2.5rem; }
  .categories { padding: 1.5rem 1rem 3.5rem; }
  .categories__grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .page-header { padding: 2rem 1rem 1.5rem; }
  .filters { padding: 0 1rem 1.5rem; }
  .products-section { padding: 0 1rem 3.5rem; }
}
