﻿/* Deals Page CSS - Norse Viking Nebula */
body.deals-gradient {
  background-color: var(--dark-bg, #0b0e1c) !important;
  background-image: linear-gradient(rgba(11, 14, 28, 0.5), rgba(11, 14, 28, 0.8)), url('../../img/backgrounds/mainbackground.webp') !important;
  background-size: cover !important;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
  font-family: 'Inter', sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.deals-gradient::before { display: none !important; opacity: 0 !important; background: none !important; }

.deals-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1 0 auto;
}

.deals-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}
.deals-header h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  font-family: 'Cinzel Decorative', cursive;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}
.deals-header p {
  font-size: 1.1rem;
  color: #ccc;
  margin: 0;
}

/* ===== CARD GRID ===== */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

@keyframes deal-pulse-border {
  0%, 100% { border-color: var(--deal-accent-1); box-shadow: 0 0 8px var(--deal-accent-1); }
  50%       { border-color: var(--deal-accent-2); box-shadow: 0 0 15px var(--deal-accent-2); }
}

.deal-card {
  --deal-accent-1: #00f7ff;
  --deal-accent-2: #aa00ff;
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
  position: relative;
  border: 1px solid var(--deal-accent-1);
  animation: deal-pulse-border 6s ease-in-out infinite;
  transition: transform 0.3s ease;
}
.deal-card:hover { transform: translateY(-8px); }

/* ---- Image wrapper ---- */
.deal-card-image-wrapper {
  width: 100%;
  background-color: #121212;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  aspect-ratio: 1 / 1;
}
.deal-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.deal-card:hover .deal-card-image-wrapper img { transform: scale(1.05); }

.img-fallback-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-fallback-icon svg { width: 70%; height: 70%; }

/* ---- Card content ---- */
.deal-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.deal-card-name {
  font-family: 'Exo 2', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.4rem;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.3px;
}
.deal-card-type {
  font-size: 0.8rem;
  color: var(--deal-accent-1);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* ---- Specs ---- */
.deal-card-specs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background-color: rgba(0,0,0,0.2);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  flex-grow: 1;
}
.deal-card-specs .spec-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.4rem 0.6rem;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.deal-card-specs .spec-item:last-child { border-bottom: none; }
.deal-card-specs .spec-label {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.deal-card-specs .spec-val {
  font-weight: 500;
  color: var(--deal-accent-1);
  text-align: right;
  word-break: break-word;
}

/* ---- Price ---- */
.deal-card-price-box {
  background-color: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.75rem;
  border-radius: 6px;
  margin: 0 0 1.25rem;
  text-align: center;
}
.deal-card-price {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 2rem;
  color: var(--deal-accent-2);
  text-shadow: 0 0 10px var(--deal-accent-2);
  margin: 0;
}

/* ---- Action button ---- */
.deal-card-actions { display: flex; gap: 1rem; }
.btn-deal-view {
  flex: 1;
  padding: 0.8rem 1rem;
  font-family: 'Cinzel Decorative', cursive;
  font-size: 0.95rem;
  text-align: center;
  border: 2px solid var(--deal-accent-1);
  background: transparent;
  color: var(--deal-accent-1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-deal-view:hover {
  background: var(--deal-accent-1);
  color: #000;
}

/* ===== PRODUCT PAGE ===== */
.deal-product-page {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.back-link {
  color: #aaa;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: #fff; }

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: linear-gradient(to bottom, rgba(18,18,18,0.55), rgba(18,18,18,0.65));
  border: 1px solid var(--deal-accent-1);
  padding: 2.5rem;
  border-radius: 12px;
  backdrop-filter: blur(3px);
  animation: deal-pulse-border 6s ease-in-out infinite;
}

.product-image-container {
  background-color: #121212;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,0.1);
}
.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-image-container .img-fallback-icon { width: 100%; height: 100%; }

.product-info {
  display: flex;
  flex-direction: column;
}
.product-badge {
  display: inline-block;
  align-self: flex-start;
  background: linear-gradient(90deg, var(--deal-accent-1), var(--deal-accent-2));
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}
.product-info h1 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.product-price {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 2.5rem;
  color: var(--deal-accent-2);
  text-shadow: 0 0 10px var(--deal-accent-2);
  margin: 0 0 1.5rem;
}
.product-desc {
  font-size: 1rem;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 2rem;
}
.product-info h3 {
  font-family: 'Exo 2', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--deal-accent-1);
  margin-bottom: 0.75rem;
}
.specs-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: rgba(0,0,0,0.2);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}
.specs-grid .spec-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.4rem 1rem;
  font-size: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.specs-grid .spec-item:last-child { border-bottom: none; padding-bottom: 0; }
.specs-grid .spec-label { color: #fff; font-weight: 700; white-space: nowrap; }
.specs-grid .spec-val {
  font-weight: 500;
  color: var(--deal-accent-1);
  text-align: right;
  word-break: break-word;
}
.buy-btn {
  padding: 1rem 2rem;
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.1rem;
  background: linear-gradient(45deg, var(--deal-accent-1), var(--deal-accent-2));
  color: #000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
  width: 100%;
  margin-top: auto;
}
.buy-btn:hover { filter: brightness(1.15); transform: scale(1.02); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .deals-header h1 { font-size: 2rem; }
  .product-hero { grid-template-columns: 1fr; padding: 1.5rem; gap: 2rem; }
}
@media (max-width: 480px) {
  .deals-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .deal-card-name { font-size: 1rem; }
  .deal-card-price { font-size: 1.6rem; }
}
