/* =========================
   FULL CSS DROP-IN (UPDATED v3)
   WHAT CHANGED (DESKTOP GALLERY ONLY):
   ✅ Main image can shrink as needed (so higher image counts still fit)
   ✅ Thumb HEIGHT stays locked to main image height (2 rows = exact match)
   ✅ Thumb WIDTH auto-scales down if needed (no cut-off / no scroll)
   ✅ Mobile gallery untouched
========================= */

/* ===== Base ===== */
* { box-sizing: border-box; }

:root{
  --header-h: 64px;
  --hud-green: #5CFF5C;

  /* Gallery defaults (desktop JS may override these) */
  --g-gap: 14px;
  --g-mainThumbGap: 26px;
  --g-h: 380px;
  --g-thumb-h: 183px;
  --g-thumb-w: 293px;
  --g-main-w: 520px;
}

html { scroll-padding-top: 140px; scroll-behavior: smooth; }

body {
  font-family: 'Archivo', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
  background: linear-gradient(180deg,#ffffff 0%,#f3f3f3 40%,#e5e5e5 100%);
}

/* Layer that shakes (NOT body) */
#shake-layer{ min-height: 100vh; }

/* ===== Header ===== */
header {
  background-color: #0e0e0e;
  color: white;
  text-align: center;
  padding: 16px 0;
  margin-bottom: 50px;
  position: sticky;
  top: 0;
  z-index: 1200;
  transition: padding 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
header h1 {
  font-family: 'Rowdies', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 1px;
  transition: transform 0.25s ease;
  margin: 0;
}
header.shrink {
  padding: 6px 0;
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}
header.shrink h1 { transform: scale(0.92); }

.header-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 22px;
  gap: 14px;
}
.header-nav{
  display:flex;
  align-items:center;
  gap: 18px;
}
.header-nav a,
.header-nav button{
  background:none;
  border:none;
  padding:0;
  margin:0;
  font-family:'Archivo', sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color:#ffffff;
  cursor:pointer;
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap: 8px;
  text-decoration:none;
}
.header-nav a:hover,
.header-nav button:hover{ opacity: 0.95; }
header a { text-decoration: none; color: #fff; }

.header-cart-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0 4px;
  background: #2ecc71;
  color: #0e0e0e;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.header-nav a.active{ position: relative; opacity: 1; }
.header-nav a.active::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-10px;
  width:5px;
  height:5px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
}

/* ===== Layout ===== */
.store-layout { display:flex; width:100%; }

/* Sidebar (desktop) */
.sidebar{
  position: fixed;
  top: 135px;
  left: 0;
  width: 240px;
  background: transparent;
  color: #444;
  padding: 30px 25px;
  height: auto;
  z-index: 100;
}
.category-list{ list-style:none; padding-left:15px; margin:0; }
.category-list li{ margin-bottom:60px; }
.category-list a{
  font-size: 0.85rem;
  font-family: 'Special Gothic Expanded One', sans-serif;
  color: #667;
  text-decoration:none;
  font-weight:bold;
  text-transform: uppercase;
  position: relative;
  display:inline-block;
  transition: all 0.3s ease;
}
.category-list a::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-2px;
  width:0%;
  height:2px;
  background-color:#444;
  transition: width 0.3s ease;
}
.category-list a:hover{ padding-left:5px; }
.category-list a:hover::after{ width:100%; }

/* Divider line */
.sidebar-divider-visual{
  position: fixed;
  top: 160px;
  bottom: 60px;
  width: 1px;
  background-color: #ccc;
  left: 235px;
  z-index: 5;
}

/* Product Area (desktop) */
.product-area{
  margin-left: 320px;
  width: calc(100% - 320px);
  padding: 30px;
  overflow-y: auto;
}
.product-category{ margin-bottom:50px; }
.product-category h2{
  font-family: 'Special Gothic Expanded One', sans-serif;
  font-size: 1.1rem;
  color: #667;
  margin-bottom: 45px;
}

