/* ==========================================================================
   TechPawn — professional design system
   Brand: crimson #C1272D · charcoal #33363B · accent orange #F57D07
   ========================================================================== */

:root {
  --red: #C1272D;
  --red-dark: #9A1F24;
  --red-soft: #FBEDED;
  --orange: #F57D07;
  --charcoal: #33363B;
  --ink: #1E2228;
  --slate: #5B6470;
  --muted: #8A929E;
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --border: #E4E7EC;
  --shadow-sm: 0 1px 2px rgba(30, 34, 40, .06), 0 1px 6px rgba(30, 34, 40, .05);
  --shadow-md: 0 4px 12px rgba(30, 34, 40, .08), 0 2px 4px rgba(30, 34, 40, .05);
  --shadow-lg: 0 12px 32px rgba(30, 34, 40, .12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.6rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: all .18s ease;
  text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red-soft); color: var(--red-dark); }
.btn-light { background: #fff; color: var(--charcoal); }
.btn-light:hover { background: var(--bg); color: var(--ink); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- Top utility bar ---------- */
.topbar { background: var(--charcoal); color: #D8DBDF; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .4rem; padding-bottom: .4rem; flex-wrap: wrap; }
.topbar-address { display: inline-flex; align-items: center; gap: .45rem; }
.topbar-address svg { width: 14px; height: 14px; fill: var(--orange); }
.topbar .topbar-links { display: flex; gap: .5rem; align-items: center; }
.topbar-chip {
  display: inline-flex; align-items: center; gap: .45rem; color: #fff; font-weight: 600;
  padding: .22rem .7rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.16);
  transition: background .15s, border-color .15s;
}
.topbar-chip:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.32); color: #fff; }
.topbar-chip svg { width: 13px; height: 13px; fill: var(--orange); }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(30,34,40,.03); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.main-nav { display: flex; gap: .1rem; align-items: center; }
.main-nav a {
  color: var(--charcoal); font-weight: 600; font-size: .9rem; padding: .48rem .78rem; border-radius: 999px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--red-soft); color: var(--red-dark); }
.main-nav a.active { background: var(--red-soft); color: var(--red); }
.header-cta { display: flex; gap: .6rem; align-items: center; flex-shrink: 0; }
.header-call svg { width: 14px; height: 14px; fill: currentColor; }
.btn svg { width: 15px; height: 15px; fill: currentColor; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 42px; height: 42px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: var(--charcoal); stroke-width: 2; stroke-linecap: round; }
.nav-toggle:hover { border-color: var(--red); }
.nav-toggle:hover svg { stroke: var(--red); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #FBFBFC 0%, var(--bg) 100%); padding: 4.5rem 0 4rem; position: relative; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; background: var(--red-soft); color: var(--red-dark);
  font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero h1 span.accent { color: var(--red); }
.hero-sub { font-size: 1.12rem; max-width: 34rem; }
.hero-actions { display: flex; gap: .9rem; margin: 1.75rem 0 1.5rem; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--slate); font-size: .88rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust svg { width: 16px; height: 16px; fill: var(--red); }
.hero-media { position: relative; }
.hero-media .hero-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.25rem;
  border: 1px solid var(--border);
}
.hero-media img { border-radius: var(--radius-sm); width: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; bottom: -18px; left: -18px; background: var(--charcoal); color: #fff;
  border-radius: var(--radius-sm); padding: .8rem 1.1rem; box-shadow: var(--shadow-md); font-size: .85rem;
}
.hero-badge strong { color: var(--orange); display: block; font-size: 1.15rem; }

/* ---------- Stats strip ---------- */
.stats { background: var(--charcoal); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2.25rem 24px; text-align: center; }
.stat b { display: block; font-size: 2rem; color: var(--orange); font-weight: 800; }
.stat span { font-size: .85rem; color: #C9CDD3; }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg); }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 3rem; }
.section-head .kicker {
  color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem;
  display: block; margin-bottom: .6rem;
}
.section-head p { font-size: 1.05rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--red-soft); color: var(--red);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem;
}
.card .icon svg { width: 26px; height: 26px; fill: currentColor; }
.card h3 { margin-bottom: .4rem; }
.card p { font-size: .93rem; margin-bottom: 0; }

