/* ===================== CSS VARIABLES ===================== */
:root {
  --bg:         #0d0f18;
  --surface:    #111827;
  --surface2:   #1a1d27;
  --surface3:   #252838;
  --border:     #2e3140;
  --blue:       #0a66c2;
  --blue-light: #5ba3e8;
  --red:        #c0392b;
  --white:      #ffffff;
  --text:       #e8eaf0;
  --muted:      #9ba3af;
  --green:      #22c55e;
  --font:       'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius:     12px;
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

/* ===================== SECTION CARD ===================== */
.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin: 14px 16px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

/* ===================== HEADER ===================== */
.cat-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #111827;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.cat-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: var(--white);
  font-size: 15px;
  flex-shrink: 0;
  transition: background 0.15s;
  text-decoration: none;
}
.cat-back-btn:hover  { background: rgba(255,255,255,.3); }
.cat-back-btn:active { opacity: 0.6; }

.cat-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.cat-header-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.cat-header-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cat-header-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-header-sub {
  font-size: 10px;
  color: rgba(255,255,255,.65);
  letter-spacing: .3px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Download button (header) ── */
.download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue) 0%, #1a7fd4 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: .3px;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(10,102,194,.45);
}
.download-btn:hover  { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(10,102,194,.6); }
.download-btn:active { transform: scale(.97); opacity: .8; }
.download-btn span   { display: none; }

@media (min-width: 400px) { .download-btn span { display: inline; } }

/* ===================== PRODUCT TITLE CARD ===================== */
.product-title-card {
  margin-top: 14px;
}

.product-badge {
  display: inline-block;
  background: rgba(10,102,194,.18);
  color: var(--blue-light);
  border: 1px solid rgba(91,163,232,.3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.product-title {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -.3px;
}
.product-title span {
  color: var(--blue-light);
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 20px;
  letter-spacing: .3px;
}
.feat-chip i { color: var(--red); font-size: 10px; }

/* ===================== CATALOG IMAGE ===================== */
.O2-catalog-img-wrap {
  margin: 0 16px 4px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}

.O2-catalog-img {
  width: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

/* ===================== CTA CARD ===================== */
.cat-cta-card {
  margin-top: 14px;
  text-align: center;
}

.cat-cta-text {
  font-size: clamp(13px, 3.5vw, 15px);
  color: var(--muted);
  margin-bottom: 14px;
}

.cat-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* shared button base */
.btn-call, .btn-whatsapp, .btn-download-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  letter-spacing: .3px;
}
.btn-call:hover, .btn-whatsapp:hover, .btn-download-cta:hover { opacity: .88; transform: translateY(-1px); }
.btn-call:active, .btn-whatsapp:active, .btn-download-cta:active { transform: scale(.97); }

.btn-call         { background: #1d4ed8; color: #fff; }
.btn-whatsapp     { background: #16a34a; color: #fff; }
.btn-download-cta { background: linear-gradient(135deg, var(--blue) 0%, #1a7fd4 100%); color: #fff;
                    box-shadow: 0 2px 10px rgba(10,102,194,.4); }

/* ===================== FOOTER ===================== */
.foot {
  background: var(--surface);
  margin: 14px 16px 24px;
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  text-align: center;
}

.foot-company {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.foot-address {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.foot-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
}

.foot-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-light);
  text-decoration: none;
  font-size: 13px;
  transition: color .15s;
}
.foot-contacts a:hover { color: #fff; }
.foot-contacts i       { font-size: 11px; color: var(--muted); }

.foot-copy {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

/* ===================== MODAL OVERLAY ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal Box ── */
.modal-box {
  background: #161923;
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  padding: 24px 20px 32px;
  position: relative;
  box-shadow: 0 -8px 40px rgba(0,0,0,.6);
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}

@media (min-width: 540px) {
  .modal-overlay { align-items: center; }
  .modal-box { border-radius: 20px; max-height: 88dvh; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface3);
  color: var(--muted);
  font-size: 15px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: #3a3e52; color: var(--white); }

/* ── Modal header ── */
.modal-header { text-align: center; margin-bottom: 22px; }

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), #1a7fd4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(10,102,194,.4);
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 5px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Form ── */
.modal-form { display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .4px;
  text-transform: uppercase;
}

.req { color: #f87171; margin-left: 2px; }
.opt { color: #6b7280; font-weight: 400; text-transform: none; font-size: 11px; }

.form-group input,
.form-group textarea {
  background: #1e2233;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #4a5068; }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(91,163,232,.15);
}

/* error state */
.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248,113,113,.1);
}

.err-msg {
  font-size: 11px;
  color: #f87171;
  min-height: 14px;
  line-height: 1.3;
}

/* ── Form status ── */
.form-status {
  font-size: 13px;
  padding: 0;
  min-height: 0;
  border-radius: 8px;
  text-align: center;
  transition: all .2s;
}
.form-status.success {
  padding: 10px 14px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--green);
}
.form-status.error {
  padding: 10px 14px;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: #f87171;
}

/* ── Submit button ── */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue) 0%, #1a7fd4 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  letter-spacing: .3px;
  transition: opacity .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(10,102,194,.45);
  margin-top: 4px;
}
.submit-btn:hover  { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(10,102,194,.6); }
.submit-btn:active { transform: scale(.98); }
.submit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ===================== RESPONSIVE ===================== */
@media (min-width: 600px) {
  .section-card, .O2-catalog-img-wrap, .foot {
    margin-left: 32px;
    margin-right: 32px;
  }
  .cat-header { padding: 14px 32px; }
}

@media (min-width: 1024px) {
  .cat-header { padding: 14px 0; }
  .section-card,
  .O2-catalog-img-wrap,
  .foot {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
  .cat-cta-card { max-width: 900px; margin-left: auto; margin-right: auto; }
  .foot-contacts { flex-direction: row; gap: 24px; }
}
