* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; color: #152033; background: #f4f7fb; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
header { background: #fff; border-bottom: 1px solid #e6edf5; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 18px rgba(15, 35, 70, .06); }
.topbar { background: #061b35; color: #fff; font-size: .85rem; padding: 7px 5vw; letter-spacing: .01em; }
.nav-container { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #092849; font-size: 1.25rem; margin-right: auto; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: linear-gradient(135deg,#0b3d75,#0d63c7); color: #fff; border-radius: 12px; font-size: .95rem; letter-spacing: .05em; }
nav { display: flex; gap: 22px; font-weight: 650; font-size: .96rem; }
nav a { color: #29415f; padding: 8px 0; border-bottom: 2px solid transparent; }
nav a.active, nav a:hover { color: #0d63c7; border-color: #0d63c7; }
.lang-switch { display: flex; border: 1px solid #cdd9e8; border-radius: 999px; overflow: hidden; }
.lang-switch button { border: 0; background: #fff; color: #29415f; padding: 7px 11px; cursor: pointer; font-weight: 700; }
.lang-switch button.active { background: #0d63c7; color: #fff; }
.menu-toggle { display: none; border: 1px solid #cdd9e8; background: #fff; border-radius: 8px; padding: 8px 10px; }
main { max-width: 1180px; margin: 0 auto; padding: 42px 20px 70px; }
.hero { background: linear-gradient(90deg, rgba(6,27,53,.96) 0%, rgba(6,27,53,.82) 45%, rgba(6,27,53,.2) 100%), url('images/hero.png') center/cover no-repeat; color: #fff; }
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 88px 20px; }
.kicker { display: inline-block; background: #e7f0ff; color: #0d63c7; font-weight: 800; padding: 6px 11px; border-radius: 999px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { margin: 18px 0 14px; max-width: 720px; font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: 1.04; }
.hero p { max-width: 620px; font-size: 1.12rem; color: #e8f0fa; }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 10px 18px; border-radius: 10px; font-weight: 800; cursor: pointer; border: 1px solid transparent; }
.button { background: #0d63c7; color: #fff; }
.button:hover { background: #084c9d; }
.secondary-button { background: #fff; color: #0b2c52; border-color: #cdd9e8; }
.secondary-button:hover { border-color: #0d63c7; color: #0d63c7; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
h2, h3.section-title { color: #0b2c52; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.18; margin: 0 0 14px; }
.muted { color: #5f6f83; }
.card-grid, .products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.category-card, .product-card, .panel, .product-page, .contact-form, .invoice-box { background: #fff; border: 1px solid #e2e9f2; border-radius: 18px; box-shadow: 0 10px 28px rgba(15,35,70,.06); }
.category-card { padding: 20px; }
.category-card h3 { margin: 0 0 12px; color: #0b2c52; }
.category-card ul { padding-left: 18px; margin: 0; color: #41546d; }
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-card img { width: 100%; height: 190px; object-fit: cover; background: #edf2f7; display: block; }
.product-content { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-content h3, .product-content h4 { margin: 0 0 8px; color: #0b2c52; font-size: 1.1rem; }
.product-content p { margin: 0 0 14px; color: #41546d; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.badge { font-size: .78rem; border-radius: 999px; background: #e7f0ff; color: #0d63c7; padding: 5px 9px; font-weight: 800; }
.price { color: #0b2c52; font-weight: 850; margin-bottom: 14px; }
.product-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.product-card .actions a { flex: 1; min-width: 96px; }
.product-page { padding: 22px; }
.product-layout { display: grid; grid-template-columns: minmax(260px, 430px) 1fr; gap: 28px; align-items: start; }
.main-image { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #edf2f7; border-radius: 14px; border: 1px solid #e2e9f2; }
.thumbnail-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.thumbnail-row img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #edf2f7; border-radius: 10px; border: 1px solid #e2e9f2; cursor: pointer; }
.specs-table, .invoice-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
.specs-table th, .specs-table td, .invoice-table th, .invoice-table td { border: 1px solid #e2e9f2; padding: 11px 12px; text-align: left; }
.specs-table th, .invoice-table th { background: #0b2c52; color: #fff; }
.category-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.category-filter a { padding: 8px 12px; background: #fff; border: 1px solid #dbe5f0; border-radius: 999px; color: #29415f; font-weight: 700; }
.category-filter a.active, .category-filter a:hover { background: #0d63c7; color: #fff; border-color: #0d63c7; }
.subcategory-block { margin: 24px 0 34px; }
.subcategory-block h3 { color: #0b2c52; }
.contact-form { padding: 22px; max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-group { margin-bottom: 14px; display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 800; color: #0b2c52; margin-bottom: 6px; }
input, select, textarea { font: inherit; border: 1px solid #cdd9e8; border-radius: 10px; padding: 10px 12px; background: #fff; }
textarea { min-height: 120px; resize: vertical; }
.price-summary { background: #edf4ff; border: 1px solid #d8e8ff; border-radius: 12px; padding: 12px; color: #0b2c52; margin: 8px 0 16px; }
.hidden { display: none !important; }
.notice { background: #fff9e6; border: 1px solid #ffe5a3; border-radius: 16px; padding: 18px; color: #503b00; margin: 24px 0; }
footer { background: #061b35; color: #dce7f5; }
.footer-grid { max-width: 1180px; margin: 0 auto; padding: 34px 20px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
footer h4 { color: #fff; margin: 0 0 10px; }
footer p { margin: 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 12px 20px; text-align: center; font-size: .9rem; }
@media (max-width: 850px) {
  .menu-toggle { display: block; }
  nav { display: none; position: absolute; top: 98px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; border-bottom: 1px solid #e2e9f2; }
  body.menu-open nav { display: flex; }
  .product-layout, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 64px 20px; }
  .nav-container { gap: 12px; }
  .brand { font-size: 1.05rem; }
}
.available-as { margin: 14px 0 4px; color: #5f6f83; font-weight: 700; }
.product-page .price { margin-top: 18px; font-size: 1.08rem; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; display: block; }
.terms-panel { padding: 28px; max-width: 900px; margin: 0 auto; }
.terms-panel h1 { color: #0b2c52; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 12px; }
.terms-panel h2 { color: #0b2c52; font-size: 1.15rem; margin: 24px 0 8px; }
.terms-panel p { margin: 0 0 12px; }
.small-note { font-size: .92rem; }
@media (max-width: 850px) { .brand-logo { width: 38px; height: 38px; } }

/* Product gallery zoom */
.main-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}
.main-image-button .main-image {
  display: block;
}
.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(6, 27, 53, .88);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.thumbnail-row img.active {
  outline: 3px solid #0d63c7;
  outline-offset: 2px;
}
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(6, 27, 53, .92);
}
.gallery-lightbox.open {
  display: flex;
}
.gallery-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  background: #fff;
}
.gallery-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
body.lightbox-open {
  overflow: hidden;
}
@media (max-width: 850px) {
  .zoom-hint { font-size: .72rem; }
  .gallery-lightbox { padding: 14px; }
}

/* Product card image links */
.product-image-link { display: block; line-height: 0; cursor: pointer; }
.product-image-link:hover img { transform: scale(1.03); }
.product-image-link img { transition: transform .2s ease; }

/* Contact form overflow fixes */
.contact-form,
.contact-form * {
  box-sizing: border-box;
}
.form-grid {
  align-items: start;
}
.form-group {
  min-width: 0;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.product-only select,
.product-only input {
  overflow: hidden;
  text-overflow: ellipsis;
}
.price-summary {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.invoice-box {
  overflow-x: auto;
}
.invoice-table {
  min-width: 640px;
}
@media (max-width: 640px) {
  .contact-form { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Condition badge colors */
.badge-new-box {
  background: #e8f7ef;
  color: #167a45;
  border: 1px solid #b8e3ca;
}
.badge-used-tested {
  background: #e7f0ff;
  color: #0d63c7;
  border: 1px solid #bfd6f7;
}
.badge-mixed {
  background: #fff4db;
  color: #9a5b00;
  border: 1px solid #f2d08a;
}
