/* =========================================
   FORTINET SHOP — MAIN STYLESHEET
   Aesthetic: Industrial Security / Refined Dark
   ========================================= */

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

:root {
  --red:       #EE3124;
  --red-dark:  #C0221A;
  --red-glow:  rgba(238,49,36,0.15);
  --bg:        #0A0C0F;
  --bg2:       #12151A;
  --bg3:       #1A1E26;
  --surface:   #1F2430;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --text:      #F0F2F5;
  --text2:     #9BA3B0;
  --text3:     #5C6470;
  --blue:      #3B82F6;
  --green:     #22C55E;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius:    12px;
  --radius-lg: 20px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,12,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display:flex; align-items:center; gap:10px; }
.brand-icon { display:flex; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 11px;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.header-nav { display:flex; gap:4px; margin-left:auto; }
.nav-link {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg3);
}
.header-cta {
  background: var(--red);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.header-cta:hover { background: var(--red-dark); }

/* ---- HERO ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 32px 70px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero-content { flex: 1; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--red);
  background: var(--red-glow);
  border: 1px solid rgba(238,49,36,0.3);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100%{opacity:1} 50%{opacity:0.4}
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: normal;
  color: var(--red);
}
.hero-desc {
  font-size: 16px;
  color: var(--text2);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}
.stat { display:flex; flex-direction:column; }
.stat-num {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border2);
}

/* Shield visual */
.hero-visual {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shield-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(238,49,36,0.2);
  animation: rotate 20s linear infinite;
}
.ring-1 { width: 240px; height: 240px; animation-duration: 25s; }
.ring-2 { width: 180px; height: 180px; animation-duration: 18s; animation-direction: reverse; border-color: rgba(238,49,36,0.12); }
.ring-3 { width: 120px; height: 120px; animation-duration: 12s; border-color: rgba(238,49,36,0.08); }
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.shield-core {
  width: 80px;
  height: 80px;
  background: rgba(238,49,36,0.1);
  border: 1px solid rgba(238,49,36,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- FILTER SECTION ---- */
.filter-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  padding: 20px 0;
  position: sticky;
  top: 64px;
  z-index: 90;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 13px;
  color: var(--text3);
  font-weight: 500;
  white-space: nowrap;
}
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tab:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--surface);
}
.filter-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.tab-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red   { background: var(--red); }
.dot-blue  { background: var(--blue); }
.dot-green { background: var(--green); }
.filter-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  color: var(--text3);
  transition: border-color var(--transition);
}
.filter-search:focus-within {
  border-color: var(--border2);
  color: var(--text2);
}
.filter-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  width: 200px;
}
.filter-search input::placeholder { color: var(--text3); }
.filter-count {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text3);
  min-height: 18px;
}

/* ---- PRODUCTS GRID ---- */
main.container { padding-top: 40px; padding-bottom: 80px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ---- PRODUCT CARD ---- */
.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-card:hover {
  border-color: rgba(238,49,36,0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(238,49,36,0.1);
}
.card-image {
  height: 180px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition);
}
.product-card:hover .card-image img {
  transform: scale(1.04);
}
.card-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text3);
  font-size: 13px;
}
.card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.badge-fortigate  { background: rgba(238,49,36,0.2);  color: #FF7A72; border: 1px solid rgba(238,49,36,0.3); }
.badge-fortiswitch{ background: rgba(59,130,246,0.2); color: #7CB8FF; border: 1px solid rgba(59,130,246,0.3); }
.badge-fortiap    { background: rgba(34,197,94,0.2);  color: #6EE89A; border: 1px solid rgba(34,197,94,0.3); }

.card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-sku {
  font-size: 11px;
  color: var(--text3);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.04em;
}
.card-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-pdf {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text3);
  text-decoration: none;
  transition: color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
}
.card-pdf:hover { color: var(--red); }
.card-pdf svg { flex-shrink: 0; }
.card-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--red);
  border: 1px solid rgba(238,49,36,0.3);
  background: transparent;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition);
}
.card-btn:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

/* ---- LOADING / ERROR ---- */
.loading-state {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--text2);
  font-size: 14px;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 2px solid var(--border2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 0;
}
.error-icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.error-state h3 {
  font-family: var(--font-head);
  font-size: 20px;
  margin-bottom: 8px;
}
.error-state p {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 24px;
}
.retry-btn {
  background: var(--red);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.retry-btn:hover { background: var(--red-dark); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 1;
}
.modal-close:hover {
  background: rgba(238,49,36,0.15);
  color: var(--red);
  border-color: rgba(238,49,36,0.3);
}
.modal-inner {
  padding: 32px;
}

/* Modal content */
.modal-product-header {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
  align-items: flex-start;
}
.modal-image {
  width: 200px;
  height: 160px;
  background: var(--bg3);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  flex-shrink: 0;
}
.modal-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.modal-meta { flex: 1; }
.modal-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--red);
  margin-bottom: 8px;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.modal-sku {
  font-size: 12px;
  color: var(--text3);
  font-family: 'Courier New', monospace;
  margin-bottom: 14px;
}
.modal-actions { display:flex; gap:10px; flex-wrap:wrap; }
.btn-primary {
  background: var(--red);
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--surface);
}

.modal-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.specs-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg3);
  padding: 10px 14px;
}
.spec-name {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.spec-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ---- FOOTER ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
}
.footer-note {
  font-size: 12px;
  color: var(--text3);
}
.footer-note a {
  color: var(--text2);
  text-decoration: underline;
  text-decoration-color: var(--border2);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 48px 20px 40px; gap: 32px; }
  .hero-visual { width: 180px; height: 180px; }
  .ring-1 { width: 160px; height: 160px; }
  .ring-2 { width: 120px; height: 120px; }
  .ring-3 { width: 80px; height: 80px; }
  .container { padding: 0 20px; }
  .header-inner { padding: 0 20px; gap: 16px; }
  .header-nav { display: none; }
  .filter-search { display: none; }
  .products-grid { grid-template-columns: 1fr; }
  .modal-product-header { flex-direction: column; }
  .modal-image { width: 100%; height: 200px; }
  .specs-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
}