/* Horizontal product rails */
.product-list{
  display:flex;
  flex-direction:row;
  gap: 100px;
  overflow-x:auto;
  width:100%;
  padding-bottom:10px;
  scroll-snap-type: x mandatory;
}
.product-list::-webkit-scrollbar{ height:8px; }
.product-list::-webkit-scrollbar-thumb{ background:#ccc; border-radius:4px; }

/* Product Card */
.product{
  flex: 0 0 auto;
  width: 280px;
  scroll-snap-align: start;
  background: transparent;
  padding: 0;
  border: none;
  text-align: center;
  box-shadow: none;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
  cursor: pointer;
  position: relative;
}
.product:hover{ transform: translateY(-2px); }
.product img{
  width:100%;
  height: 320px;
  object-fit: cover;
  border-radius:5px;
}
.product h3{ color:#444; font-size:1rem; margin:10px 0 4px 0; }
.product p{ font-size:1em; color:#444; margin:2px 0 4px 0; }
.product button{
  background-color: transparent;
  color:#444;
  padding: 8px 16px;
  border:none;
  text-transform: uppercase;
  cursor:pointer;
  font-size:14px;
  margin-top:2px;
  transition: background 0.2s ease;
}
.product button:hover{ background-color:#eee; }

@keyframes fadeInUp{
  from{ opacity:0; transform: translateY(20px); }
  to{ opacity:1; transform: translateY(0); }
}
.fade-in{ animation: fadeInUp 0.6s ease forwards; }

/* Floating Cart Button + count */
.floating-cart-btn{
  position: fixed;
  bottom: 50px;
  left: 50px;
  right: auto;
  background-color: #0e0e0e;
  color: white;
  font-family: 'Rowdies', sans-serif;
  font-size: 14px;
  padding: 22px 34px;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1100;
  transition: background 0.3s ease, transform 0.2s ease;
}
.floating-cart-btn:hover{ background-color:#1c1c1c; transform: translateY(-2px); }
.cart-count-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  margin-left:10px;
  padding:0 6px;
  background:#2ecc71;
  color:#0e0e0e;
  border-radius:999px;
  font-weight:700;
  font-size:12px;
}

/* ===== Modals (Shared) ===== */
.cart-modal,
.modal-overlay{
  display:none;
  position: fixed;
  inset:0;
  justify-content:center;
  align-items:center;
  opacity:0;
  visibility:hidden;
  z-index: 1300;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.cart-modal{ background-color: rgba(0,0,0,0.5); }
.modal-overlay{ background-color: rgba(0,0,0,0.55); backdrop-filter: blur(4px); }

.cart-modal.show,
.modal-overlay.show{
  display:flex;
  opacity:1;
  visibility: visible;
}

.close-cart{
  position:absolute;
  top:10px;
  right:20px;
  background-color:red;
  color:white;
  padding:10px;
  border:none;
  font-size:18px;
  border-radius:50%;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

/* Cart Content */
.cart-content{
  background-color:white;
  padding:30px;
  border-radius:8px;
  width:80%;
  text-align:center;
  max-height:90vh;
  overflow-y:auto;
  position:relative;
}

/* Cart list + item */
.cart-items{
  display:flex;
  flex-direction:row;
  align-items:stretch;
  overflow-x:auto;
  gap:12px;
  justify-content:flex-start;
  padding:10px 10px 10px 12px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 12px;
}
.cart-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  position:relative;
  background-color:#fff;
  min-width:220px;
  max-width:220px;
  flex-shrink:0;
  border-radius:8px;
  padding:10px;
  scroll-snap-align:start;
}
.cart-image-container{ position:relative; width:100%; }
.cart-item img{
  width:100%;
  height:160px;
  object-fit:cover;
  border-radius:8px;
}
.price-overlay{
  position:absolute;
  bottom:5px;
  left:5px;
  color: green;
  background: rgba(255,255,255,0.85);
  padding: 3px 6px;
  font-size:14px;
  font-weight:bold;
  border-radius:4px;
  z-index:2;
}
.quantity-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:8px;
}
.qty-btn{
  width:24px;
  height:24px;
  background:#000;
  color:#fff;
  font-size:16px;
  font-weight:bold;
  border:none;
  border-radius:50%;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: background 0.2s ease;
}
.qty-btn:hover{ background:#333; }

.remove-item{
  position:absolute;
  top:5px;
  right:5px;
  background:red;
  color:white;
  border:none;
  border-radius:50%;
  width:24px;
  height:24px;
  font-size:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: background 0.2s ease;
}
.remove-item:hover{ background: darkred; }

.cart-item.fade-out{
  opacity:0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#cart-total{
  font-size:1.4rem;
  font-weight:bold;
  margin:24px 0 40px;
}

/* Cart Actions */
.cart-actions{
  display:flex;
  justify-content:center;
  gap:15px;
  margin-top:20px;
}
.cart-actions button{
  font-family:'Rowdies', sans-serif;
  padding:16px 28px;
  border:none;
  border-radius:999px;
  font-size:13px;
  text-transform: uppercase;
  cursor:pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, background-color 0.3s ease;
}
.cart-actions button:hover{ transform: translateY(-2px); }
#request-order{ background-color:#001f3f; color:white; }
#clear-cart{ background-color:#900; color:white; }
#paypal-button-container{ display:flex; justify-content:center; }

/* Toast */
.add-notification{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  background:#0e0e0e;
  color:white;
  font-size:14px;
  padding:10px 20px;
  border-radius:30px;
  opacity:0;
  pointer-events:none;
  z-index:3000;
  transition: opacity 0.25s ease, transform 0.25s ease;
  bottom:40px;
}
.add-notification.show{
  opacity:1;
  transform: translate(-50%, -20px);
}

/* Disabled/coming soon */
.disabled-button{
  background-color:#888 !important;
  color:#fff !important;
  cursor:not-allowed !important;
  opacity:0.6;
}
.coming-soon{ opacity:0.2; transition: opacity 0.3s ease; }
.coming-soon:hover{ opacity:0.7; }

/* Coming Soon overlay */
.product .notify-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 6px;
  pointer-events: none;
}
.product .notify-btn {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
}
.product:hover .notify-overlay { opacity: 1; pointer-events: auto; }

/* ===== Size modal ===== */
#size-modal{ display:none; }
#size-modal.show{ display:flex; }
.size-options{
  display:flex;
  gap:20px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
}
.size-option{
  width:80px;
  height:80px;
  border-radius:50%;
  border:2px solid white;
  background:transparent;
  color:white;
  font-size:20px;
  font-weight:bold;
  cursor:pointer;
  transition: all 0.2s ease;
  display:flex;
  justify-content:center;
  align-items:center;
}
.size-option:hover{ background: rgba(255,255,255,0.15); }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-content{
  background:none;
  box-shadow:none;
  border-radius:0;
  padding:0;
  position:relative;

  --g-gap: 14px;
  --g-mainThumbGap: 26px;
  --g-h: 380px;
  --g-thumb-h: 183px;
  --g-thumb-w: 293px;
  --g-main-w: 520px;

  display:grid;
  grid-template-columns: 1fr;
  row-gap: 14px;
  width: min(94vw, 1180px);
  margin: 0 auto;
}

.gallery-size-bar{
  grid-column: 1 / -1;
  margin: 0 0 10px 0;
  text-align:center;
}
.gallery-size-label{
  font-family:'Archivo', sans-serif;
  font-size:0.75rem;
  letter-spacing:0.25em;
  color:#999;
  display:block;
  margin-bottom:8px;
}
.gallery-size-options{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:22px;
}

.gallery-main{
  position:relative;
  width:100%;
  background:#ffffff;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 52px;
}
#gallery-main-img{
  width:100%;
  height:100%;
  object-fit: contain;
  background: transparent;
}

.gallery-nav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  border:none;
  width:46px;
  height:46px;
  border-radius:50%;
  font-size:22px;
  cursor:pointer;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display:grid;
  place-items:center;
  user-select:none;
}
.gallery-nav.prev{ left:16px; }
.gallery-nav.next{ right:16px; }

#close-gallery{
  position:absolute;
  top:-22px;
  right:-22px;
  width:56px;
  height:56px;
  border-radius:50%;
  border:none;
  background:transparent;
  cursor:pointer;
  color:red;
  font-size:40px;
  line-height:56px;
  text-align:center;
  font-weight:700;
  z-index:5;
}

/* =========================
   DESKTOP (auto-shrink main as thumbs increase)
   ========================= */
@media (min-width: 721px){
  .gallery-content{
    /* Height always fits screen */
    --g-h-safe: min(var(--g-h), calc(100vh - 220px));
    --g-thumb-h-safe: calc((var(--g-h-safe) - var(--g-gap)) / 2);

    /* Thumb width can scale down if many columns are needed */
    --g-thumb-w-safe: clamp(140px, 17vw, var(--g-thumb-w));

    /* Main width is flexible: it will shrink down to keep thumbs visible */
    grid-template-columns: minmax(320px, 1fr) max-content;
    column-gap: var(--g-mainThumbGap);
    align-items: start;
    justify-content: center;
  }

  .gallery-size-bar{ grid-column: 1 / -1; }

  .gallery-main{
    height: var(--g-h-safe);
    box-shadow: 0 18px 52px rgba(0,0,0,0.32);
    /* Optional: keep the main panel from ever getting *too* huge */
    max-width: min(var(--g-main-w), 72vw);
    justify-self: start;
  }

  #gallery-thumbs.gallery-thumbs{
    height: var(--g-h-safe);
    align-items: stretch;
    max-width: 100%;
    overflow: hidden; /* no scroll */
  }

  /* If your JS builds columns (.thumb-col) */
  #gallery-thumbs.gallery-thumbs .thumb-col{
    width: var(--g-thumb-w-safe);
    height: 100%;
    display:flex;
    flex-direction: column;
    gap: var(--g-gap);
    flex: 0 0 auto;
    justify-content: flex-start;
  }
  #gallery-thumbs.gallery-thumbs .thumb-col.odd-col{ justify-content: center; }

  /* If thumbs are direct <img> children */
  #gallery-thumbs.gallery-thumbs:not(:has(.thumb-col)){
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: var(--g-thumb-w-safe);
    grid-template-rows: repeat(2, var(--g-thumb-h-safe));
    gap: var(--g-gap);
    align-items: stretch;
    justify-content: start;
    height: var(--g-h-safe);
    overflow: hidden; /* no scroll */
  }

  /* Thumb images */
  #gallery-thumbs.gallery-thumbs > img,
  #gallery-thumbs.gallery-thumbs .thumb-col > img{
    width: 100%;
    height: var(--g-thumb-h-safe); /* 🔒 locked to main height */
    object-fit: cover;
    border-radius: 22px;
    background:#fff;
    box-shadow: 0 10px 26px rgba(0,0,0,0.22);
    border: 2px solid transparent;
    opacity: 0.94;
    transition: opacity .15s ease, border-color .15s ease, transform .12s ease;
    cursor:pointer;
    display:block;
  }
  #gallery-thumbs.gallery-thumbs > img:hover,
  #gallery-thumbs.gallery-thumbs .thumb-col > img:hover{ opacity: 1; transform: translateY(-1px); }
  #gallery-thumbs.gallery-thumbs > img.active,
  #gallery-thumbs.gallery-thumbs .thumb-col > img.active{ opacity: 1; border-color:#111; }

  /* Odd direct-img count: last one centers in its column */
  #gallery-thumbs.gallery-thumbs:not(:has(.thumb-col)) > img:last-child:nth-child(odd){
    grid-row: 1 / span 2;
    align-self: center;
  }
}

