:root {
  --navy: #0b1b3a;
  --navy-deep: #071228;
  --navy-text: #0b3a6e;
  --accent: #e8a317;
  --muted: #f5f7fb;
  --text: #222;
  --gray: #5f6b7a;
  --line: #e6ebf2;
  --max: 1180px;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(11, 27, 58, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #fff; color: var(--text); font-family: "Outfit", "Segoe UI", sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

.container { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

/* —— Header —— */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(7, 18, 40, .35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding: 12px 0;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  height: 78px;
  width: auto;
  border-radius: 6px;
  background: transparent;
}
.main-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.main-nav a:hover,
.main-nav a.is-active {
  background: var(--accent);
  color: #111;
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 36px;
  border: 0;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: #fff; }

.rainbow { display: flex; height: 5px; }
.rainbow span { flex: 1; }
.rainbow span:nth-child(1) { background: #7b1fa2; }
.rainbow span:nth-child(2) { background: #1e88e5; }
.rainbow span:nth-child(3) { background: #43a047; }
.rainbow span:nth-child(4) { background: #fdd835; }
.rainbow span:nth-child(5) { background: #fb8c00; }
.rainbow span:nth-child(6) { background: #e53935; }

.flash { margin: 16px auto; padding: 10px 14px; border-radius: 4px; font-size: 14px; }
.flash-error { background: #fdecea; color: #b71c1c; }
.flash-ok { background: #e8f5e9; color: #1b5e20; }

/* —— Home —— */
.slogan {
  text-align: center;
  color: var(--navy-text);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: .2px;
  padding: 36px 16px 18px;
  animation: rise .55s ease both;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.brand-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: rise .6s ease both;
}
.brand-card:nth-child(2) { animation-delay: .05s; }
.brand-card:nth-child(3) { animation-delay: .1s; }
.brand-card:nth-child(4) { animation-delay: .15s; }
.brand-card:nth-child(5) { animation-delay: .2s; }
.brand-card:nth-child(6) { animation-delay: .25s; }
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(11, 27, 58, .14);
}

.brand-card-media {
  aspect-ratio: 5 / 4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.brand-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px;
  transition: transform .35s ease;
}
.brand-card:hover .brand-card-media img {
  transform: scale(1.03);
}

.brand-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.brand-card-body h2 {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--navy-text);
  line-height: 1.3;
  font-weight: 800;
}
.brand-card-body p {
  color: #4a5564;
  font-size: 14px;
  line-height: 1.65;
  text-align: justify;
}

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

.catalog-cta {
  background: linear-gradient(180deg, var(--muted) 0%, #eef2f8 100%);
  text-align: center;
  padding: 56px 16px 72px;
}
.catalog-cta h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--navy);
}
.catalog-cta p {
  color: var(--gray);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.btn-navy,
.btn-black {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  border: 0;
  min-width: 150px;
  height: 46px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: background .2s ease, transform .2s ease;
}
.btn-navy:hover,
.btn-black:hover {
  background: #13284f;
  transform: translateY(-1px);
}
.btn-black.sm { min-width: 0; height: 38px; width: 100%; font-size: 14px; }

/* —— Catalog / About —— */
.catalog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 12px 0 64px;
}
.catalog-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.catalog-item img { width: 100%; height: 220px; object-fit: contain; background: #fff; }
.catalog-item .pad { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.catalog-item h3 { color: var(--navy-text); font-size: 18px; }
.catalog-item p { color: #555; font-size: 14px; line-height: 1.6; flex: 1; }

.page-head { padding: 28px 0 8px; }
.page-head .crumb { text-align: left; color: var(--gray); margin-bottom: 8px; font-size: 13px; }
.page-head h1 { text-align: left; font-size: 28px; font-weight: 800; color: var(--navy); }
.catalog { padding: 12px 0 72px; }
.muted { color: var(--gray); font-size: 14px; }

.about-page {
  text-align: center;
  padding: 48px 16px 80px;
  max-width: 860px;
  margin: 0 auto;
}
.about-page h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--navy);
}
.about-rule {
  width: min(280px, 50%);
  height: 1px;
  border: 0;
  background: var(--navy);
  margin: 0 auto 28px;
}
.about-page p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.9;
  margin: 0 auto 22px;
  max-width: 740px;
  color: #222;
}
.about-photo-wrap {
  display: block;
  width: min(720px, 100%);
  margin: 36px auto 0;
  border: 2px solid var(--navy);
  overflow: hidden;
  background: #111;
  aspect-ratio: 3 / 2;
  border-radius: 4px;
}
.about-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* —— Footer —— */
.site-footer {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding-bottom: 36px;
}
.footer-col {
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,.12);
}
.footer-col:last-child { border-right: 0; }
.footer-col.is-center { text-align: center; }
.site-footer h3 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 18px;
  letter-spacing: .6px;
  font-weight: 800;
}
.site-footer a, .site-footer p {
  display: block;
  font-size: 14px;
  line-height: 1.75;
  color: #e8eef7;
}
.footer-mail { color: #7ec8ff !important; margin-bottom: 8px; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #111 !important;
  display: grid;
  place-items: center;
  transition: transform .2s ease, background .2s ease;
}
.socials a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}
.footer-copy {
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
  padding: 18px 16px 22px;
  font-size: 13px;
  color: #c5cddb;
}
.footer-copy p { color: #c5cddb; margin: 4px 0; }
.footer-copy .designer {
  display: inline;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  z-index: 49;
  transition: background .2s ease, transform .2s ease;
}
.to-top:hover {
  background: var(--accent);
  color: #111;
  transform: translateY(-2px);
}

body.has-bg-logo .site-header,
body.has-bg-logo .rainbow,
body.has-bg-logo main,
body.has-bg-logo .site-footer,
body.has-bg-logo .flash {
  position: relative;
  z-index: 1;
}

/* —— Admin leftovers / forms —— */
.auth-wrap { min-height: 50vh; display: grid; place-items: center; padding: 40px 16px 80px; }
.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 8px; }
.auth-card p { color: var(--gray); margin-bottom: 18px; }
.auth-card label { display: block; font-size: 13px; margin-bottom: 12px; font-weight: 600; }
.auth-card input {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 1px solid #ddd;
  padding: 0 12px;
  border-radius: 6px;
}
.auth-card .btn-black { width: 100%; margin-top: 8px; }

@media (max-width: 960px) {
  .brand-grid,
  .catalog-list { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding: 18px 8px; }
  .main-nav a {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }
  .logo img { height: 64px; }
}

@media (max-width: 640px) {
  .brand-grid,
  .catalog-list { grid-template-columns: 1fr; }
  .header-inner { min-height: 72px; }
  .logo img { height: 56px; }
  .slogan { padding: 28px 14px 12px; }
  .brand-card-body p { text-align: left; }
}
