/* =====================================================
   MAIN.CSS — upgraded modern design
   Drop-in replacement for your current /main.css
===================================================== */

:root {
  --brand: #0c4aa1;
  --brand-dark: #073474;
  --accent: #c61c1f;
  --accent-dark: #9e1518;
  --success: #10b981;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f6fb;
  --card: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.13);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(12, 74, 161, 0.10), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================
   HEADER
===================================================== */
.main-header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

.logo-block {
  display: flex;
  justify-content: center;
  padding: 22px 0 12px;
}

.logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(12, 74, 161, 0.12);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.logo img {
  height: 102px;
  border-radius: 16px;
  object-fit: cover;
}

.header-title {
  text-align: center;
  padding-bottom: 12px;
}

.header-title h1 {
  max-width: 980px;
  margin: 0 auto;
  color: var(--brand);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.header-middle {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 480px) minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 14px 0 24px;
}

.contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.contacts a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--brand);
  font-size: 18px;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.contacts a:hover {
  color: var(--accent);
}

.search {
  width: 100%;
}

.search form {
  display: flex;
  min-height: 52px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(12, 74, 161, 0.20);
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(12, 74, 161, 0.10);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
  color: var(--ink);
  font-size: 15px;
  border: 0;
  outline: none;
  background: transparent;
}

.search input::placeholder {
  color: #8a94a6;
}

.search button {
  padding: 0 26px;
  background: linear-gradient(135deg, var(--brand), #1e63c7);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.search button:hover {
  filter: brightness(0.95);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
}

.callBack,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--accent), #e23b3e);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(198, 28, 31, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.callBack:hover,
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(0.96);
  box-shadow: 0 16px 32px rgba(198, 28, 31, 0.34);
}

.messengers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.messengers a {
  display: inline-flex;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.messengers img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.messengers a:hover img {
  transform: scale(1.08);
}

/* =====================================================
   NAV
===================================================== */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 30px rgba(12, 74, 161, 0.22);
}

.main-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav a {
  display: inline-flex;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.main-nav a::after {
  display: none;
}

/* =====================================================
   MAIN / BREADCRUMBS
===================================================== */
#main {
  padding-top: 26px;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 999px;
}

section {
  margin-top: 56px;
}

h2 {
  margin: 0 0 22px;
  color: var(--brand);
  font-size: clamp(21px, 2.4vw, 32px);
  line-height: 1.2;
  font-weight: 900;
  text-transform: none;
  letter-spacing: -0.03em;
}

/* =====================================================
   HERO
===================================================== */
.hero {
  position: relative;
  min-height: 430px;
  margin-top: 28px;
  overflow: hidden;
  background: #0b1220;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 430px;
}

.hero-slide.active {
  display: block;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0.38) 42%, rgba(2, 6, 23, 0.05) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.35), transparent 45%);
  pointer-events: none;
}

.hero-slide img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: clamp(22px, 5vw, 58px);
  bottom: clamp(22px, 5vw, 54px);
  max-width: 520px;
  padding: 0;
  color: #fff;
  background: transparent;
  border-radius: 0;
}

.hero-content h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 950;
  letter-spacing: -0.045em;
}

.hero-content p {
  max-width: 460px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
}

.hero-btn {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.04);
}

.hero-btn.prev { left: 18px; }
.hero-btn.next { right: 18px; }

/* =====================================================
   PRODUCTS / CATEGORIES / BRANDS
===================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card,
.brand {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
  overflow: hidden;
}

.card:hover,
.brand:hover {
  transform: translateY(-6px);
  border-color: rgba(12, 74, 161, 0.32);
  box-shadow: var(--shadow-md);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  padding: 12px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #f8fafc, #eef3f9);
  border-radius: 16px;
}

.card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 850;
}

.card p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
}

.card .price {
  margin: 4px 0 12px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.card .btn {
  width: fit-content;
  margin-top: auto;
}

.card span {
  display: block;
  margin-top: 12px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.categories .card {
  color: inherit;
  text-decoration: none;
}

.brand {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.brand img {
  max-height: 90px;
  object-fit: contain;
  filter: saturate(0.95);
}

/* =====================================================
   SEO TEXT
===================================================== */
.seo-text {
  margin-top: 34px;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.seo-text p {
  margin: 0 0 16px;
  color: #374151;
}

.seo-text p:last-child {
  margin-bottom: 0;
}

.seo-text a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(12, 74, 161, 0.25);
}

.seo-text a:hover {
  color: var(--accent);
  border-bottom-color: rgba(198, 28, 31, 0.35);
}

/* =====================================================
   FOOTER
===================================================== */
#footer {
  margin-top: 72px;
  padding: 36px 0;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-size: 14px;
}

#footer p {
  margin: 0;
}

/* =====================================================
   MODALS
===================================================== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.68);
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.modal-content {
  width: 440px;
  max-width: 100%;
  padding: 24px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  color: var(--brand);
  font-size: 22px;
}

.close {
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 24px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
}

.modal form {
  display: grid;
  gap: 12px;
}

.modal input,
.modal textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
  outline: none;
}

.modal input:focus,
.modal textarea:focus {
  border-color: rgba(12, 74, 161, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 74, 161, 0.10);
}

.modal textarea {
  min-height: 100px;
  resize: vertical;
}

.modal label {
  color: #4b5563;
  font-size: 13px;
}

/* =====================================================
   FLOATING CONTACT BUTTON
   Use this if you move inline contact CSS into main.css
===================================================== */
#contactWrapper {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: "Inter", Arial, sans-serif;
}

#contactButton {
  padding: 15px 22px;
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#contactButton:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(16, 185, 129, 0.42);
}

#contactMenu {
  display: none;
  width: 260px;
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

#contactMenu a {
  display: block;
  padding: 11px 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border-radius: 12px;
}

#contactMenu a:hover {
  background: #f3f6fb;
  color: var(--brand);
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 960px) {
  .header-middle {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contacts,
  .header-actions {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .contacts a {
    width: auto;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .logo-block {
    padding: 16px 0 8px;
  }

  .logo img {
    height: 72px;
  }

  .header-title h1 {
    font-size: 16px;
  }

  .header-actions {
    flex-direction: column;
  }

  .search form {
    min-height: 50px;
    border-radius: 18px;
  }

  .search button {
    padding: 0 18px;
  }

  .main-nav {
    position: static;
  }

  .main-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 10px 0 12px;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav a {
    white-space: nowrap;
  }

  section {
    margin-top: 42px;
  }

  .hero,
  .hero-slide {
    min-height: 360px;
    border-radius: 22px;
  }

.hero-slide img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: linear-gradient(180deg, #111, #333);
}

  .hero-slide::after {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0.22) 70%, rgba(2, 6, 23, 0.10) 100%);
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 22px;
  }

  .hero-content h2 {
    font-size: 27px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-btn {
    width: 38px;
    height: 38px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card img {
    height: 170px;
  }

  #contactWrapper {
    right: 14px;
    bottom: 14px;
  }

  #contactMenu {
    width: min(260px, calc(100vw - 28px));
  }
}

@media (max-width: 420px) {
  .search form {
    flex-direction: column;
    border-radius: 20px;
  }

  .search input {
    min-height: 48px;
  }

  .search button {
    min-height: 46px;
  }

  .hero,
  .hero-slide {
    min-height: 330px;
  }

  .hero-slide img {
    height: 330px;
  }
}
