/* GeoTactical Market enhancements: OpticsPlanet-style product list & search, view toggle, price filter */

/* ---- product tiles, styled after leading US tactical retailers (OpticsPlanet) ---- */
.if-brands fieldset{border:0;margin:0;padding:0}
.if-brands legend{font-family:var(--display);font-size:1.02rem;font-weight:700;margin-bottom:12px;padding:0}
.if-brands label{display:flex;align-items:center;gap:9px;padding:7px 0;cursor:pointer;font-size:.9rem;color:var(--muted)}
.if-brands label:hover{color:var(--ink)}
.if-brands input{accent-color:#c8102e;flex:none;width:15px;height:15px}
.if-brands .if-count{margin-left:auto;font-size:.68rem;font-weight:700;color:#a9ae9d;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.09);padding:1px 8px;border-radius:11px;line-height:1.5}
.if-brands label.on{color:var(--ink);font-weight:600}
.if-brand{font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;color:#8d947f;font-weight:700;margin-bottom:2px}
.product-info h3 .product-title-button{color:#f2f0e6;font-weight:700}
.product-info h3 .product-title-button:hover{text-decoration:underline;color:#fff}
.rating svg{color:#f4a83d;fill:#f4a83d}
.rating{color:#d7d5c9}
.rating span{color:#a9ae9d}
.product-bottom{display:flex;flex-direction:column;align-items:stretch;gap:4px}
.product-bottom strong{color:#fff;font-size:1.28rem;letter-spacing:0}
.if-stock{display:flex;align-items:center;gap:5px;color:#e0a63d;font-size:.79rem;font-weight:700}
.if-stock svg{flex:none}
.if-ship{color:#a9ae9d;font-size:.74rem;font-weight:600}
.if-spec{color:#bfc69c;font-size:.76rem;font-weight:600;letter-spacing:.01em;margin:-2px 0 6px}
/* manufacturer specifications on the product page and in the modal */
.gtm-specs{margin:6px 0 14px;color:#c0c5b6;font-size:14px;line-height:1.6}
.gtm-specs-summary{margin:0 0 10px;color:#d7d5c9}
.gtm-specs-fit{margin:0 0 10px;padding:10px 12px;background:#242820;border-left:3px solid #bac492;color:#ecebe2}
.gtm-specs-fit strong{color:#e9e7dc}
.gtm-specs-table{width:100%;border-collapse:collapse;font-size:13px}
.gtm-specs-table th,.gtm-specs-table td{padding:6px 8px 6px 0;border-bottom:1px solid #2c3126;vertical-align:top;text-align:left}
.gtm-specs-table th{color:#a9ae9d;font-weight:600;width:42%;padding-right:12px}
.gtm-specs-table td{color:#ecebe2}
/* Every product carries two or three pictures. Two rules matter here.
   The strip sits BELOW the image frame, never inside it: that frame has a
   fixed height, so a strip within it spilled over the product title. And the
   picture is shown whole — `cover` crops a square card into a landscape frame
   and throws its content outside the visible area, which reads as a blank
   picture rather than as a crop. */
.product-modal .modal-image img,.gtm-po-back .modal-image img{object-fit:contain;background:#161a11;cursor:zoom-in}
/* The close button lived at the top of a box that scrolls, so it left the
   screen as soon as you read past the picture. It now rides a zero-height
   sticky bar pinned to the top of that box, in both layouts. */
.gtm-close-bar{position:sticky;top:0;height:0;z-index:5;grid-column:1/-1}
.gtm-close-bar .modal-close{position:absolute;top:14px;right:14px}
/* Tap the picture to see it whole. */
.gtm-lightbox{position:fixed;inset:0;z-index:10000;background:rgba(9,11,7,.94);display:flex;align-items:center;justify-content:center;padding:16px}
.gtm-lightbox img{max-width:100%;max-height:100%;object-fit:contain;display:block}
.gtm-lb-close,.gtm-lb-nav{position:absolute;background:#1e2318eb;color:#e9e7dc;border:1px solid #3a3e30;border-radius:50%;width:44px;height:44px;font-size:22px;line-height:1;cursor:pointer;display:grid;place-items:center}
.gtm-lb-close{top:16px;right:16px}
.gtm-lb-nav.prev{left:12px;top:50%;transform:translateY(-50%)}
.gtm-lb-nav.next{right:12px;top:50%;transform:translateY(-50%)}
.gtm-lb-count{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);color:#a9ae9d;font-size:13px}
.gtm-gallery{display:flex;gap:8px;padding:10px 14px 12px;flex-wrap:wrap;align-items:flex-start;align-self:start;grid-column:1;background:#1e2318}
.gtm-thumb{padding:0;border:2px solid #2c3126;border-radius:6px;background:#161a11;cursor:pointer;line-height:0;overflow:hidden}
.gtm-thumb img{width:60px;height:60px;object-fit:contain;display:block}
.gtm-thumb.on{border-color:#bac492}
.gtm-thumb:focus-visible{outline:2px solid #bac492;outline-offset:2px}
.gtm-mount{margin-top:10px}
/* Manuals and installation sheets, straight from the maker's own site. */
.gtm-docs{margin:12px 0 0;padding:12px 14px;background:#242820;border-left:3px solid #bac492}
.gtm-docs h4{margin:0 0 8px;font-size:13px;color:#e9e7dc;letter-spacing:.3px}
.gtm-docs ul{margin:0;padding:0;list-style:none}
.gtm-docs li{margin:0 0 6px}
.gtm-docs a{display:flex;align-items:center;gap:8px;color:#dfe3d2;text-decoration:none;font-size:13px;line-height:1.45}
.gtm-docs a:hover,.gtm-docs a:focus{text-decoration:underline;color:#fff}
.gtm-docs .doc-ico{flex:0 0 auto;width:16px;height:16px;color:#bac492}
.gtm-docs .doc-src{color:#8d947f;font-size:12px}
.gtm-docs p{margin:8px 0 0;font-size:12px;color:#8d947f}
.gtm-specs-src{margin:8px 0 0;font-size:12px;color:#8d947f}
.gtm-specs-src a{color:#bfc69c}
.quick-add{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;background:#c8102e;border:1px solid #c8102e;color:#fff;padding:10px 12px;margin-top:7px;font-family:var(--body);font-weight:800;font-size:.82rem;text-transform:uppercase;letter-spacing:.05em;cursor:pointer;transition:background .15s}
.quick-add:hover{background:#a30d25;border-color:#a30d25;color:#fff}
/* Pre-order cards: the button reads "Request" (drawn from data-gtm-label so
   React's own children can repaint without changing what the customer sees). */
.quick-add.gtm-request{font-size:0;gap:0;background:#242820;border-color:#3a4132}
.quick-add.gtm-request svg{display:none}
.quick-add.gtm-request::after{content:attr(data-gtm-label);font-size:.82rem;font-weight:800;letter-spacing:.05em}
.quick-add.gtm-request:hover{background:#3a4132;border-color:#3a4132}
@media(max-width:720px){.quick-add.gtm-request::after{font-size:14px;letter-spacing:0}}
/* Search on phones: the header search hides below 980px and the field lives
   in the menu drawer; this button opens that drawer and focuses the field. */
.gtm-msearch{display:none;align-items:center;justify-content:center;min-width:38px;min-height:38px;padding:4px;background:0 0;border:0;color:inherit;cursor:pointer;flex:0 0 auto}
@media(max-width:980px){.gtm-msearch{display:flex}}
.product-badge{background:#c8102e;color:#fff;font-weight:700}

/* ---- view toggle (grid/list switch) ---- */
.if-view-toggle{display:flex;gap:0;border:1px solid var(--line);background:#1e2318}
.if-view-toggle button{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:0;background:transparent;color:var(--muted);cursor:pointer;transition:all .18s}
.if-view-toggle button.active{background:#c8102e;color:#fff}
.if-view-toggle button:not(.active):hover{color:var(--ink)}

/* ---- list view: OpticsPlanet-style horizontal result rows ---- */
@media (min-width:721px){
  .product-grid.if-list{display:flex;flex-direction:column;gap:12px}
  .product-grid.if-list .product-card{display:grid;grid-template-columns:240px minmax(0,1fr);align-items:stretch}
  .product-grid.if-list .product-image{height:100%;min-height:200px}
  .product-grid.if-list .product-image img{height:100%;object-fit:cover}
  .product-grid.if-list .product-info{display:flex;flex-direction:column;justify-content:center;gap:7px;padding:18px 22px}
  .product-grid.if-list .product-info h3{font-size:1.14rem}
  .product-grid.if-list .product-bottom{margin-top:4px;border-top:1px solid #2c3126;padding-top:10px;flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 16px}
  .product-grid.if-list .product-bottom strong{font-size:1.42rem;margin-right:auto}
  .product-grid.if-list .quick-add{width:auto;min-width:220px;margin-top:0}
}

/* ---- search autocomplete (OpticsPlanet-style suggest with thumbnails & prices) ---- */
.if-ac-host{position:relative}
.if-ac{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:120;background:#1e2318;border:1px solid #363c2e;box-shadow:0 14px 34px rgba(0,0,0,.5);max-height:420px;overflow-y:auto}
.if-ac[hidden]{display:none}
.if-ac-head{font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;color:#8d947f;font-weight:800;padding:10px 14px 4px;border-top:1px solid #2a2f23}
.if-ac-head:first-child{border-top:0}
.if-ac-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;background:transparent;padding:8px 14px;cursor:pointer;color:var(--ink);font-family:var(--body);font-size:.9rem}
.if-ac-item svg{flex:none;color:var(--muted)}
.if-ac-item.sel,.if-ac-item:hover{background:#2a3122}
.if-ac-item b{color:#f06a7c}
.if-ac-thumb{flex:none;width:40px;height:40px;object-fit:cover;border:1px solid #363c2e;background:#14170f}
.if-ac-price{margin-left:auto;flex:none;color:#fff;font-weight:800;font-size:.88rem}
.if-ac-tag{margin-left:auto;flex:none;font-size:.66rem;letter-spacing:.06em;text-transform:uppercase;color:#8d947f;border:1px solid var(--line);padding:2px 7px}

/* ---- price range filter ---- */
.if-price fieldset{border:0;margin:0;padding:0}
.if-price legend{font-family:var(--display);font-size:1.02rem;font-weight:700;margin-bottom:12px;padding:0}
.if-price-row{display:flex;align-items:center;gap:8px}
.if-price-row input{width:100%;min-width:0;border:1px solid var(--line);background:#14170f;padding:9px 10px;font-family:var(--body);font-size:.9rem;color:var(--ink)}
.if-price-row input:focus{outline:2px solid var(--olive);outline-offset:-1px}
.if-price-row span{color:var(--muted);flex:none}
.if-price-apply{margin-top:10px;width:100%;border:1px solid #c8102e;background:#c8102e;color:#fff;padding:9px 12px;font-family:var(--body);font-weight:600;font-size:.88rem;cursor:pointer;transition:all .18s}
.if-price-apply:hover{background:#a30d25}
.if-price-clear{margin-top:8px;width:100%;border:1px solid var(--line);background:transparent;color:var(--muted);padding:7px 12px;font-size:.82rem;cursor:pointer}
.if-price-clear:hover{color:var(--ink);border-color:var(--ink)}
.if-price-note{margin-top:9px;font-size:.8rem;color:#e9e7dc}
.if-empty{padding:34px 8px;color:var(--muted);font-size:.95rem}

/* ---- Georgian text fixes: line-height crush + layout overlaps ---- */
h1,h2,h3{line-height:1.14!important}
.hero-proof{position:static!important;margin-top:26px}
.product-image:has(.regulated-overlay) .condition-badge{bottom:44px!important}

/* ---- account / auth (5.11-style) ---- */
.gtm-auth-backdrop{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.62);display:flex;align-items:center;justify-content:center;padding:18px}
.gtm-auth{width:min(430px,100%);background:#1e2318;border:1px solid #363c2e;box-shadow:0 26px 60px rgba(0,0,0,.6);padding:26px;position:relative}
.gtm-auth h3{font-family:var(--display);font-size:1.5rem;margin:0 0 4px;color:#f2f0e6;line-height:1.2}
.gtm-auth-sub{color:#a9ae9d;font-size:.86rem;margin-bottom:16px}
.gtm-auth-close{position:absolute;top:10px;right:10px;width:34px;height:34px;border:0;background:transparent;color:#a9ae9d;font-size:1.25rem;cursor:pointer}
.gtm-auth-close:hover{color:#fff}
.gtm-auth-tabs{display:flex;border-bottom:1px solid #363c2e;margin-bottom:18px}
.gtm-auth-tabs button{flex:1;border:0;background:transparent;color:#a9ae9d;padding:10px;font-weight:700;font-size:.9rem;cursor:pointer;border-bottom:2px solid transparent;font-family:var(--body)}
.gtm-auth-tabs button.on{color:#fff;border-bottom-color:#c8102e}
.gtm-auth label{display:block;font-size:.78rem;font-weight:700;color:#a9ae9d;margin:12px 0 4px;letter-spacing:.04em;text-transform:uppercase}
.gtm-auth input{width:100%;border:1px solid #363c2e;background:#14170f;color:#e9e7dc;padding:10px 12px;font-family:var(--body);font-size:.92rem}
.gtm-auth input:focus{outline:2px solid #c8102e;outline-offset:-1px}
.gtm-auth-err{color:#f06a7c;font-size:.82rem;margin-top:10px;min-height:1em}
.gtm-auth-submit{margin-top:14px;width:100%;border:0;background:#c8102e;color:#fff;padding:12px;font-weight:800;font-size:.9rem;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;font-family:var(--body)}
.gtm-auth-submit:hover{background:#a30d25}
.gtm-auth-note{margin-top:12px;font-size:.72rem;color:#8d947f}
.gtm-user-dot{position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:#5ecb7d;border:2px solid #14170f}
.gtm-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:290;min-width:220px;background:#1e2318;border:1px solid #363c2e;box-shadow:0 16px 40px rgba(0,0,0,.55);padding:8px}
.gtm-menu-name{padding:8px 10px;color:#f2f0e6;font-weight:700;font-size:.9rem;border-bottom:1px solid #2a2f23;margin-bottom:6px}
.gtm-menu-name small{display:block;color:#8d947f;font-weight:400;font-size:.74rem;margin-top:2px}
.gtm-menu button{width:100%;text-align:left;border:0;background:transparent;color:#e9e7dc;padding:9px 10px;font-size:.88rem;cursor:pointer;font-family:var(--body)}
.gtm-menu button:hover{background:#2a3122}
/* sell page gate */
.gtm-gate-host{position:relative}
.gtm-gate{position:absolute;inset:0;z-index:80;background:rgba(20,23,15,.9);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:24px;text-align:center}
.gtm-gate-box{max-width:430px}
.gtm-gate-box h4{font-family:var(--display);font-size:1.45rem;color:#f2f0e6;margin:0 0 8px;line-height:1.25}
.gtm-gate-box p{color:#a9ae9d;font-size:.92rem;margin:0 0 16px}
.gtm-gate-box .gtm-auth-submit{width:auto;padding:12px 34px}

/* ---- language + currency, one control ----
   These began as two segmented pills side by side in the header. At phone
   width they read as the same control printed twice, and between them they
   pushed the brand into an ellipsis. One button showing the current state,
   opening a panel with both choices, says the same thing in a third of the
   width. */
.gtm-prefs{position:relative;margin-right:10px;vertical-align:middle;display:inline-block}
.gtm-prefs-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 9px;
  border:1px solid #363c2e;background:#1e2318;color:#e9e7dc;font-family:inherit;
  font-weight:800;font-size:.82rem;letter-spacing:.04em;cursor:pointer;line-height:1}
.gtm-prefs-btn:hover{border-color:#4a5136}
.gtm-prefs-btn .gtm-prefs-cur{color:#e9e7dc;padding-left:7px;border-left:1px solid #3d442f}
.gtm-prefs-btn svg{width:9px;height:9px;flex:0 0 9px;transition:transform .15s}
.gtm-prefs[data-open="1"] .gtm-prefs-btn{border-color:#c8102e}
.gtm-prefs[data-open="1"] .gtm-prefs-btn svg{transform:rotate(180deg)}
.gtm-prefs-panel{position:absolute;right:0;top:calc(100% + 7px);z-index:9997;width:190px;
  background:#171b12;border:1px solid #363c2e;padding:11px;
  box-shadow:0 14px 34px -12px rgba(0,0,0,.75)}
.gtm-prefs[data-open="0"] .gtm-prefs-panel{display:none}
.gtm-prefs-panel h4{margin:0 0 5px;font-size:.66rem;font-weight:700;letter-spacing:.13em;
  text-transform:uppercase;color:#8d927f}
.gtm-prefs-panel h4+.gtm-cur-toggle{margin-bottom:13px}
.gtm-prefs-panel .gtm-cur-toggle:last-child{margin-bottom:0}
.gtm-cur-toggle{display:flex;border:1px solid #363c2e;background:#1e2318}
.gtm-cur-toggle button{flex:1;height:32px;border:0;background:transparent;color:#a9ae9d;
  font-weight:800;font-size:.82rem;cursor:pointer;font-family:inherit;white-space:nowrap}
.gtm-cur-toggle button.active{background:#c8102e;color:#fff}
.gtm-cur-toggle button:not(.active):hover{color:#e9e7dc}

  /* ---- pre-order dialog (replaces the dead payment checkout) ---- */
  .gtm-po-back{position:fixed;inset:0;background:rgba(9,11,7,.72);z-index:9998;display:flex;align-items:center;justify-content:center;padding:18px}
  .gtm-po{background:#171b12;border:1px solid #363c2e;width:100%;max-width:520px;max-height:92vh;overflow:auto;padding:22px 22px 18px;font-family:inherit}
  .gtm-po h3{margin:0 0 4px;font-size:1.18rem;color:#e9e7dc}
  .gtm-po .gtm-po-sub{margin:0 0 16px;color:#a9ae9d;font-size:.88rem;line-height:1.5}
  .gtm-po-items{border:1px solid #2b3124;background:#12150e;padding:10px 12px;margin:0 0 16px;max-height:170px;overflow:auto}
  .gtm-po-items div{display:flex;justify-content:space-between;gap:10px;font-size:.85rem;color:#c8ccbb;padding:3px 0}
  .gtm-po-items div span:first-child{flex:1}
  .gtm-po-total{display:flex;justify-content:space-between;font-weight:800;color:#e9e7dc;border-top:1px solid #2b3124;margin-top:6px;padding-top:8px}
  .gtm-po label{display:block;margin:0 0 11px}
  .gtm-po label span{display:block;font-size:.8rem;color:#a9ae9d;margin:0 0 4px}
  .gtm-po input,.gtm-po select,.gtm-po textarea{width:100%;background:#0f1209;border:1px solid #363c2e;color:#e9e7dc;padding:10px 11px;font-family:inherit;font-size:.95rem}
  .gtm-po textarea{min-height:64px;resize:vertical}
  .gtm-po-row{display:flex;gap:10px}
  .gtm-po-row label{flex:1}
  .gtm-po-err{color:#e8705f;font-size:.85rem;min-height:18px;margin:2px 0 8px}
  .gtm-po-actions{display:flex;gap:10px;margin-top:6px}
  .gtm-po-actions button{flex:1;padding:12px;border:0;font-family:inherit;font-weight:800;font-size:.95rem;cursor:pointer}
  .gtm-po-go{background:#c8102e;color:#fff}
  .gtm-po-go[disabled]{opacity:.6;cursor:default}
  .gtm-po-cancel{background:transparent;color:#a9ae9d;border:1px solid #363c2e !important}
  .gtm-po-ok{text-align:center;padding:14px 0 4px}
  .gtm-po-ref{font-family:ui-monospace,Menlo,monospace;font-size:1.42rem;font-weight:700;color:#e9e7dc;background:#12150e;border:1px dashed #4a5136;padding:12px;margin:12px 0}
  @media (max-width:520px){ .gtm-po{padding:18px 15px 14px} .gtm-po-row{flex-direction:column;gap:0} }

  /* ---- mobile header: keep the cart on screen ----
     The header row is menu + brand + [language] + [currency] + cart. Adding
     the language toggle pushed the currency toggle to x=392 and the cart to
     x=494 on a 390px viewport — both off the right edge, and invisible
     rather than scrollable because the row is clipped. The cart matters most,
     so below 560px the brand gives up its tagline and the toggles shrink. */
  @media (max-width:560px){
    .header-main{gap:6px;padding-left:8px;padding-right:8px}
    .header-actions{gap:6px !important;margin-left:auto;flex:0 0 auto}
    .brand{gap:7px !important;min-width:0}
    .brand-words{min-width:0}
    .brand-words strong{font-size:15px !important;letter-spacing:.02em !important;
      white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40vw}
    .brand-words small{display:none !important}
    .brand-mark{width:28px !important;height:28px !important;flex:0 0 28px}
    .gtm-prefs{margin-right:0 !important}
    .gtm-prefs-btn{height:32px;padding:0 7px;gap:4px;font-size:.76rem}
    /* The hairline divider costs 8px of row. At 360px that was enough to
       push the cart past the right edge, so it tightens rather than the
       cart moving. */
    .gtm-prefs-btn .gtm-prefs-cur{padding-left:4px}
    .bag-action{min-width:38px !important;min-height:38px !important;padding:4px !important;flex:0 0 auto}
    .mobile-menu-button{flex:0 0 auto}
  }
  /* Only genuinely tiny screens drop the language toggle. 360px Android
     phones are common and fit everything, so the threshold sits below them;
     the cart is what must never be sacrificed. */
  @media (max-width:349px){
    .gtm-prefs-btn{padding:0 6px;gap:4px}
    .brand-words strong{max-width:32vw}
  }

.if-ship-none{color:#c9a25a}
.if-ship-seller{color:#8d927f}
.radio-row .if-count{margin-left:auto;font-size:.68rem;font-weight:700;color:#a9ae9d;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.09);padding:1px 8px;border-radius:11px;line-height:1.5}
.gtm-policy ul{list-style:none;margin:14px 0 4px;padding:0}
.gtm-policy li{font-size:.84rem;line-height:1.55;color:#a9ae9d;padding:10px 0;border-top:1px solid rgba(255,255,255,.08)}
.gtm-policy li:first-child{border-top:0}
.gtm-policy li strong{color:#e8eadf;display:block;margin-bottom:2px}

.gtm-faq{border-top:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.02);padding:44px 0 52px}
.gtm-faq-inner{max-width:860px;margin:0 auto;padding:0 20px}
.gtm-faq h2{font-size:1.25rem;color:#e8eadf;margin:0 0 18px}
.gtm-faq details{border:1px solid rgba(255,255,255,.09);border-radius:10px;margin:0 0 10px;background:rgba(255,255,255,.03)}
.gtm-faq summary{cursor:pointer;padding:13px 16px;font-weight:700;font-size:.9rem;color:#d9dccf;list-style:none;display:flex;justify-content:space-between;align-items:center}
.gtm-faq summary::after{content:'+';color:#c8102e;font-size:1.1rem;font-weight:800}
.gtm-faq details[open] summary::after{content:'–'}
.gtm-faq details p{margin:0;padding:0 16px 14px;font-size:.85rem;line-height:1.6;color:#a9ae9d}
