/* =====================================================================
   ICB Firearms · Halloween 2026 accents
   Loaded site-wide by the Elementor Custom Code snippet "ICB Halloween 2026".
   Every rule is scoped to html.icb-halloween. The snippet adds that class only
   while the season is on (and LIVE = true, or ?icbh=1 for previews), so after
   Nov 1 2026 00:00 ET the site looks exactly as it did before.
   Nothing here changes layout: stickers are pseudo-elements, frames are rings.
   Homepage stickers target Elementor element IDs (data-id) that exist only on the
   homepage and its copies, so they also show in the draft preview.
   Image base: /wp-content/uploads/icb-halloween/
   v6 (23 Oct 2026): white glow on the scary ghost (section 6).
   v5 (23 Oct 2026): every ghost sticker is now Josh's scary ghost (icbh-ghost-scary.png, transparent PNG).
   v4 (23 Oct 2026): FRAME is pumpkin only; Sale badge is a plain red tag (section 5).
   v3 (23 Oct 2026): 10/22 page Sale pumpkin override added (section 4).
   v2 (23 Oct 2026): homepage element IDs remapped to the Halloween copy (page 1323834), whose IDs were regenerated by the Elementor template insert.
   ===================================================================== */

/* ---------- 1. Homepage heading stickers (inline, after the heading text) ---------- */
html.icb-halloween [data-id="1e8a0f96"] .elementor-heading-title::after,  /* Firearms Category            */
html.icb-halloween [data-id="e55b621"] .elementor-heading-title::after,  /* Shop Optics, Sights & ...     */
html.icb-halloween [data-id="40df15f3"] .elementor-heading-title::after,  /* Shop Ammunition by Caliber    */
html.icb-halloween [data-id="7a010d2a"] .elementor-heading-title::after,  /* Trusted Firearm Brands        */
html.icb-halloween [data-id="651c0596"] .elementor-heading-title::after,  /* What Customers Say            */
html.icb-halloween [data-id="6e58edcb"] .elementor-heading-title::after,  /* Transfer & Gunsmithing        */
html.icb-halloween [data-id="48d392fa"] .elementor-heading-title::after,  /* About ICB Firearms            */
html.icb-halloween [data-id="7f28a0fc"] .elementor-heading-title::after { /* Guides, Reviews & News        */
  content: "";
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  margin-left: .3em;
  vertical-align: -.22em;
  background: center / contain no-repeat;
  transform: rotate(8deg);
  pointer-events: none;
}
html.icb-halloween [data-id="1e8a0f96"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-pumpkin.webp"); }
html.icb-halloween [data-id="e55b621"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-bat.webp"); width: 1.9em; transform: rotate(-6deg); }
html.icb-halloween [data-id="40df15f3"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-candy-corn.webp"); width: 1em; transform: rotate(14deg); }
html.icb-halloween [data-id="7a010d2a"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-ghost-scary.png"); transform: rotate(-8deg); }
html.icb-halloween [data-id="651c0596"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-witch-hat.webp"); width: 1.4em; transform: rotate(10deg); }
html.icb-halloween [data-id="6e58edcb"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-pumpkin-plain.webp"); }
html.icb-halloween [data-id="48d392fa"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-ghost-scary.png"); transform: rotate(-8deg); }
html.icb-halloween [data-id="7f28a0fc"] .elementor-heading-title::after { background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-bat.webp"); width: 1.9em; transform: rotate(6deg); }

/* ---------- 2. Homepage corner stickers (absolute, never over text or buttons) ---------- */
/* "ICB Firearms" yellow label: a ghost peeks out on the left, a bat on the right */
html.icb-halloween [data-id="68484b63"] { overflow: visible; }
html.icb-halloween [data-id="68484b63"]::before,
html.icb-halloween [data-id="68484b63"]::after {
  content: ""; position: absolute; pointer-events: none; z-index: 2;
  background: center / contain no-repeat;
}
html.icb-halloween [data-id="68484b63"]::before {
  left: -62px; top: -34px; width: 88px; height: 88px;
  background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-ghost-scary.png");
  transform: rotate(-14deg);
}
html.icb-halloween [data-id="68484b63"]::after {
  right: -44px; top: -40px; width: 104px; height: 60px;
  background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-bat.webp");
  transform: rotate(12deg);
}

/* Cobweb in the top-left corner of "Firearms Category" (light grey section) */
html.icb-halloween [data-id="213585fb"] { position: relative; }
html.icb-halloween [data-id="213585fb"]::after {
  content: ""; position: absolute; left: 0; top: 0; width: 190px; height: 190px; pointer-events: none; z-index: 1;
  background: url("/wp-content/uploads/icb-halloween/stickers/icbh-web-corner-dark.webp") left top / contain no-repeat;
  opacity: .55;
}
/* Hanging spider on the right of "Shop Optics" (white section) */
html.icb-halloween [data-id="7daced87"] { position: relative; }
html.icb-halloween [data-id="7daced87"]::after {
  content: ""; position: absolute; right: 7%; top: 0; width: 44px; height: 92px; pointer-events: none; z-index: 1;
  background: url("/wp-content/uploads/icb-halloween/stickers/icbh-spider.webp") center top / contain no-repeat;
  animation: icbh-dangle 4.5s ease-in-out infinite; transform-origin: 50% 0;
}
/* Cobweb in the top-right corner of "Shop Ammunition by Caliber" (dark section) */
html.icb-halloween [data-id="27927452"] { position: relative; }
html.icb-halloween [data-id="27927452"]::after {
  content: ""; position: absolute; right: 0; top: 0; width: 200px; height: 200px; pointer-events: none; z-index: 1;
  background: url("/wp-content/uploads/icb-halloween/stickers/icbh-web-corner-light.webp") left top / contain no-repeat;
  transform: scaleX(-1); opacity: .45;
}
/* "BOO!" bubble beside NEVER MISS A DEAL */
html.icb-halloween [data-id="7b9b2cfc"] { position: relative; overflow: visible; }
html.icb-halloween [data-id="7b9b2cfc"]::after {
  content: ""; position: absolute; right: -118px; top: -42px; width: 116px; height: 82px; pointer-events: none; z-index: 2;
  background: url("/wp-content/uploads/icb-halloween/stickers/icbh-boo.webp") center / contain no-repeat;
  transform: rotate(8deg);
}
/* Pumpkin patch on the top edge of the footer (every page) */
html.icb-halloween [data-elementor-type="footer"] [data-id="25c3c8e"] { position: relative; overflow: visible; }
html.icb-halloween [data-elementor-type="footer"] [data-id="25c3c8e"]::after {
  content: ""; position: absolute; right: 4%; top: -58px; width: 210px; height: 92px; pointer-events: none; z-index: 3;
  background: url("/wp-content/uploads/icb-halloween/stickers/icbh-pumpkin-patch.webp") center bottom / contain no-repeat;
}
/* A small ghost that floats in the lower-left corner on large screens (homepage only: the page that has hero 57ab6fa) */
@media (min-width: 1025px) {
  html.icb-halloween body:has([data-id="57ab6fa"])::after {
    content: ""; position: fixed; left: 18px; bottom: 18px; width: 68px; height: 68px; z-index: 50; pointer-events: none;
    background: url("/wp-content/uploads/icb-halloween/stickers/icbh-ghost-scary.png") center / contain no-repeat;
    animation: icbh-float 5s ease-in-out infinite;
  }
}

/* ---------- 3. Product card frames (every product grid: shop, categories, search, related) ---------- */
html.icb-halloween ul.products li.product {
  position: relative;
  overflow: visible !important;
  border-radius: 14px;
  transition: box-shadow .2s ease, transform .2s ease;
}
html.icb-halloween ul.products li.product > a.woocommerce-loop-product__link:first-of-type,
html.icb-halloween ul.products li.product > a.woocommerce-loop-product__link:first-of-type img {
  border-radius: 11px 11px 0 0;
}
html.icb-halloween ul.products li.product::before {
  content: ""; position: absolute; pointer-events: none; z-index: 4;
  background: center / contain no-repeat;
}

/* Pumpkin frame: orange ring with a black cartoon outline, jack-o'-lantern on the corner */
html.icb-halloween[data-icbh-frame="pumpkin"] ul.products li.product,
html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(odd) {
  border-color: #F47521 !important;
  box-shadow: 0 0 0 3px #F47521, 0 0 0 6px #120806, 0 14px 26px -10px rgba(196, 68, 14, .55) !important;
}
/* product photos use multiply blending, so tinting the photo backdrop warms the whole image area */
html.icb-halloween[data-icbh-frame="pumpkin"] ul.products li.product > a.woocommerce-loop-product__link:first-of-type,
html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(odd) > a.woocommerce-loop-product__link:first-of-type {
  background-color: #FFF1E4 !important;
}
html.icb-halloween[data-icbh-frame="pumpkin"] ul.products li.product::before,
html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(odd)::before {
  left: -22px; top: -24px; width: 64px; height: 64px;
  background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-pumpkin.webp");
  transform: rotate(-12deg);
}

/* Ghost frame: misty lavender ring on a night-purple outline with a glow, ghost peeking over the top */
html.icb-halloween[data-icbh-frame="ghost"] ul.products li.product,
html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(even) {
  border-color: #E4DDF3 !important;
  box-shadow: 0 0 0 3px #E4DDF3, 0 0 0 6px #231833, 0 0 30px 4px rgba(130, 96, 196, .50) !important;
}
html.icb-halloween[data-icbh-frame="ghost"] ul.products li.product > a.woocommerce-loop-product__link:first-of-type,
html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(even) > a.woocommerce-loop-product__link:first-of-type {
  background-color: #F1EDF9 !important;
}
html.icb-halloween[data-icbh-frame="ghost"] ul.products li.product::before,
html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(even)::before {
  left: 14px; top: -42px; width: 62px; height: 62px;
  background-image: url("/wp-content/uploads/icb-halloween/stickers/icbh-ghost-scary.png");
  transform: rotate(-8deg);
}

/* A little bounce on hover (desktop) */
@media (hover: hover) {
  html.icb-halloween ul.products li.product:hover::before { animation: icbh-wiggle .5s ease-in-out; }
}

/* "Sale!" badge becomes a pumpkin */
html.icb-halloween ul.products li.product .onsale {
  background: url("/wp-content/uploads/icb-halloween/stickers/icbh-badge-pumpkin.webp") center / contain no-repeat !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  width: 62px !important; height: 62px !important; min-width: 62px !important; min-height: 62px !important;
  line-height: 1 !important;
  padding: 26px 0 0 !important;
  box-sizing: border-box !important;
  top: -14px !important; right: -12px !important; left: auto !important;
  color: #1a0b05 !important;
  font-weight: 800 !important; font-size: 13px !important;
  text-align: center !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}

/* Phones and small tablets: smaller stickers, nothing hangs past the screen edge */
@media (max-width: 767px) {
  html.icb-halloween ul.products li.product::before { width: 48px !important; height: 48px !important; }
  html.icb-halloween[data-icbh-frame="pumpkin"] ul.products li.product::before,
  html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(odd)::before { left: -10px; top: -16px; }
  html.icb-halloween[data-icbh-frame="ghost"] ul.products li.product::before,
  html.icb-halloween[data-icbh-frame="mix"] ul.products li.product:nth-child(even)::before { left: 12px; top: -32px; }
  html.icb-halloween ul.products li.product .onsale { right: -4px !important; }
  html.icb-halloween [data-id="68484b63"]::before { left: -30px; top: -30px; width: 58px; height: 58px; }
  html.icb-halloween [data-id="68484b63"]::after { right: -34px; top: -26px; width: 66px; height: 40px; }
  html.icb-halloween [data-id="213585fb"]::after { width: 110px; height: 110px; }
  html.icb-halloween [data-id="27927452"]::after { width: 120px; height: 120px; }
  html.icb-halloween [data-id="7daced87"]::after { right: 4%; width: 32px; height: 68px; }
  html.icb-halloween [data-id="7b9b2cfc"]::after { right: 0; top: -70px; width: 92px; height: 66px; }
  html.icb-halloween [data-elementor-type="footer"] [data-id="25c3c8e"]::after { width: 150px; height: 66px; top: -42px; }
}

@keyframes icbh-float  { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
@keyframes icbh-dangle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes icbh-wiggle { 0%, 100% { rotate: 0deg; } 30% { rotate: -10deg; } 60% { rotate: 8deg; } }

@media (prefers-reduced-motion: reduce) {
  html.icb-halloween body:has([data-id="57ab6fa"])::after,
  html.icb-halloween [data-id="7daced87"]::after,
  html.icb-halloween ul.products li.product:hover::before { animation: none !important; }
}

/* ---------- 4. v3 (23 Oct 2026): Sale pumpkin on the 10/22 Day page grid ----------
   That page's own stylesheet styles .onsale with !important inside .icb-1022 .icb-woo,
   so the same pumpkin rules are repeated here with higher specificity. */
html.icb-halloween .icb-1022 .icb-woo ul.products li.product .onsale {
  background: url("/wp-content/uploads/icb-halloween/stickers/icbh-badge-pumpkin.webp") center / contain no-repeat !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  width: 62px !important; height: 62px !important; min-width: 62px !important; min-height: 62px !important;
  line-height: 1 !important;
  padding: 26px 0 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  top: -14px !important; right: -12px !important; left: auto !important;
  color: #1a0b05 !important;
  font-weight: 800 !important; font-size: 13px !important; letter-spacing: 0 !important;
  text-align: center !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
@media (max-width: 600px) {
  html.icb-halloween .icb-1022 .icb-woo ul.products li.product .onsale {
    width: 52px !important; height: 52px !important; min-width: 52px !important; min-height: 52px !important;
    padding: 22px 0 0 !important; font-size: 11px !important;
    top: -10px !important; right: -6px !important;
  }
}

/* ---------- 5. v4 (23 Oct 2026, Josh): plain red "Sale" tag instead of the pumpkin badge ----------
   Higher specificity (body) so it wins over sections 3 and 4 and over the 10/22 page stylesheet. */
html.icb-halloween body ul.products li.product .onsale,
html.icb-halloween body .icb-1022 .icb-woo ul.products li.product .onsale {
  background: #D71D29 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 2px solid #120806 !important;
  border-radius: 8px !important;
  width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important;
  line-height: 1 !important;
  padding: 7px 12px 6px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  top: -12px !important; right: -10px !important; left: auto !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 800 !important; font-size: 13px !important; letter-spacing: 1px !important; text-transform: uppercase !important;
  text-align: center !important;
  box-shadow: 0 3px 0 #120806 !important;
  transform: rotate(6deg);
  filter: none !important;
  z-index: 5;
}
@media (max-width: 600px) {
  html.icb-halloween body ul.products li.product .onsale,
  html.icb-halloween body .icb-1022 .icb-woo ul.products li.product .onsale {
    padding: 6px 9px 5px !important; font-size: 11px !important;
    top: -10px !important; right: -6px !important;
  }
}

/* ---------- 6. v6 (23 Oct 2026): white glow behind the scary ghost so it reads on dark sections ---------- */
html.icb-halloween [data-id="68484b63"]::before,
html.icb-halloween [data-id="7a010d2a"] .elementor-heading-title::after,
html.icb-halloween [data-id="48d392fa"] .elementor-heading-title::after,
html.icb-halloween body:has([data-id="57ab6fa"])::after {
  filter: drop-shadow(0 0 2px #ffffff) drop-shadow(0 0 7px rgba(255, 255, 255, .85)) drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
}