/* =========================
   MOBILE GALLERY (UNCHANGED)
   ========================= */
@media (max-width: 720px){
  .gallery-content{
    grid-template-columns: 1fr;
    row-gap: 12px;
    max-width: 94vw;
  }

  .gallery-main{
    border-radius: 24px;
    aspect-ratio: 3 / 2;
  }
  #gallery-main-img{ border-radius: 24px; }

  #gallery-thumbs.gallery-thumbs{
    display:flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    height:auto;
    overflow: visible;
  }

  #gallery-thumbs.gallery-thumbs > img{
    width: clamp(84px, 26vw, 128px) !important;
    aspect-ratio: 4 / 3;
    height:auto;
    object-fit: cover;
    border-radius: 18px;
    background:#fff;
    box-shadow: 0 10px 26px rgba(0,0,0,0.18);
    border: 2px solid transparent;
  }

  .gallery-nav{
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* ============================================================
   CROSSHAIR HUD
   ============================================================ */
#crosshair-overlay{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5000;
}
#crosshair-vert,
#crosshair-horiz{
  position:absolute;
  background: var(--hud-green);
  opacity: 0.85;
  box-shadow: 0 0 8px var(--hud-green), 0 0 16px rgba(92, 255, 92, 0.7);
}
#crosshair-vert{ top:0; bottom:0; width:1px; }
#crosshair-horiz{ left:0; right:0; height:1px; }

