/*
Theme Name: Protex Modern
Theme URI: https://www.protexsicurezza.com/
Author: Protex Sicurezza
Description: Custom WooCommerce theme for Protex Sicurezza staging.
Version: 1.0.0
Text Domain: protex-modern
*/

:root {
  --blue: #0757b7;
  --blue-dark: #003b83;
  --ink: #061225;
  --muted: #536174;
  --line: #d9e1ea;
  --soft: #f4f7fa;
  --white: #ffffff;
  --red: #d6101f;
  --green: #25b83d;
  --shadow: 0 18px 42px rgba(10, 32, 61, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.site-shell { min-height: 100vh; overflow-x: hidden; }
.wrap { width: min(100% - 48px, 1400px); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(9, 31, 59, .08);
  backdrop-filter: blur(14px);
}
.header-inner {
  height: 92px;
  display: grid;
  grid-template-columns: 250px 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand-wordmark {
  display: inline-grid;
  line-height: 1;
  width: max-content;
}
.brand-main {
  font-size: 44px;
  font-weight: 950;
  letter-spacing: 3px;
  color: #20242b;
}
.brand-main span {
  color: var(--red);
  position: relative;
}
.brand-main span::before,
.brand-main span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 35px;
  height: 2px;
  background: #20242b;
  transform: translate(-50%, -50%);
}
.brand-main span::after { transform: translate(-50%, -50%) rotate(90deg); }
.brand-sub {
  margin-top: 5px;
  color: var(--red);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 11px;
}
.main-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  font-weight: 750;
  color: #0a1424;
  letter-spacing: 0;
}
.nav-item { display: inline-flex; align-items: center; gap: 6px; }
.nav-item svg { width: 12px; height: 12px; stroke-width: 3; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}
.icon-link {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: #1e2c3f;
  position: relative;
}
.cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.hero {
  min-height: 475px;
  display: grid;
  align-items: stretch;
  background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 34%, rgba(255,255,255,.28) 58%, rgba(255,255,255,0) 78%),
    var(--hero-image) center right / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  padding: 62px 0 58px;
  display: grid;
  grid-template-columns: minmax(360px, 570px) 1fr;
  position: relative;
}
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 5vw, 72px);
  line-height: .98;
  letter-spacing: 0;
  max-width: 620px;
}
.hero p {
  margin: 28px 0 36px;
  max-width: 460px;
  color: #1c2c40;
  font-size: 25px;
  line-height: 1.35;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; }
.btn {
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 28px;
  border-radius: 6px;
  border: 2px solid var(--blue);
  font-weight: 800;
  font-size: 17px;
}
.btn-primary {
  color: white;
  background: linear-gradient(180deg, #1269d0, #014aa4);
  box-shadow: 0 12px 24px rgba(7,87,183,.22);
}
.btn-secondary { color: var(--blue-dark); background: rgba(255,255,255,.86); }
.btn svg { width: 22px; height: 22px; }

.hero-products {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(58vw, 820px);
  pointer-events: none;
}
.hero-product {
  position: absolute;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(8, 20, 38, .2));
}
.camera-bullet {
  right: 2%;
  top: 34px;
  width: 238px;
  transform: rotate(-4deg);
}
.camera-dome {
  right: 7%;
  bottom: 16px;
  width: 185px;
}
.ajax-hub {
  right: 25%;
  bottom: 16px;
  width: 240px;
}
.ajax-kit {
  right: 43%;
  bottom: 10px;
  width: 195px;
}
.siren {
  right: 58%;
  bottom: 6px;
  width: 132px;
}

.category-strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.category-card {
  min-height: 205px;
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 18px;
  align-items: center;
  padding: 26px 28px;
  border-right: 1px solid var(--line);
}
.category-card:last-child { border-right: 0; }
.category-card img {
  width: 145px;
  height: 135px;
  object-fit: contain;
}
.category-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.18;
}
.category-card p {
  margin: 0 0 18px;
  color: #24354b;
  font-size: 15px;
}
.text-link {
  color: var(--blue-dark);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-band {
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
.trust-grid {
  min-height: 98px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.trust-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-right: 1px solid var(--line);
}
.trust-item:last-child { border-right: 0; }
.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--blue);
}
.trust-icon.green { background: var(--green); }
.trust-icon.light { background: #eaf2fb; color: var(--blue); }
.trust-item span {
  display: block;
  color: #0b1728;
  font-weight: 800;
  font-size: 14px;
}
.trust-item strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.solutions {
  padding: 48px 0 70px;
  background: #fff;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.08;
}
.section-head p {
  margin: 12px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
}
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.solution-card {
  min-height: 295px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(8, 28, 54, .06);
}
.solution-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}
.solution-card div { padding: 20px 22px 24px; }
.solution-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}
.solution-card p {
  margin: 0;
  color: var(--muted);
}

