/* ===== Jeep Aftermarket Parts — Extreme Theme ===== */

::selection { background: #ffd60a; color: #000; }

html { scroll-behavior: smooth; }

/* Prevent horizontal scroll / off-screen content on mobile */
/* overflow-x: clip (NOT hidden) — hidden creates a scroll container and kills position:sticky descendants */
html, body { max-width: 100%; overflow-x: clip; }

body {
  background-image:
    radial-gradient(ellipse at top, rgba(255, 214, 10, 0.04), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 40px, rgba(255,255,255,0.008) 40px 80px);
}

/* Promo ticker animation */
.ticker-track {
  animation: ticker 28s linear infinite;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Hero background */
.hero-bg {
  background-image: url('https://sspark.genspark.ai/cfimages?u1=OT7tr%2Fmd4YPq%2BcfwPQCZ0ZPTmYVXxP3XPLHH0%2BA5%2FX9MzWfE5XZIdzjFqmUkL2zzhNLAWil2OwtoFBQp0Skp4c8GZZnklSuflqRjhHc5nakIKB10pfCQ8tguOz4NwgrPCKbrQtA%2B9E00QxBK611ZOkXN2wTdMiEK&u2=YEbhDGn9CKgrdnzJ&width=2560');
  background-size: cover;
  background-position: center 40%;
  filter: saturate(1.15) contrast(1.1);
  animation: heroZoom 22s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* Glitch-style flicker on hero heading accents */
.hero-glitch span {
  text-shadow: 0 0 18px rgba(255, 214, 10, 0.45);
}

/* Section titles with tire-track underline */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 70%;
  height: 5px;
  background: repeating-linear-gradient(90deg, #ffd60a 0 14px, transparent 14px 22px);
}

/* Category cards */
.category-card {
  display: block;
  position: relative;
  overflow: hidden;
  border: 2px solid #333;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
  min-height: 150px;
  background-size: cover;
  background-position: center;
}
.category-card:hover { border-color: #ffd60a; transform: translateY(-4px); }
.category-card .cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.85));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
  transition: background .2s;
}
.category-card:hover .cat-overlay {
  background: linear-gradient(180deg, rgba(208,0,0,.25), rgba(0,0,0,.9));
}

/* Product cards */
.product-card {
  background: #22201c;
  border: 2px solid #2f2c27;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.product-card:hover {
  border-color: #ffd60a;
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,.6), 0 0 24px rgba(255,214,10,.08);
}
.product-card .product-image {
  height: 190px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  filter: saturate(1.05);
}
.product-badge {
  position: absolute;
  top: 10px; left: -6px;
  background: #d00000;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .15em;
  padding: 4px 12px;
  transform: skewX(-8deg);
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.savings-tag {
  background: rgba(255, 214, 10, .12);
  border: 1px dashed rgba(255, 214, 10, .5);
  color: #ffd60a;
}

/* Branded corner stamp - covers vendor watermark (bottom-right) on catalog images */
.brand-stamp {
  position: absolute;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1611 0%, #22201c 100%);
  color: #ffd60a;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .12em;
  line-height: 1;
  padding: 5px 10px 5px 14px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
  border-top: 1px solid rgba(255, 214, 10, .55);
  pointer-events: none;
  z-index: 2;
}
.brand-stamp i { margin-right: 4px; color: #e85d04; }
.brand-stamp .stamp-badge { display: inline-block; height: 14px; width: auto; margin-right: 5px; vertical-align: -3px; }
.brand-stamp.stamp-lg .stamp-badge { height: 18px; vertical-align: -4px; }
.brand-stamp.stamp-lg { font-size: 13px; padding: 8px 16px 8px 22px; }

/* Nav links */
.nav-link {
  padding: 10px 14px;
  white-space: nowrap;
  color: #9ca3af;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-link:hover, .nav-link.active { color: #ffd60a; border-color: #ffd60a; }

/* Buttons */
.btn-add {
  background: #ffd60a;
  color: #000;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 12px;
  transition: background .15s, color .15s;
}
.btn-add:hover { background: #e85d04; color: #fff; }
.btn-add:active { transform: scale(.97); }

/* Quantity stepper */
.qty-btn {
  width: 30px; height: 30px;
  background: #1a1611;
  border: 1px solid #444;
  color: #ffd60a;
  font-weight: 800;
}
.qty-btn:hover { border-color: #ffd60a; }

/* Free shipping progress */
.ship-bar-track { background: #1a1611; height: 8px; border: 1px solid #444; }
.ship-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(45deg, #ffd60a 0 10px, #e8c108 10px 20px);
  transition: width .4s ease;
}

/* Form inputs */
.form-input {
  width: 100%;
  background: #1a1611;
  border: 2px solid #3a372f;
  color: #f3f4f6;
  padding: 10px 14px;
  font-weight: 600;
  outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: #ffd60a; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  color: #9ca3af;
  margin-bottom: 4px;
}

/* Toast pop */
#toast.show {
  display: block;
  animation: toastPop .3s ease;
}
@keyframes toastPop {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Cart drawer open state */
#cart-drawer.open { transform: translateX(0); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: #1a1611; }
::-webkit-scrollbar-thumb { background: #444; border: 2px solid #1a1611; }
::-webkit-scrollbar-thumb:hover { background: #ffd60a; }

/* ===== THE RIG BAY (Jeep Garage) ===== */
#garage-button.rig-set {
  background: #ffd60a;
  color: #000;
}
#garage-button.rig-set:hover { background: #e85d04; color: #fff; }

/* Fit badges on product cards */
.fit-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  margin-bottom: 6px;
  align-self: flex-start;
}
.fit-yes { background: rgba(56, 176, 0, 0.15); color: #6ede3b; border: 1px solid #38b000; }
.fit-uni { background: rgba(58, 134, 255, 0.12); color: #7fb0ff; border: 1px solid #3a86ff; }
.fit-no  { background: rgba(208, 0, 0, 0.12); color: #ff6b6b; border: 1px solid #d00000; }

/* Fitment check panel on product page */
.fit-check-yes  { background: rgba(56, 176, 0, 0.12); color: #6ede3b; border: 2px solid #38b000; }
.fit-check-uni  { background: rgba(58, 134, 255, 0.10); color: #7fb0ff; border: 2px solid #3a86ff; }
.fit-check-warn { background: rgba(255, 214, 10, 0.10); color: #ffd60a; border: 2px solid #ffd60a; }
.fit-check-no   { background: rgba(208, 0, 0, 0.10); color: #ff6b6b; border: 2px solid #d00000; }

/* ---------- CART UPSELLS: COMPLETE THE BUILD ---------- */
@keyframes upsellSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.upsell-card {
  opacity: 0;
  animation: upsellSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.upsell-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.upsell-add {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffd60a;
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255, 214, 10, 0.55);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}
.upsell-add:hover {
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 0 14px 2px rgba(255, 214, 10, 0.45);
}
.upsell-add:active { transform: scale(0.92); }
.upsell-save {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  background: rgba(56, 176, 0, 0.15);
  color: #6ede3b;
  border: 1px solid #38b000;
  white-space: nowrap;
}
.upsell-ship {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  background: rgba(255, 214, 10, 0.12);
  color: #ffd60a;
  border: 1px solid #ffd60a;
  white-space: nowrap;
}
#upsell-badge-row .upsell-badge {
  display: inline-block;
  background: #d00000;
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.2em;
  padding: 4px 12px;
  transform: skewX(-8deg);
}

/* ---------- WOW FACTOR: checkout modal + cart drawer FX ---------- */

/* Cart drawer pops with a bounce + venom glow when auto-opened on add */
@keyframes drawerPunch {
  0%   { transform: translateX(100%); }
  70%  { transform: translateX(-12px); }
  100% { transform: translateX(0); }
}
#cart-drawer.punch {
  animation: drawerPunch .45s cubic-bezier(.22,1,.36,1);
  box-shadow: -12px 0 44px rgba(255, 214, 10, .25);
}
@keyframes itemFlash {
  0% { background: rgba(255,214,10,.35); box-shadow: 0 0 0 2px #ffd60a inset; }
  100% { background: rgba(0,0,0,.3); box-shadow: none; }
}
.cart-item-new { animation: itemFlash 1.1s ease-out; }

/* Cart count badge pop */
@keyframes badgePop {
  0% { transform: scale(1) skewX(8deg); }
  40% { transform: scale(1.6) skewX(8deg); }
  100% { transform: scale(1) skewX(8deg); }
}
#cart-count.pop { animation: badgePop .4s ease; }

/* ---------- CHECKOUT MODAL: mission-launch treatment ---------- */
.co-shell {
  position: relative;
  background:
    radial-gradient(1200px 300px at 50% -80px, rgba(255,214,10,.10), transparent 60%),
    #14110c;
}
.co-hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, #ffd60a 0 16px, #0a0a0a 16px 32px);
}
@keyframes hazardScroll { to { background-position: 45px 0; } }
.co-hazard.animate { animation: hazardScroll 1.4s linear infinite; }

.co-header { padding: 18px 22px 14px; }
.co-title {
  font-size: clamp(20px, 3.4vw, 30px);
  color: #fff;
  text-shadow: 0 0 18px rgba(255,214,10,.35);
  line-height: 1.05;
}
.co-title .co-flame { color: #ffd60a; }
.co-rail-logo { width: 200px; max-width: 78%; height: auto; margin-bottom: 14px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.7)); }

/* trust chips */
.co-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.co-chip {
  font-size: 10px; font-weight: 800; letter-spacing: .14em;
  padding: 4px 9px; white-space: nowrap;
  background: rgba(255,214,10,.08);
  border: 1px solid rgba(255,214,10,.4);
  color: #ffd60a;
  transform: skewX(-8deg);
}
.co-chip > * { display: inline-block; transform: skewX(8deg); }
.co-chip.green { background: rgba(56,176,0,.1); border-color: #38b000; color: #6ede3b; }

/* order summary strip */
.co-strip {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 22px 0; padding: 10px 14px;
  background: rgba(0,0,0,.45);
  border: 1px solid #3a372f;
}
.co-strip-imgs { display: flex; }
.co-strip-imgs img {
  width: 40px; height: 40px; object-fit: cover;
  border: 2px solid #ffd60a; margin-left: -10px; background: #000;
}
.co-strip-imgs img:first-child { margin-left: 0; }
.co-strip-total { margin-left: auto; text-align: right; }

/* ---------- 2-column checkout: wow rail (left) + Stripe (right) ---------- */
.co-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .co-grid { grid-template-columns: minmax(320px, 420px) 1fr; align-items: start; }
  .co-rail { position: sticky; top: 0; max-height: calc(92vh - 10px); overflow-y: auto; }
}
.co-rail {
  padding: 20px 22px 24px;
  border-right: 1px solid #3a372f;
  background: linear-gradient(180deg, rgba(255,214,10,.04), transparent 240px);
}
.co-rail-sub {
  font-size: 10px; font-weight: 800; letter-spacing: .3em;
  color: #8a8578; margin-top: 4px;
}
.co-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.co-badge {
  display: flex; gap: 9px; align-items: flex-start;
  background: rgba(0,0,0,.45); border: 1px solid #3a372f; padding: 9px 10px;
}
.co-badge i { color: #ffd60a; font-size: 15px; margin-top: 2px; }
.co-badge b { display: block; color: #fff; font-size: 10px; letter-spacing: .12em; }
.co-badge span { display: block; color: #8a8578; font-size: 10px; line-height: 1.3; margin-top: 1px; }
.co-loadout-label {
  margin-top: 16px; font-size: 10px; font-weight: 800; letter-spacing: .3em; color: #ffd60a;
}
.co-items { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.co-item {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid #26231d;
}
.co-item-img {
  position: relative; width: 48px; height: 48px; flex: none;
  background: #000; border: 1px solid #3a372f;
  display: flex; align-items: center; justify-content: center; color: #3a372f;
}
.co-item-img img { width: 100%; height: 100%; object-fit: cover; }
.co-item-qty {
  position: absolute; top: -6px; right: -6px;
  background: #ffd60a; color: #000; font-size: 10px; font-weight: 800;
  min-width: 17px; height: 17px; line-height: 17px; text-align: center;
}
.co-item-info { min-width: 0; flex: 1; }
.co-item-brand { font-size: 9px; font-weight: 800; letter-spacing: .2em; color: #8a8578; }
.co-item-name {
  color: #e7e2d5; font-size: 12px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.co-item-opts { font-size: 10px; color: #ffd60a; font-weight: 700; margin-top: 2px; }
.co-item-opts b { color: #6ede3b; }
.co-item-price { color: #fff; font-weight: 800; font-size: 13px; white-space: nowrap; }
.co-totals { margin-top: 12px; border-top: 2px solid #3a372f; padding-top: 10px; }
.co-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; letter-spacing: .15em; color: #8a8578; font-weight: 800; padding: 3px 0;
}
.co-total-row b { color: #ffd60a; font-size: 16px; letter-spacing: .02em; }
.co-total-row.muted b { color: #8a8578; font-size: 10px; letter-spacing: .12em; }
.co-total-row b.co-calcing { color: #8a8578; font-size: 11px; letter-spacing: .12em; }
.co-total-row.co-grand { margin-top: 6px; border-top: 1px dashed #3a372f; padding-top: 8px; }
.co-total-row.co-grand span { color: #fff; }
.co-total-row.co-grand b { font-size: 20px; text-shadow: 0 0 18px rgba(255,214,10,.35); }
.co-quote {
  margin-top: 14px; font-size: 10px; font-weight: 800; letter-spacing: .12em;
  color: #8a8578; border-left: 3px solid #ffd60a; padding: 6px 10px;
  background: rgba(255,214,10,.05);
}
.co-quote i { color: #ffd60a; margin-right: 4px; }
.co-rail .co-chips { margin-top: 14px; }
@media (max-width: 1023.5px) {
  .co-rail { border-right: 0; border-bottom: 1px solid #3a372f; padding-bottom: 16px; }
  .co-badges { grid-template-columns: 1fr 1fr; }
  .co-items { max-height: 170px; }
}

/* stripe mount gets a frame + entrance */
@keyframes mountRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.co-mount-wrap { padding: 14px 14px 16px; }
#stripe-checkout-mount {
  animation: mountRise .5s cubic-bezier(.22,1,.36,1) .1s both;
  border: 2px solid #ffd60a;
  box-shadow: 0 0 34px rgba(255,214,10,.18);
}

/* loading state: winch pull */
.co-loading { padding: 64px 24px; text-align: center; }
.co-load-track {
  height: 10px; max-width: 380px; margin: 18px auto 0;
  background: #0a0a0a; border: 1px solid #3a372f; overflow: hidden; position: relative;
}
@keyframes winch { 0% { left: -30%; width: 30%; } 60% { width: 45%; } 100% { left: 100%; width: 30%; } }
.co-load-bar {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, #ffd60a 0 10px, #e8c108 10px 20px);
  animation: winch 1.1s ease-in-out infinite;
}
@keyframes gearShake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.co-gear { display: inline-block; animation: gearShake .8s ease-in-out infinite; }

/* ===== FOOTER / SHARED HAZARD STRIPE ===== */
.hazard-stripe {
  background: repeating-linear-gradient(45deg, #ffd60a 0 16px, #111 16px 32px);
}

/* ===== PRODUCT PAGE TABS ===== */
.ptab {
  padding: 12px 18px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #8a8a8a;
  border: 2px solid transparent;
  border-bottom: none;
  background: transparent;
  cursor: pointer;
  transition: color .15s, background .15s;
  position: relative;
  top: 2px;
  white-space: nowrap;
}
.ptab:hover { color: #ffd60a; }
.ptab.active {
  color: #ffd60a;
  background: #1a1a1a;
  border-color: #3a3a3a;
  border-bottom: 2px solid #1a1a1a;
}
.ptab.active::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px;
  height: 3px;
  background: #ffd60a;
}
.ptab-pane { padding: 24px 4px; }
@media (max-width: 640px) {
  .ptab { padding: 10px 12px; font-size: 11px; }
}

/* fitment table rig-match highlight */
#fitment-table tr.rig-match { background: rgba(255, 214, 10, 0.08); }
#fitment-table tr.rig-match td:first-child { box-shadow: inset 3px 0 0 #ffd60a; }

/* fitment verdict boxes reuse fit-check-* classes from rig bay */

/* ===== VIDEO WOW LIGHTBOX ===== */
.video-cta {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin-top: 10px; padding: 12px 16px;
  background: linear-gradient(90deg, #0d0d0d, #171717);
  border: 2px solid #3a3a3a; cursor: pointer;
  transition: border-color .15s, transform .15s;
  text-align: left;
}
.video-cta:hover { border-color: #ffd60a; transform: translateY(-1px); }
.video-cta .vc-play {
  width: 44px; height: 44px; flex-shrink: 0;
  background: #ffd60a; color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; clip-path: polygon(8% 0, 100% 50%, 8% 100%);
  padding-left: 6px;
  animation: pulsePlay 2s ease-in-out infinite;
}
@keyframes pulsePlay { 0%,100% { filter: drop-shadow(0 0 0 rgba(255,214,10,0)); } 50% { filter: drop-shadow(0 0 12px rgba(255,214,10,.8)); } }
.video-cta .vc-label { font-weight: 800; letter-spacing: .15em; font-size: 13px; color: #fff; }
.video-cta .vc-sub { font-size: 11px; color: #8a8a8a; letter-spacing: .08em; }

#video-lightbox { display: none; }
#video-lightbox.open {
  display: flex; position: fixed; inset: 0; z-index: 70;
  align-items: center; justify-content: center; padding: 16px;
}
#video-lightbox .vl-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.92);
  backdrop-filter: blur(4px);
}
#video-lightbox .vl-shell {
  position: relative; width: 100%; max-width: 1100px;
  background: #111; border: 2px solid #ffd60a;
  box-shadow: 0 0 60px rgba(255,214,10,.25);
  display: grid; grid-template-columns: 1fr;
  animation: vlIn .25s ease-out;
}
@media (min-width: 900px) {
  #video-lightbox .vl-shell { grid-template-columns: 1fr 300px; }
}
@keyframes vlIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#video-lightbox .vl-player { position: relative; background: #000; aspect-ratio: 16 / 9; }
#video-lightbox .vl-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#video-lightbox .vl-rail { padding: 20px; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid #2a2a2a; }
#video-lightbox .vl-close {
  position: absolute; top: -16px; right: -16px; z-index: 2;
  width: 36px; height: 36px;
  background: #ffd60a; color: #000; border: none; cursor: pointer;
  font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
#video-lightbox .vl-close:hover { transform: rotate(90deg); }

/* ---- Product options (variational) ---- */
@keyframes priceFlash { 0% { color: #ffd60a; transform: scale(1.06); } 100% { color: #fff; transform: scale(1); } }
.price-flash { animation: priceFlash 0.5s ease-out; }
.option-select { transition: border-color 0.15s; cursor: pointer; }
.option-select:hover { border-color: #ffd60a; }