#crosshair-coords{
  position:absolute;
  min-width:60px;
  background:transparent;
  color: var(--hud-green);
  font-size:11px;
  font-family:'Archivo', monospace;
  line-height:1.2;
  text-shadow: 0 0 4px var(--hud-green), 0 0 8px rgba(92,255,92,0.9);
  white-space:nowrap;
}
#crosshair-coords .coord-row{ display:flex; gap:4px; }
#crosshair-coords .coord-label{ font-weight:700; letter-spacing:0.05em; }

#crosshair-overlay,
#crosshair-vert,
#crosshair-horiz,
#crosshair-coords{
  display: block !important;
  visibility: visible !important;
}

/* Scroll to top */
#scrollTopBtn{
  display:none;
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  font-size:18px;
  background-color:#333;
  color:white;
  border:none;
  padding:10px 14px;
  border-radius:6px;
  cursor:pointer;
}
#scrollTopBtn:hover{ background-color:#555; }

/* ============================================================
   MOBILE LAYOUT
   ============================================================ */
@media (max-width: 900px){
  header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    border-radius: 0;
    transition:
      transform 0.35s ease,
      width 0.35s ease,
      border-radius 0.35s ease,
      box-shadow 0.35s ease,
      top 0.35s ease,
      padding 0.35s ease,
      opacity 0.25s ease;
  }

  header.shrink{
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 94vw;
    border-radius: 999px;
    background: rgba(0,0,0,0.83);
    border: 0.5px solid rgba(255,255,255,0.7);
    padding: 8px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  }

  header.shrink.compact{
    width: 66vw;
    padding: 6px 0;
  }

  .sidebar,
  .sidebar-divider-visual{ display:none !important; }

  .product-area{
    margin-left: 0 !important;
    width: 100% !important;
    padding: 70px 16px 16px;
  }

  .product-list{
    gap: 28px;
    padding-left: 20px;
    padding-right: 20px;
    scroll-snap-type: x proximity;
    scroll-padding-left: 20px;
  }

  .product{
    flex: 0 0 75vw;
    max-width: 75vw;
  }

  .product img{
    height: 330px;
    border-radius: 6px;
  }

  .floating-cart-btn{
    left: 16px;
    right: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: none;
    padding: 14px 18px;
    font-size: 13px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }
}

