/**
 * CustomVinylzz — July 4th / Independence Day theme
 */

:root {
  --j4-navy: #0a1628;
  --j4-red: #dc2626;
  --j4-red-dark: #991b1b;
  --j4-blue: #1d4ed8;
  --j4-blue-light: #3b82f6;

  --accent: var(--j4-red);
  --accent-2: var(--j4-blue);
  --red-primary: var(--j4-red);
  --red-hover: var(--j4-red-dark);
  --red-dark: #7f1d1d;
  --orange-accent: var(--j4-blue);
  --cyber-blue: var(--j4-red);
  --cyber-pink: var(--j4-blue-light);
  --checkout-primary: var(--j4-red);
  --checkout-primary-hover: var(--j4-red-dark);
  --dark-bg: var(--j4-navy);
  --dark-card: rgba(15, 39, 68, 0.92);
  --bg: var(--j4-navy);
  --card: rgba(15, 39, 68, 0.95);
  --glow: 0 0 30px rgba(220, 38, 38, 0.35);
  --glow-red: 0 0 30px rgba(29, 78, 216, 0.35);
  --glow-cyber: 0 0 20px rgba(220, 38, 38, 0.4);
}

body.july4-active {
  background-color: var(--j4-navy) !important;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.45) 0, transparent 100%),
    radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.5) 0, transparent 100%),
    radial-gradient(1px 1px at 88% 78%, rgba(255,255,255,0.4) 0, transparent 100%),
    radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.35) 0, transparent 100%),
    linear-gradient(165deg, #0a1628 0%, #0f2744 40%, #0a1628 100%) !important;
  background-attachment: fixed;
}

body.july4-active::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background: repeating-linear-gradient(0deg, #dc2626 0 3px, #f8fafc 3px 6px, #1d4ed8 6px 9px);
}

/* Do not force position:relative on fixed overlays (product modal, loaders, etc.) */
body.july4-active > header,
body.july4-active > main,
body.july4-active > footer {
  position: relative;
  z-index: 1;
}

.july4-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 48px 10px 20px;
  background: linear-gradient(90deg, #991b1b, #dc2626 35%, #1e3a8a 65%, #1d4ed8);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.july4-banner .j4-stars { font-size: 16px; letter-spacing: 2px; }
.july4-banner a {
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.july4-banner a:hover { background: rgba(255,255,255,0.3); }
.july4-banner-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}

body.july4-active .site-header,
body.july4-active .design-header {
  border-bottom: 3px solid transparent !important;
  border-image: linear-gradient(90deg, #dc2626, #f8fafc, #1d4ed8, #f8fafc, #dc2626) 1 !important;
  background: rgba(10, 22, 40, 0.92) !important;
}

body.july4-active .btn.primary,
body.july4-active .product-cta-btn,
body.july4-active .hero-cta,
body.july4-active .cta-button,
body.july4-active .auth-btn,
body.july4-active .submit-btn,
body.july4-active .next-btn,
body.july4-active .btn-primary,
body.july4-active .checkout-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c 45%, #1d4ed8) !important;
  border-color: transparent !important;
}

body.july4-active .site-footer,
body.july4-active footer {
  border-top: 3px solid transparent !important;
  border-image: linear-gradient(90deg, #dc2626, #f8fafc, #1d4ed8) 1 !important;
}

body.july4-active.admin-page { --brand: #dc2626; --brand-soft: #fef2f2; }
body.july4-active.admin-page .nav-item.active {
  background: linear-gradient(135deg, #fef2f2, #eff6ff) !important;
  color: #1d4ed8 !important;
}
body.july4-active.admin-page .btn-primary {
  background: linear-gradient(135deg, #dc2626, #1d4ed8) !important;
  border: none !important;
}

.july4-firework {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: j4-fw 6s ease-out infinite;
}
.july4-firework:nth-child(1) { top: 12%; left: 8%; animation-delay: 0s; background: #dc2626; }
.july4-firework:nth-child(2) { top: 22%; right: 10%; animation-delay: 2s; background: #3b82f6; }
.july4-firework:nth-child(3) { bottom: 18%; left: 15%; animation-delay: 4s; background: #fbbf24; }
@keyframes j4-fw {
  0% { opacity: 0; transform: scale(0); }
  15% { opacity: 0.9; transform: scale(1); box-shadow: 0 0 20px 4px currentColor; }
  40% { opacity: 0; transform: scale(2); }
  100% { opacity: 0; }
}

@media (max-width: 640px) {
  .july4-banner { font-size: 12px; padding: 8px 40px 8px 12px; }
  .july4-banner .j4-hide-mobile { display: none; }
}


/* ── Hero July 4th fireworks & promo ── */
body.july4-active .hero-section {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(29, 78, 216, 0.18) 0%, transparent 70%),
    radial-gradient(circle at 20% 80%, rgba(220, 38, 38, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
    linear-gradient(165deg, #0a1628 0%, #0f2744 50%, #0a1628 100%) !important;
}

.july4-hero-fireworks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.july4-hero-fireworks-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.july4-hero-bursts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.j4-burst {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: j4-hero-burst 3.2s ease-out infinite;
}

.j4-burst::before,
.j4-burst::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 -42px 0 1px currentColor,
    29px -29px 0 1px currentColor,
    42px 0 0 1px currentColor,
    29px 29px 0 1px currentColor,
    0 42px 0 1px currentColor,
    -29px 29px 0 1px currentColor,
    -42px 0 0 1px currentColor,
    -29px -29px 0 1px currentColor,
    0 -28px 0 0 currentColor,
    20px -20px 0 0 currentColor,
    28px 0 0 0 currentColor,
    20px 20px 0 0 currentColor,
    0 28px 0 0 currentColor,
    -20px 20px 0 0 currentColor,
    -28px 0 0 0 currentColor,
    -20px -20px 0 0 currentColor;
}

.j4-burst::after {
  filter: blur(1px);
  opacity: 0.55;
}

@keyframes j4-hero-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  8% { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  35% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

.july4-hero-promo {
  position: relative;
  max-width: 960px;
  margin: 0 auto 2.5rem;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid transparent;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.95), rgba(15, 39, 68, 0.9)) padding-box,
    linear-gradient(135deg, #dc2626, #f8fafc, #1d4ed8, #dc2626) border-box;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(220, 38, 38, 0.15),
    0 0 80px rgba(29, 78, 216, 0.12);
  animation: j4-promo-glow 4s ease-in-out infinite alternate;
}

@keyframes j4-promo-glow {
  from { box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 0 60px rgba(220,38,38,0.12), 0 0 60px rgba(29,78,216,0.1); }
  to   { box-shadow: 0 24px 70px rgba(0,0,0,0.5), 0 0 100px rgba(220,38,38,0.22), 0 0 100px rgba(29,78,216,0.18); }
}

.july4-hero-promo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: center 35%;
}

.july4-hero-promo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(153, 27, 27, 0.35), rgba(30, 58, 138, 0.35));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.july4-hero-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #1d4ed8);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.july4-hero-promo-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
}

body.july4-active .hero-title {
  background: linear-gradient(135deg, #fff 0%, #fca5a5 35%, #93c5fd 70%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 640px) {
  .july4-hero-promo img { max-height: 220px; }
  .july4-hero-promo-caption { flex-direction: column; text-align: center; }
}