.shop-preview {
  padding: 60px 0 78px;
  background: var(--soft);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  min-height: 282px;
  display: grid;
  align-content: start;
  box-shadow: 0 10px 24px rgba(8, 28, 54, .05);
}
.product-mini img {
  width: 100%;
  height: 148px;
  object-fit: contain;
  margin-bottom: 16px;
}
.product-mini h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
}
.product-mini p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  background: #071120;
  color: #dbe6f5;
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand .brand-main { color: #fff; font-size: 34px; }
.footer-brand .brand-main span::before,
.footer-brand .brand-main span::after { background: #fff; width: 28px; }
.footer-brand .brand-sub { font-size: 19px; letter-spacing: 8px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #eef5ff;
  font-weight: 700;
}

.page-main {
  padding: 64px 0;
  min-height: 60vh;
}
.page-main h1 { font-size: clamp(38px, 4vw, 58px); line-height: 1.05; }
.page-main > .wrap > h1 { margin-top: 0; }

.catalog-category-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.catalog-category {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  display: grid;
  align-content: space-between;
  box-shadow: 0 10px 24px rgba(8, 28, 54, .05);
}
.catalog-category strong {
  display: block;
  font-size: 21px;
  line-height: 1.15;
}
.catalog-category small {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 800;
}
.catalog-category p {
  margin: 18px 0;
  color: var(--muted);
}
.catalog-category em,
.catalog-link {
  color: var(--blue-dark);
  font-style: normal;
  font-weight: 850;
}
.catalog-subtitle {
  margin: 54px 0 22px;
  font-size: clamp(28px, 3vw, 38px);
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.catalog-card {
  min-height: 390px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 210px 1fr;
  box-shadow: 0 12px 28px rgba(8, 28, 54, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.catalog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.catalog-image {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}
.catalog-image img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}
.catalog-body {
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 12px;
}
.catalog-body strong {
  min-height: 68px;
  font-size: 17px;
  line-height: 1.24;
}
.catalog-price {
  color: var(--blue-dark);
  font-size: 23px;
  font-weight: 900;
}
.catalog-empty {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.legacy-product {
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: 54px;
  align-items: start;
}
.legacy-media {
  background: linear-gradient(180deg, #fff, #f7f9fc);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 44px;
  min-height: 500px;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(8, 28, 54, .06);
}
.legacy-media img {
  width: 100%;
  max-height: 390px;
  object-fit: contain;
}
.legacy-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.04;
}
.legacy-category {
  margin: 0 0 12px;
  color: var(--blue);
  font-weight: 850;
}
.legacy-price {
  margin: 0 0 26px;
  color: var(--blue-dark);
  font-size: 38px;
  font-weight: 950;
}
.legacy-description {
  color: #24354b;
  font-size: 18px;
  max-width: 760px;
}
.legacy-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.legacy-actions form.cart {
  margin: 0;
  display: flex;
  gap: 12px;
}
.legacy-actions .quantity input {
  width: 72px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  font-weight: 800;
}
.legacy-actions .single_add_to_cart_button {
  min-height: 52px;
  border: 0;
  border-radius: 6px;
  padding: 0 24px;
  background: var(--blue);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}
.legacy-points {
  margin: 32px 0 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: #24354b;
}
.legacy-points li + li { margin-top: 8px; }

@media (max-width: 1100px) {
  .header-inner { grid-template-columns: 190px 1fr; height: auto; padding: 14px 0; }
  .brand img { width: 178px; }
  .brand-main { font-size: 34px; }
  .brand-sub { font-size: 20px; letter-spacing: 8px; }
  .main-nav { order: 3; grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .header-actions { justify-content: flex-end; }
  .category-grid, .trust-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-category-grid, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .legacy-product { grid-template-columns: 1fr; }
  .category-card:nth-child(2) { border-right: 0; }
  .trust-item:nth-child(2n) { border-right: 0; }
  .solution-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 28px, 1400px); }
  .header-inner { grid-template-columns: 1fr auto; gap: 12px; }
  .phone-link span, .icon-link.user { display: none; }
  .main-nav { gap: 18px; font-size: 14px; }
  .hero {
    min-height: auto;
    background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.82) 60%, rgba(255,255,255,.68) 100%),
      var(--hero-image) center / cover no-repeat;
  }
  .hero-inner { display: block; padding: 48px 0; }
  .hero-products { display: none; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 20px; }
  .hero-actions { display: grid; }
  .category-grid, .trust-grid, .product-grid { grid-template-columns: 1fr; }
  .catalog-category-grid, .catalog-grid { grid-template-columns: 1fr; }
  .legacy-media { min-height: 320px; padding: 28px; }
  .legacy-actions { display: grid; }
  .legacy-actions form.cart { display: grid; }
  .category-card, .trust-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .category-card { grid-template-columns: 122px 1fr; padding: 22px 0; }
  .category-card img { width: 122px; }
  .section-head { display: block; }
  .footer-inner { display: block; }
  .footer-links { margin-top: 22px; }
}