/* Ultra-small phones */
@media (max-width: 360px){
  .cart-item{ min-width: 200px; max-width: 200px; }
  .cart-item img{ height: 140px; }
}

/* Desktop header behavior */
@media (min-width: 901px){
  header{
    position: sticky;
    top: 0;
    left: auto;
    transform: none;
    width: 100%;
    border-radius: 0;
    margin: 0;
    background-color: #0e0e0e;
    border: none;
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }

  header.shrink{
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: min(980px, 86vw);
    border-radius: 999px;
    background: rgba(0,0,0,0.82);
    border: 0.5px solid rgba(255,255,255,0.70);
    padding: 10px 0;
    box-shadow: 0 10px 22px rgba(0,0,0,0.28);
    z-index: 1200;
  }

  header.shrink.compact{
    width: min(720px, 62vw);
    padding: 7px 0;
  }

  .product-area{ padding-top: 105px; }
}

/* ICON/TEXT SWITCH (all sizes) */
.header-nav img{
  display:none;
  width:16px;
  height:16px;
  object-fit:contain;
}
header.shrink.compact .header-nav img{ display:inline-block !important; }
header.shrink.compact .header-nav span{ display:none !important; }
header.shrink.compact #header-cart-count{ display:inline-flex !important; }

/* ===== Shake ===== */
#shake-layer{ transform: translateZ(0); will-change: transform; }
#shake-layer.screen-shake{ animation: screenShake 140ms linear; }
@keyframes screenShake{
  0%{ transform: translate(0,0); }
  20%{ transform: translate(-1px, 1px); }
  40%{ transform: translate(1px, -1px); }
  60%{ transform: translate(-1px, -1px); }
  80%{ transform: translate(1px, 1px); }
  100%{ transform: translate(0,0); }
}

/* ===== Muzzle Flash ===== */
#muzzle-bloom{
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 92% 88%,
    rgba(255,255,255,0.55) 0%,
    rgba(255,255,255,0.22) 22%,
    rgba(255,255,255,0.00) 55%);
  mix-blend-mode: screen;
}
#muzzle-flash{
  position: fixed;
  right: 265px;
  bottom: 130px;
  width: 110px;
  height: 110px;
  z-index: 9100;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle,
    rgba(255,245,200,0.95) 0%,
    rgba(255,210,120,0.65) 18%,
    rgba(255,170,60,0.25) 40%,
    rgba(255,140,20,0.0) 70%);
  filter: drop-shadow(0 0 18px rgba(255,220,140,0.55));
  transform-origin: 70% 70%;
}
#muzzle-bloom.flash{ animation: bloomFlash 120ms ease-out; }
@keyframes bloomFlash{ 0%{opacity:0;} 20%{opacity:1;} 100%{opacity:0;} }
#muzzle-flash.flash{ animation: muzzleFlash 90ms ease-out; }
@keyframes muzzleFlash{
  0%{ opacity:0; transform: scale(0.75) rotate(-8deg); }
  35%{ opacity:1; transform: scale(1.08) rotate(6deg); }
  100%{ opacity:0; transform: scale(0.92) rotate(0deg); }
}
@media (max-width: 900px){
  #muzzle-flash{
    right: 140px;
    bottom: 80px;
    width: 130px;
    height: 130px;
  }
}

