/* v4 — cart system */
*, *::before, *::after { box-sizing: border-box; }
.kwe-page { background-color: #09090b; min-height: 100vh; font-family: 'Inter', sans-serif; display: flex; flex-direction: column; padding-top: 80px; }
.crimson-glass { background: rgba(24,24,27,0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(220,38,38,0.2); }

/* Product grid */
.products-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }

/* Scan animation */
@keyframes store-card-scan {
  0% { transform: translateY(-4px); opacity: 0; }
  5% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(600px); opacity: 0; }
}

/* Product card */
.product-card { background: rgba(24,24,27,0.4); backdrop-filter: blur(12px); border: 2px solid rgba(239,68,68,0.2); border-radius: 0.5rem; overflow: hidden; display: flex; flex-direction: column; transition: all 0.5s cubic-bezier(0.175,0.885,0.32,1.275); position: relative; }
.product-card:hover { border-color: rgba(239,68,68,0.4); transform: translateY(-8px); box-shadow: 0 0 30px -5px rgba(220,38,38,0.4); }
.product-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, transparent, #ef4444, transparent); opacity: 0; transition: opacity 0.3s; z-index: 2; }
.product-card:hover::before { opacity: 1; animation: store-card-scan 2s ease-in-out infinite; }

/* Selected card state */
.product-card.kwe-card-selected { border-color: #ef4444 !important; box-shadow: 0 0 20px -5px rgba(220,38,38,0.6) !important; }

/* Image area hover overlay */
.product-card > div:first-child { position: relative; }
.product-card > div:first-child::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(239,68,68,0.1), transparent, transparent); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.product-card:hover > div:first-child::after { opacity: 1; }

/* Checkmark badge (injected by JS) */
.kwe-check-badge { position: absolute; top: 8px; left: 8px; z-index: 20; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #ef4444; color: #fff; font-size: 0.875rem; font-weight: 900; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(220,38,38,0.5); }

/* Select / Selected buttons */
.kwe-btn-select { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1.25rem; border-radius: 0.375rem; background: #dc2626; border: 2px solid #dc2626; color: #fff; font-weight: 700; font-size: 0.875rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275); }
.kwe-btn-select:hover { background: #b91c1c; border-color: #b91c1c; box-shadow: 0 0 20px -5px rgba(220,38,38,0.5); }
.kwe-btn-selected { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1.25rem; border-radius: 0.375rem; background: rgba(239,68,68,0.15); border: 2px solid #ef4444; color: #f87171; font-weight: 700; font-size: 0.875rem; cursor: pointer; transition: all 0.3s; }
.kwe-btn-selected:hover { background: rgba(239,68,68,0.25); }

/* Legacy CTA button (kept for any other usage) */
.btn-red { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: 0.5rem; background: linear-gradient(to right, #dc2626, #ef4444); color: #fff; font-weight: 700; font-size: 0.9375rem; text-decoration: none; letter-spacing: -0.01em; transition: all 0.5s cubic-bezier(0.175,0.885,0.32,1.275); box-shadow: 0 0 30px -5px rgba(220,38,38,0.5); }
.btn-red:hover { transform: scale(1.02); box-shadow: 0 0 40px -5px rgba(220,38,38,0.7); }

/* Floating cart bar */
.kwe-cart-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: rgba(24,24,27,0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(220,38,38,0.3); box-shadow: 0 -4px 30px -5px rgba(220,38,38,0.3); transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275); }
.kwe-cart-bar.kwe-cart-visible { transform: translateY(0); }
.kwe-cart-inner { max-width: 80rem; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kwe-cart-info { display: flex; align-items: center; gap: 0.75rem; }
.kwe-cart-icon { width: 1.25rem; height: 1.25rem; color: #ef4444; flex-shrink: 0; }
.kwe-cart-count { color: #fff; font-weight: 600; font-size: 0.875rem; }
.kwe-cart-total { color: rgba(255,255,255,0.6); font-size: 0.75rem; }
.kwe-cart-total strong { color: #fff; font-size: 1rem; }
.kwe-bundle-badge { display: inline-block; margin-left: 0.5rem; background: rgba(239,68,68,0.2); color: #f87171; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.4rem; border-radius: 0.25rem; vertical-align: middle; }
.kwe-cart-strike { color: rgba(255,255,255,0.3); text-decoration: line-through; font-size: 0.75rem; margin-left: 0.25rem; }
.kwe-checkout-btn { flex-shrink: 0; padding: 0.75rem 1.5rem; border-radius: 0.375rem; background: #dc2626; border: none; color: #fff; font-weight: 700; font-size: 0.875rem; cursor: pointer; transition: all 0.3s; white-space: nowrap; }
.kwe-checkout-btn:hover { background: #b91c1c; box-shadow: 0 0 20px -5px rgba(220,38,38,0.7); }
.kwe-bundle-hint { background: #8B0000; color: #fff; font-size: 0.875rem; text-align: center; width: 100%; padding: 0.5rem 1rem; }

/* Mobile sticky (kept for backward compat) */
.mobile-sticky { display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; padding: 1rem; background: linear-gradient(to top, rgba(9,9,11,0.95), transparent); }
@media (min-width: 1024px) { .mobile-sticky { display: none; } }

/* Popup overlay (kept until GHL HTML is updated) */
.popup-overlay { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 1rem; }
.popup-overlay.open { display: flex; }
.popup-box { background: #18181b; border: 2px solid rgba(220,38,38,0.3); border-radius: 1rem; max-width: 36rem; width: 100%; padding: 2rem; position: relative; }
.popup-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.popup-close:hover { color: #fff; }
