@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&family=Barlow:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #646361;
  --gold-dim: #646361;
  --gold-glow: rgba(129, 126, 119, 0.35);
  --bg: #000;
  --surface: #141414;
  --surface-2: #1e1e1e;
  --border: rgba(240, 178, 51, 0.2);
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #d4af53;
  --danger: #ff7a7a;
}
html { min-height: 100%; overflow-y: scroll; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font-family: 'Barlow', sans-serif; font-size: 16px; line-height: 1.458; }
body.nav-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: 'Rajdhani', sans-serif; }
h2 { color: #fff; text-align: center; font-size: 24px; }
p { color: #fff; }
.site-main { min-height: calc(100vh - 70px); }
.site-footer { padding: 25px 20px; text-align: center; background: #0b0b0b; border-top: 1px solid rgba(255,255,255,.05); }
.site-footer p { color: #777; font-size: 13px; }


.gradient-text { background: linear-gradient(to right, #fff, #080808) 50%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 600; letter-spacing: 3px; line-height: 1.1; }

.site-header { position: sticky; top: 0; z-index: 300; width: 100%; background: #fff; border-bottom: 1px solid #e5e7eb; box-shadow: 0 7px 24px rgba(2, 12, 30, .14); }
.header-inner { width: 100%; min-height: 88px; margin: 0; padding: 8px 16px; display: flex; align-items: center; gap: 30px; }
.header-brand { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.header-brand img { width: auto; height: 68px; max-width: 330px; object-fit: contain; }
.header-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
.header-nav-link { position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: #132447; text-decoration: none; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.header-nav-link::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; background: #c79b2e; transform: scaleX(0); transform-origin: center; transition: transform .2s; }
.header-nav-link:hover, .header-nav-link.active { color: #081834; background: #f3f5f8; }
.header-nav-link:hover::after, .header-nav-link.active::after { transform: scaleX(1); }
.header-products { position: relative; display: inline-flex; }
.header-products-toggle { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: .045em; text-transform: uppercase; appearance: none; -webkit-appearance: none; }
.header-products-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 190px; padding: 8px; display: grid; gap: 3px; background: #fff; border: 1px solid #e1e5eb; border-radius: 9px; box-shadow: 0 16px 35px rgba(2, 12, 30, .20); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px); transition: opacity .18s, visibility .18s, transform .18s; }
.header-products.open .header-products-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.header-products-link { display: block; padding: 10px 12px; border-radius: 6px; color: #132447; text-decoration: none; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .045em; text-transform: uppercase; transition: color .18s, background .18s; }
.header-products-link:hover, .header-products-link.active { color: #081834; background: #f3f5f8; }
.header-nav-form { display: inline-flex; margin: 0; }
.header-nav-button { font: inherit; }
.header-signin { margin-left: 6px; background: #10264e; color: #fff; padding-inline: 16px; }
.header-signin::after { display: none; }
.header-signin:hover, .header-signin.active { background: #c79b2e; color: #07142d; transform: translateY(-1px); }
.header-cart { color: #8a6514; }
.nav-trigger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 46px; height: 46px; padding: 0; border: 1px solid #d8dde6; border-radius: 8px; background: #fff; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nav-trigger span { width: 22px; height: 2px; border-radius: 10px; background: #10264e; transition: transform .25s, opacity .25s; }
.site-header.open .nav-trigger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.open .nav-trigger span:nth-child(2) { opacity: 0; }
.site-header.open .nav-trigger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header-nav-link:focus-visible, .header-products-link:focus-visible, .nav-trigger:focus-visible { outline: 3px solid rgba(199,155,46,.55); outline-offset: 2px; }


.flash-stack { position: fixed; top: 100px; right: 20px; z-index: 500; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.flash { padding: 12px 16px; border-radius: 7px; background: #1d3926; border: 1px solid #2f7142; color: #e7ffec; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.flash.warning { background: #3d3116; border-color: #8a6924; color: #fff2c2; }
.flash.error { background: #411d1d; border-color: #8d3434; color: #ffd9d9; }

#hero { position: relative; width: 100%; height: calc(100vh - 88px); min-height: 560px; overflow: hidden; display: flex; background: #05070a; }
.hero-background { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-background-static { z-index: 1; background-image: url('../images/home-police-hero.png'); background-position: center 48%; transform: scale(1.012); }
.hero-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(2,9,23,.54) 0%, rgba(2,9,23,.15) 44%, rgba(2,9,23,.36) 100%), linear-gradient(180deg, rgba(3,11,27,.28) 0%, rgba(0,0,0,.08) 48%, rgba(0,0,0,.76) 100%), radial-gradient(ellipse at 58% 43%, rgba(0,0,0,0) 20%, rgba(0,0,0,.42) 100%); }
.hero-overlay::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 135px rgba(0,0,0,.40); }
.hero-content { position: relative; z-index: 3; width: 100%; min-height: 100%; padding: 32px; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-title { max-width: 1100px; color: #fff; font-family: 'Rajdhani', sans-serif; font-size: clamp(2.6rem, 6vw, 5.8rem); font-weight: 700; line-height: 1.02; letter-spacing: .02em; text-shadow: 0 3px 8px rgba(0,0,0,.95), 0 0 32px rgba(0,0,0,.70); }

#main-content { width: 100%; min-height: 100vh; background: #111; padding: 40px; }
.products-section { background: #111; padding: 60px 20px; clip-path: polygon(0 40px,100% 0,100% 100%,0 100%); margin-top: -20px; }

.home-latest-content { min-height: auto; padding: 40px 24px 80px; }
.latest-models-section { width: min(1280px, 100%); margin: -20px auto 0; padding: 82px 28px 54px; }
.latest-models-heading { max-width: 760px; margin: 0 auto; text-align: center; }
.latest-models-heading h2 { margin-top: 4px; font-size: clamp(2.25rem, 4vw, 3.6rem); letter-spacing: .02em; }
.latest-models-heading > p:last-child { margin-top: 10px; color: #b8bec8; }
.latest-models-eyebrow, .home-discord-eyebrow { color: var(--accent) !important; font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.products-container.latest-models-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: 100%; max-width: 1180px; margin: 38px auto 0; padding: 0; align-items: stretch; justify-content: initial; flex-wrap: initial; }
.latest-models-grid .product { width: 100%; height: 100%; display: flex; flex-direction: column; }
.latest-models-grid .product-link { flex: 1; }
.latest-models-grid .product form { margin-top: auto; padding-top: 14px; }
.latest-models-empty { margin-top: 38px; }
.home-discord-cta { width: min(1000px, 100%); margin: 58px auto 0; padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 28px; background: linear-gradient(135deg, rgba(88,101,242,.19), rgba(16,38,78,.72)); border: 1px solid rgba(130,142,255,.38); border-radius: 16px; box-shadow: 0 18px 45px rgba(0,0,0,.28); }
.home-discord-cta h2 { margin-top: 4px; text-align: left; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.home-discord-cta > div > p:last-child { margin-top: 8px; color: #cbd0dc; }
.home-discord-button { flex: 0 0 auto; margin-top: 0; min-width: 180px; justify-content: center; font-family: 'Rajdhani', sans-serif; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.home-discord-button i { font-size: 20px; }

.content-page, .form-page { min-height: 100vh; padding: 135px 24px 70px; background: radial-gradient(circle at top, #202020 0, #0a0a0a 50%, #000 100%); }
.form-page { display: flex; align-items: center; justify-content: center; }
.page-heading { max-width: 1200px; margin: 0 auto; text-align: center; }
.page-heading h1, .content-card h1, .form-card h1 { font-size: clamp(2.1rem, 5vw, 4rem); color: #fff; text-align: center; }
.content-card { width: min(900px, 100%); margin: 0 auto; padding: 42px; background: rgba(255,255,255,.04); border: 1px solid rgba(212,175,83,.2); border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.content-card > p { text-align: center; margin-top: 16px; color: #c9c9c9; }
.form-card { background: rgba(255,255,255,.04); border: 1px solid rgba(212,175,83,.25); backdrop-filter: blur(12px); border-radius: 16px; padding: 48px 40px; width: 100%; max-width: 460px; box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(212,175,83,.1); }
.form-card.wide-card { max-width: 620px; }
.form-card h2 { font-size: 1.1rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin: 12px 0 32px; font-weight: 400; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(212,175,83,.75); margin-bottom: 8px; }
.input-group input, .input-group textarea { width: 100%; padding: 14px 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(212,175,83,.2); border-radius: 8px; color: #fff; font: inherit; outline: none; transition: border-color .2s, box-shadow .2s; resize: vertical; }
.input-group input:focus, .input-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,175,83,.12); }
.login-btn, .primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; padding: 12px 20px; border: 0; border-radius: 8px; font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.login-btn, .primary-button { background: linear-gradient(135deg, #d4af53, #b8962e); color: #0a0a0a; }
.login-btn { width: 100%; }
.secondary-button { background: #292929; color: #fff; border: 1px solid #4c4c4c; }
.login-btn:hover, .primary-button:hover, .secondary-button:hover { opacity: .9; transform: translateY(-1px); }
.inline-button { width: auto; margin-top: 18px; }
.form-errors { margin-bottom: 22px; padding: 12px 14px; background: rgba(120,20,20,.35); border: 1px solid rgba(255,100,100,.4); border-radius: 8px; }
.form-errors p { color: #ffd6d6; text-align: left; }
.form-footnote { margin-top: 20px; text-align: center; color: #aaa; }
.form-footnote a { color: var(--accent); }

.products-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 50px auto; max-width: 1200px; padding: 0 20px; }
.product { width: 360px; padding: 20px; background: var(--surface-2); border-radius: 10px; box-shadow: 0 5px 15px #646361; text-align: center; transition: transform .3s ease; }
.product:hover { transform: translateY(-5px); }
.product-link, .category-card { display: block; text-decoration: none; }
.product img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
.product p { text-align: center; color: #ddd; margin-top: 6px; }
.product .price { font-size: 18px; font-weight: 700; margin: 10px 0; }
.product-notice { color: #fff !important; font-size: 13px; letter-spacing: .1em; }
.product form { margin-top: 14px; }
.category-grid .product { width: 380px; }
/* Homepage Latest Models must remain a true 3 x 2 CSS grid. */
.products-container.latest-models-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.products-container.latest-models-grid > .product {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.empty-category { width: min(620px, calc(100% - 32px)); margin: 50px auto 0; padding: 36px 28px; text-align: center; background: rgba(255,255,255,.04); border: 1px solid rgba(212,175,83,.2); border-radius: 14px; }
.empty-category h2 { margin-bottom: 10px; }
.empty-category p { color: #b9b9b9; }
.product-detail { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(280px,.9fr); gap: 36px; align-items: center; }
.product-detail img { width: 100%; border-radius: 12px; }
.product-detail h1 { text-align: left; }
.product-detail p { text-align: left; }
.product-detail .price { font-size: 28px; font-weight: 700; color: #fff; }
.eyebrow { color: var(--accent) !important; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }

.support-card { text-align: center; }
.support-card p { max-width: 700px; margin: 18px auto 0; }
.discord-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 14px 22px; border-radius: 8px; background: #5865f2; color: #fff; text-decoration: none; font-weight: 700; }
.discord-link:hover { filter: brightness(1.08); }
.account-details { display: grid; gap: 14px; margin-top: 32px; }
.account-details div { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 14px; background: rgba(255,255,255,.03); border-radius: 8px; }
.account-details dt { color: var(--accent); font-weight: 700; }
.account-details dd { color: #fff; }

.cart-list { display: grid; gap: 12px; margin-top: 25px; }
.cart-row { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 18px; align-items: center; padding: 14px; background: rgba(255,255,255,.03); border-radius: 10px; }
.cart-row img { width: 90px; height: 65px; object-fit: cover; border-radius: 6px; }
.cart-row h2 { text-align: left; }
.cart-row p { text-align: left; color: #aaa; }
.cart-total { margin-top: 24px; text-align: right; font-size: 24px; }
.cart-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 20px; }

@media (max-width: 1120px) {
  .header-inner { padding-inline: 14px; }
  .header-brand img { height: 60px; max-width: 275px; }
  .header-nav-link { padding-inline: 8px; font-size: 14px; }
}
@media (max-width: 920px) {
  .products-container.latest-models-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-discord-cta { align-items: flex-start; }
  .site-header { position: sticky; }
  .header-inner { min-height: 76px; padding-top: max(8px, env(safe-area-inset-top)); }
  .header-brand img { height: 56px; max-width: min(250px, calc(100vw - 92px)); }
  .nav-trigger { display: flex; margin-left: auto; flex: 0 0 auto; }
  .header-nav { position: absolute; top: 100%; left: 0; right: 0; display: grid; gap: 3px; margin-left: 0; max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); padding: 12px max(14px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: #fff; border-top: 1px solid #eceff3; box-shadow: 0 16px 25px rgba(2,12,30,.16); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px); transition: opacity .22s, transform .22s, visibility .22s; }
  .site-header.open .header-nav { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .header-nav-link, .header-nav-form, .header-nav-button, .header-products { width: 100%; justify-content: flex-start; }
  .header-nav-link { min-height: 48px; padding: 12px 14px; font-size: 16px; }
  .header-nav-link::after { left: 14px; right: 14px; }
  .header-products { display: block; }
  .header-products-toggle { width: 100%; justify-content: flex-start; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: .045em; }
  .header-products-menu { position: static; width: 100%; margin-top: 2px; padding: 4px 0 6px 14px; display: none; border: 0; border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .header-products.open .header-products-menu { display: grid; }
  .header-products-link { min-height: 46px; display: flex; align-items: center; padding: 10px 14px; border-left: 3px solid #c79b2e; border-radius: 0 7px 7px 0; font-size: 15px; }
  .header-signin { margin-left: 0; justify-content: center; text-align: center; }
  .header-cart { border-top: 1px solid #edf0f4; margin-top: 4px; }
  #hero { height: calc(100vh - 76px); height: calc(100dvh - 76px); min-height: 540px; }
  .hero-background-static { background-position: 62% center; }
  .hero-overlay { background: linear-gradient(180deg, rgba(5,8,15,.40) 0%, rgba(0,0,0,.18) 45%, rgba(0,0,0,.80) 100%), radial-gradient(ellipse at 62% 42%, rgba(0,0,0,0) 18%, rgba(0,0,0,.48) 100%); }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail h1, .product-detail p { text-align: center; }
  .cart-row { grid-template-columns: 70px 1fr; }
  .cart-row strong, .cart-row form { grid-column: 2; }
}
@media (max-width: 600px) {
  .home-latest-content { padding: 20px 0 56px; }
  .latest-models-section { padding: 68px 14px 34px; }
  .products-container.latest-models-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 30px; }
  .home-discord-cta { margin-top: 42px; padding: 24px 20px; flex-direction: column; align-items: stretch; text-align: center; }
  .home-discord-cta h2 { text-align: center; }
  .home-discord-button { width: 100%; }
  .header-inner { padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .header-brand img { height: 48px; max-width: 210px; }
  .nav-trigger { width: 42px; height: 42px; }
  #hero { min-height: 500px; }
  .hero-content { padding: 24px 18px; }
  .hero-title { font-size: clamp(2.35rem, 12vw, 4rem); }
  #main-content { padding: 20px 0; }
  .products-section { padding: 50px 0; }
  .products-container { padding: 0 14px; }
  .product { width: 100%; }
  .content-page, .form-page { padding: 80px 14px 50px; }
  .content-card, .form-card { padding: 28px 20px; }
  .account-details div { grid-template-columns: 1fr; gap: 4px; }
  .cart-actions { flex-direction: column; align-items: stretch; }
}


@media (max-width: 920px) and (max-height: 560px) and (orientation: landscape) {
  .header-inner { min-height: 66px; }
  .header-brand img { height: 46px; }
  .nav-trigger { width: 42px; height: 42px; }
  .header-nav { max-height: calc(100vh - 66px); max-height: calc(100dvh - 66px); padding-top: 8px; }
  .header-nav-link { min-height: 42px; padding-block: 8px; }
  #hero { height: calc(100vh - 66px); height: calc(100dvh - 66px); min-height: 420px; }
}

@media (hover: none) and (pointer: coarse) {
  .header-nav-link, .header-products-link, .nav-trigger { -webkit-tap-highlight-color: transparent; }
  .header-nav-link:hover, .header-products-link:hover { transform: none; }
}


/* Product image and video gallery */
.product-detail-with-gallery { align-items: start; }
.product-gallery { min-width: 0; display: grid; gap: 16px; }
.product-gallery-main { display: block; overflow: hidden; border-radius: 12px; background: #080a0e; border: 1px solid rgba(255,255,255,.08); }
.product-gallery-main img { width: 100%; height: clamp(300px, 44vw, 520px); object-fit: contain; margin: 0; border-radius: 0; }
.product-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-media-item { position: relative; min-width: 0; overflow: hidden; border-radius: 10px; background: #080a0e; border: 1px solid rgba(255,255,255,.09); }
.product-media-item a { display: block; }
.product-media-item img, .product-media-item video { display: block; width: 100%; height: 190px; margin: 0; object-fit: contain; background: #05070a; border-radius: 0; }
.product-media-item.is-primary { border-color: rgba(212,175,83,.65); }
.product-media-primary { position: absolute; left: 9px; bottom: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(8,18,38,.88); color: #f0c85a; font-family: 'Rajdhani', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.product-detail-copy { min-width: 0; }
.product-detail-copy form { margin-top: 20px; }
@media (max-width: 920px) {
  .product-gallery-main img { height: min(68vw, 520px); }
}
@media (max-width: 600px) {
  .product-media-grid { grid-template-columns: 1fr; }
  .product-media-item img, .product-media-item video { height: 220px; }
}