/* ============================================================
   AK (ONE CLEAN RULESET — prevents overrides)
   Aligns idle + fire exactly (poster OR separate #ak-idle img)
   ============================================================ */

#ak-widget{
  position: fixed;
  right: 70px;
  bottom: -14px;
  z-index: 9999;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 0;            /* prevents inline weirdness */
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;

  width: 460px;
  max-width: 36vw;

  /* TUNE THESE to nudge BOTH idle + fire together */
  --ak-pos-x: 50%;
  --ak-pos-y: 50%;
}

/* Create a consistent “frame” so poster + video share the SAME box */
#ak-widget{
  aspect-ratio: 16 / 9;      /* adjust if your asset is different */
}

/* If you use ONLY <video poster="ak_idle.png"> */
#ak-video{
  width: 120%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: var(--ak-pos-x) var(--ak-pos-y);
  border-radius: 10px;
  background: transparent;
}

/* If you ALSO have <img id="ak-idle"> layered (some versions do) */
#ak-idle{
  position: absolute;
  inset: 0;
  width: 120%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: var(--ak-pos-x) var(--ak-pos-y);
  border-radius: 10px;
  user-select: none;
  -webkit-user-drag: none;
}

/* If you are using the “playing” class overlay approach */
#ak-widget{
  position: fixed;
}
#ak-widget{ overflow: visible; }
#ak-widget{ display: block; }
#ak-widget{ pointer-events: auto; }

/* Optional recoil (kept compatible) */
#ak-widget.ak-recoil{
  animation: akRecoil 110ms ease-out;
}
@keyframes akRecoil{
  0%   { transform: translate(0,0) scale(1); }
  35%  { transform: translate(-6px, 4px) scale(0.992); }
  100% { transform: translate(0,0) scale(1); }
}

/* Hide AK safely (your JS toggles this class) */
#ak-widget.ak-hidden{
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: translateY(8px) !important;
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}

/* MOBILE sizing/placement */
@media (max-width: 900px){
  #ak-widget{
    right: 8px;
    bottom: calc(-15px + env(safe-area-inset-bottom));
    width: 560px;
    max-width: 78vw;

    /* If it’s still diagonally off on mobile, adjust here */
    /* --ak-pos-x: 50%; */
    /* --ak-pos-y: 50%; */
  }
}

/* ============================================================
   MOBILE FIXES: Cart above AK + Coordinate stack rework
   (PASTE AT VERY BOTTOM OF CSS)
   ============================================================ */
@media (max-width: 900px){

  /* --- 1) Make sure the cart button layer is ABOVE the AK widget --- */
  .floating-cart-btn{
    z-index: 9800 !important;     /* higher than AK */
    pointer-events: auto !important;
  }

  #ak-widget{
    z-index: 7600 !important;     /* lower than cart button */
  }

  /* --- 2) Coordinate stack: fixed to screen + "field-like" area (no box) --- */
  #click-coords-stack{
    position: fixed !important;

    /* place it lower on screen (around 4th quartile) */
    left: 16px !important;
    top: 62vh !important;         /* adjust: 58–70vh if you want */
    bottom: auto !important;

    z-index: 9200 !important;
    pointer-events: none !important;

    /* list behavior: top -> down */
    display: flex !important;
    flex-direction: column !important;  /* top to bottom */
    align-items: flex-start !important;
    gap: 8px !important;

    /* no decorated container */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;

    /* keep it from becoming huge */
    max-height: 32vh !important;
    max-width: 70vw !important;
    overflow: hidden !important;
  }

  /* --- 3) Each coord: same lifetime, but animate in and fade/slide LEFT --- */
  .click-coord{
    opacity: 0;
    transform: translateX(10px);
    animation:
      coordIn 200ms ease-out forwards,
      coordFadeLeft 280ms ease-in forwards;
    animation-delay: 0ms, 5500ms;       /* same timing as your original */
    will-change: transform, opacity;
  }

  @keyframes coordIn{
    to{ opacity: 1; transform: translateX(0); }
  }

  @keyframes coordFadeLeft{
    to{ opacity: 0; transform: translateX(-18px); }
  }
}