/* ---------- Product cards ---------- */
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card .thumb { background: var(--bg); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-card .cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.product-card h3 { font-size: 1.05rem; margin: 0; }
.product-card .price { color: var(--red); font-weight: 800; font-size: 1.2rem; margin-top: auto; }
.product-card .meta { font-size: .8rem; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step { position: relative; text-align: center; padding: 0 1rem; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: #fff;
  font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem; box-shadow: var(--shadow-md);
}
.step h3 { font-size: 1.1rem; }
.step p { font-size: .93rem; }

/* ---------- Dark CTA band ---------- */
.cta-band { background: var(--charcoal); color: #fff; border-radius: var(--radius); padding: 3rem; position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(193,39,45,.55), transparent 70%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #C9CDD3; max-width: 38rem; }
.cta-band .actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.5rem; }
.cta-band ul { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 1.5rem; }
.cta-band li { color: #D8DBDF; font-size: .9rem; display: flex; gap: .5rem; align-items: center; }
.cta-band li::before { content: "✓"; color: var(--orange); font-weight: 800; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: var(--charcoal); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=datetime-local],
input[type=date], input[type=password], select, textarea {
  width: 100%; padding: .72rem .95rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, textarea:hover { border-color: #CDD3DB; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(193,39,45,.12); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 120px; resize: vertical; }
.help-text { font-size: .8rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Custom select (replaces native dropdown chrome) ---------- */
select.tp-native-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  opacity: 0; pointer-events: none; overflow: hidden;
}
.tp-select { position: relative; }
.tp-select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .72rem .95rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.tp-select-btn:hover { border-color: #CDD3DB; }
.tp-select-btn:focus-visible, .tp-select.is-open .tp-select-btn {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(193,39,45,.12);
}
.tp-select-btn .tp-select-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-select-btn .tp-select-value.is-placeholder { color: var(--muted); }
.tp-select-btn .tp-chevron {
  flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: var(--red); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease;
}
.tp-select.is-open .tp-chevron { transform: rotate(180deg); }
.tp-select-panel {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); max-height: 264px; overflow-y: auto; padding: .35rem;
  animation: tp-pop .12s ease;
}
@keyframes tp-pop { from { transform: translateY(-4px); } to { transform: none; } }
.tp-select-option {
  padding: .55rem .75rem; border-radius: 6px; font-size: .92rem; color: var(--charcoal); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.tp-select-option:hover, .tp-select-option.is-active { background: var(--red-soft); color: var(--red-dark); }
.tp-select-option.is-selected { font-weight: 700; color: var(--red); }
.tp-select-option.is-selected::after { content: "✓"; font-size: .85rem; }
.tp-select-option.is-placeholder { color: var(--muted); }
.tp-select.is-invalid .tp-select-btn { border-color: var(--red); box-shadow: 0 0 0 3px rgba(193,39,45,.15); }
.tp-field-error { color: var(--red-dark); font-size: .8rem; margin-top: .3rem; font-weight: 600; }

/* Search-bar selects sit inline with inputs */
.form-card .tp-select-btn { background: #fff; }

/* ---------- Alerts ---------- */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .92rem; font-weight: 500; }
.alert-success { background: #E8F6EE; color: #1B7A44; border: 1px solid #BFE6CE; }
.alert-error { background: var(--red-soft); color: var(--red-dark); border: 1px solid #F0C9CB; }
.alert-info { background: #EAF1FB; color: #23538F; border: 1px solid #C7DAF3; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-weight: 700; color: var(--charcoal); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .22rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-green { background: #E8F6EE; color: #1B7A44; }
.badge-red { background: var(--red-soft); color: var(--red-dark); }
.badge-gray { background: #EEF0F3; color: var(--slate); }
.badge-orange { background: #FEF0E3; color: #B45A05; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--red); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: linear-gradient(180deg, #FBFBFC, var(--bg)); padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: .35rem; }
.page-hero p { max-width: 40rem; font-size: 1.05rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #C9CDD3; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-grid h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.1rem; }
.footer-grid a { color: #C9CDD3; display: block; padding: .22rem 0; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 56px; width: auto; background: #fff; padding: 6px 12px; border-radius: 8px; margin-bottom: 1rem; }
.footer-brand p { color: #A9AFB8; font-size: .9rem; }
.footer-contact div { display: flex; gap: .6rem; margin-bottom: .7rem; font-size: .92rem; align-items: flex-start; }
.footer-contact svg { width: 16px; height: 16px; fill: var(--orange); flex-shrink: 0; margin-top: .25rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.25rem 0; font-size: .84rem; color: #A9AFB8; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
  padding: .5rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--charcoal); font-size: .9rem; background: #fff;
}
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.pagination a:hover { border-color: var(--red); color: var(--red); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; margin-bottom: .8rem; overflow: hidden; }
.faq-item summary { padding: 1.1rem 1.35rem; font-weight: 600; cursor: pointer; color: var(--charcoal); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 1.35rem; color: var(--red); font-size: 1.3rem; font-weight: 700; top: .8rem; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 1.35rem 1.25rem; color: var(--slate); font-size: .95rem; }

/* ---------- Chat / session ---------- */
.chat-box { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; height: 420px; }
.chat-log { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: .7rem; background: var(--bg); }
.chat-msg { max-width: 75%; padding: .6rem .95rem; border-radius: 14px; font-size: .92rem; }
.chat-msg.customer { background: #fff; border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.technician { background: var(--red); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.system { align-self: center; background: transparent; color: var(--muted); font-size: .82rem; }
.chat-input { display: flex; gap: .6rem; padding: .9rem; border-top: 1px solid var(--border); background: #fff; }
.chat-input input { flex: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1250px) {
  .main-nav a { padding: .45rem .6rem; font-size: .86rem; }
}
@media (max-width: 1100px) {
  .header-call { display: none; }
}
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .cta-band ul { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 1rem; box-shadow: var(--shadow-md);
  }
  .main-nav.open a { border-radius: var(--radius-sm); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .topbar-links { display: none; }
}