/* =========================================================
   COORD STACK (MOBILE): LOWER IT + MATCH HUD GREEN
   Paste at VERY BOTTOM of styles.css
   ========================================================= */

/* Make sure the coordinate stack is locked to the screen */
#click-coords-stack{
  position: fixed !important;
  left: 14px !important;

  /* ✅ LOWER IT: increase this value to move it LOWER */
  top: 72vh !important;

  bottom: auto !important;
  z-index: 6000 !important;
  pointer-events: none !important;

  display: flex !important;
  flex-direction: column !important;  /* top -> down */
  align-items: flex-start !important;
  gap: 8px !important;
  max-width: 60vw !important;
}

/* Neon green like crosshair HUD */
.click-coord{
  color: var(--hud-green, #5CFF5C) !important;
  font-family: 'Archivo', monospace !important;
  font-size: 12px !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
  text-shadow:
    0 0 4px var(--hud-green, #5CFF5C),
    0 0 10px rgba(92,255,92,0.55) !important;
}

/* ✅ Fade-out to the LEFT (since you said “fade off to the left”) */
@keyframes coordFadeOutLeft{
  to{ opacity:0; transform: translateX(-14px); }
}

/* Keep your “new one appears at top” behavior (you already use prepend) */
.click-coord{
  opacity: 0;
  transform: translateX(0);
  animation:
    coordSlideIn 220ms ease-out forwards,
    coordFadeOutLeft 280ms ease-in forwards;
  animation-delay: 0ms, 5500ms;
}

@keyframes coordSlideIn{
  to{ opacity:1; transform: translateX(0); }
}
/* =========================================================
   RESTORE GLASS CART (FINAL OVERRIDE)
   ========================================================= */

.cart-modal{
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.cart-content{
  position: relative;
  overflow: hidden;

  /* glass surface */
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.70) 0%,
      rgba(255,255,255,0.46) 40%,
      rgba(255,255,255,0.34) 100%
    );

  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);

  border: 1px solid rgba(255,255,255,0.40);

  box-shadow:
    0 28px 70px rgba(0,0,0,0.35),
    0 2px 0 rgba(255,255,255,0.22) inset,
    0 0 0 0.5px rgba(255,255,255,0.35) inset;
}

/* top light sheen */
.cart-content::before{
  content:"";
  position:absolute;
  inset:-30% -20% auto -20%;
  height:55%;
  transform: rotate(-8deg);
  background: radial-gradient(
    circle at 30% 35%,
    rgba(255,255,255,0.70),
    rgba(255,255,255,0.10) 55%,
    rgba(255,255,255,0.00) 70%
  );
  pointer-events:none;
  mix-blend-mode: screen;
}

/* moving glass streak */
.cart-content::after{
  content:"";
  position:absolute;
  left:-15%;
  right:-15%;
  top:22%;
  height:18%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.00),
    rgba(255,255,255,0.28),
    rgba(255,255,255,0.00)
  );
  filter: blur(8px);
  opacity:0.56;
  pointer-events:none;
}

/* keep cart items glassy too */
.cart-item{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 14px 34px rgba(0,0,0,0.14);
}

/* =========================================================
   FAiBALi LIQUID GLASS CART (FINAL LAYER)
   ========================================================= */

.cart-modal{
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* MAIN GLASS PANEL */
.cart-content{
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.72) 0%,
      rgba(255,255,255,0.48) 40%,
      rgba(255,255,255,0.34) 100%
    );

  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);

  border: 1px solid rgba(255,255,255,0.40);

  box-shadow:
    0 28px 70px rgba(0,0,0,0.35),
    0 2px 0 rgba(255,255,255,0.22) inset,
    0 0 0 0.5px rgba(255,255,255,0.35) inset;

  /* movement vars */
  --glass-x: 50%;
  --glass-y: 30%;
}

/* SOFT LIGHT BLOOM */
.cart-content::before{
  content:"";
  position:absolute;
  inset:-30% -20% auto -20%;
  height:55%;
  transform: rotate(-8deg);

  background: radial-gradient(
    circle at var(--glass-x) var(--glass-y),
    rgba(255,255,255,0.70),
    rgba(255,255,255,0.10) 55%,
    rgba(255,255,255,0.00) 70%
  );

  pointer-events:none;
  mix-blend-mode: screen;
  transition: background-position 120ms linear;
}

/* GLASS SHEEN STRIP */
.cart-content::after{
  content:"";
  position:absolute;
  left:-15%;
  right:-15%;
  top:22%;
  height:18%;

  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.00),
    rgba(255,255,255,0.28),
    rgba(255,255,255,0.00)
  );

  filter: blur(8px);
  opacity:0.55;
  pointer-events:none;
}

/* GLASS ITEMS */
.cart-item{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 14px 34px rgba(0,0,0,0.14);
}

/* =========================================================
   MOBILE HEADER FIT FIX (FAiBALi logo + nav fits inside pill)
   ========================================================= */
@media (max-width: 900px){

  /* tighter internal spacing so nothing spills */
  header .header-content{
    padding: 0 12px;          /* was 22px desktop-ish spacing */
    gap: 8px;                 /* reduce gap between left/nav/logo/right */
  }

  /* nav clusters shrink + allow flex to compress correctly */
  header .header-nav{
    gap: 10px;                /* was 18px */
    min-width: 0;
    flex: 1 1 0;
  }

  /* make each nav item not blow out the pill */
  header .header-nav a,
  header .header-nav button{
    min-width: 0;
    max-width: 40vw;
    gap: 6px;                 /* icon/text spacing tighter */
    letter-spacing: 0.22em;   /* slightly less wide */
  }

  /* ✅ LOGO: shrink in ALL mobile states */
  header h1{
    flex: 0 0 auto;
    font-size: 1.35rem;       /* smaller even when NOT shrunk */
    letter-spacing: 0.08em;
    line-height: 1;
    margin: 0;
    transform: none;          /* prevent extra scaling surprises */
  }

  /* header shrunk state */
  header.shrink h1{
    font-size: 1.05rem;       /* smaller in pill */
    letter-spacing: 0.10em;
  }

  /* shrunk + compact (icons-only mode) */
  header.shrink.compact h1{
    font-size: 0.92rem;       /* smallest so icons stay inside */
    letter-spacing: 0.12em;
  }

  /* compact pill: give a touch more room so icons don't clip */
  header.shrink.compact{
    width: 74vw;              /* was 66vw — more room for icons */
    padding: 6px 0;
  }

  /* when compact (icons show), ensure icons have consistent size */
  header.shrink.compact .header-nav img{
    width: 18px;
    height: 18px;
  }

  /* in non-compact pill, labels are still visible but tighter */
  header.shrink:not(.compact) .header-nav span{
    font-size: 0.40rem;
    letter-spacing: 0.20em;
  }

  /* prevent anything from visually sticking outside the pill */
  header.shrink{
    overflow: hidden;
  }
}

/* =========================================================
   HEADER CART COUNT — TEXT ONLY (NO CIRCLE)
   ========================================================= */

.header-cart-count{
  display: inline-block !important;

  background: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-width: auto !important;
  height: auto !important;

  /* neon green like your HUD */
  color: #5CFF5C !important;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;

  /* snug to cart */
  margin-left: 3px;

  line-height: 1;
}

/* slightly tighter spacing inside nav */
.header-nav button{
  gap: 5px;
}

/* =========================================================
   HEADER NAV SPACING FIX
   - Left nav hugs left wall
   - Right nav hugs right wall (Hoodies + Cart)
   ========================================================= */

/* Make the header layout "true 3 columns" */
header .header-content{
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  width: 100% !important;
}

/* Left group hugs left edge */
header .header-nav.left{
  justify-self: start !important;
  display: flex !important;
  justify-content: flex-start !important;
}

/* Logo stays centered */
header h1{
  justify-self: center !important;
}

/* Right group hugs right edge */
header .header-nav.right{
  justify-self: end !important;
  display: flex !important;
  justify-content: flex-end !important;
}

/* Optional: slightly tighter overall padding on small screens */
@media (max-width: 900px){
  header .header-content{
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* =========================================================
   DESKTOP — VIEW CART BUTTON (2x SIZE)
   ========================================================= */
@media (min-width: 901px){

  .floating-cart-btn{
    padding: 33px 51px !important;   /* was ~22px 34px */
    font-size: 21px !important;      /* was ~14px */
    border-radius: 999px;
  }

  .cart-count-badge{
    min-width: 36px;
    height: 36px;
    font-size: 18px;
    margin-left: 14px;
  }

}


