﻿/* ========================================
   Unified Products Page - Theme System
   Supports: Baremetal, Host, SSL, SQL, Mail, Site
   ======================================== */

/* ========================================
   CSS Variables (Theme System)
   ======================================== */
:root {
  /* Default Purple Theme */
  --theme-primary: #8b5cf6;
  --theme-secondary: #6366f1;
  --theme-primary-rgb: 139, 92, 246;
  --theme-secondary-rgb: 99, 102, 241;
  --theme-glow: rgba(139, 92, 246, 0.4);

  /* Common Colors */
  --bg-dark: #13131f;
  --bg-card: rgba(255,255,255,0.04);
  --border-color: rgba(255,255,255,0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

/* ========================================
   Theme Variations
   ======================================== */

/* Baremetal - Orange/Copper (Power & Metal) */
.theme-baremetal {
  --theme-primary: #f97316;
  --theme-secondary: #ea580c;
  --theme-primary-rgb: 249, 115, 22;
  --theme-secondary-rgb: 234, 88, 12;
  --theme-glow: rgba(249, 115, 22, 0.4);
}

/* Host - Sky Blue (Cloud & Light) */
.theme-host {
  --theme-primary: #0ea5e9;
  --theme-secondary: #06b6d4;
  --theme-primary-rgb: 14, 165, 233;
  --theme-secondary-rgb: 6, 182, 212;
  --theme-glow: rgba(14, 165, 233, 0.4);
}

/* SSL - Emerald Green (Security & Trust) */
.theme-ssl {
  --theme-primary: #10b981;
  --theme-secondary: #059669;
  --theme-primary-rgb: 16, 185, 129;
  --theme-secondary-rgb: 5, 150, 105;
  --theme-glow: rgba(16, 185, 129, 0.4);
}

/* SQL - Indigo (Data & Tech) */
.theme-sql {
  --theme-primary: #6366f1;
  --theme-secondary: #4f46e5;
  --theme-primary-rgb: 99, 102, 241;
  --theme-secondary-rgb: 79, 70, 229;
  --theme-glow: rgba(99, 102, 241, 0.4);
}

/* Mail - Fuchsia (Communication & Business) */
.theme-mail {
  --theme-primary: #d946ef;
  --theme-secondary: #a855f7;
  --theme-primary-rgb: 217, 70, 239;
  --theme-secondary-rgb: 168, 85, 247;
  --theme-glow: rgba(217, 70, 239, 0.4);
}

/* Site - Rose (Creative & Design) */
.theme-site {
  --theme-primary: #f43f5e;
  --theme-secondary: #e11d48;
  --theme-primary-rgb: 244, 63, 94;
  --theme-secondary-rgb: 225, 29, 72;
  --theme-glow: rgba(244, 63, 94, 0.4);
}

/* ========================================
   Page Container
   ======================================== */
.product-page {
  background: linear-gradient(135deg, #13131f 0%, #1a1a2e 50%, #16162a 100%);
  min-height: 100vh;
  position: relative;
}

.product-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--theme-primary-rgb), 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(var(--theme-secondary-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 0% 80%, rgba(139,92,246,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ========================================
   Hero Section - Left Text, Right Image Layout
   ======================================== */
.product-hero {
  position: relative;
  padding: 80px 20px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.08) 0%, rgba(var(--theme-secondary-rgb), 0.05) 100%);
}

/* Hero Glow Effects */
.product-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(var(--theme-primary-rgb), 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(var(--theme-secondary-rgb), 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Hero Grid Pattern */
.product-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(var(--theme-primary-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--theme-primary-rgb), 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

.product-hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
}

.product-hero-content {
  flex: 1;
  max-width: 550px;
  text-align: left;
  animation: slideInLeft 0.8s ease-out forwards;
  opacity: 0;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.product-hero-image {
  flex: 1;
  max-width: 500px;
  animation: slideInRight 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.product-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
  transition: transform 0.4s ease;
}

.product-hero-image img:hover {
  transform: scale(1.02) translateY(-5px);
}

.product-hero h1 {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.product-hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary), var(--theme-primary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.product-hero p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

.product-hero-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.2), rgba(var(--theme-secondary-rgb), 0.2));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
}

.product-hero-icon svg {
  width: 36px;
  height: 36px;
  color: var(--theme-primary);
}

.product-hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.product-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(var(--theme-primary-rgb), 0.1);
  border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
  border-radius: 20px;
  color: var(--theme-primary);
  font-size: 13px;
}

.product-hero-badge svg {
  width: 14px;
  height: 14px;
}

.product-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Responsive Hero */
@media (max-width: 968px) {
  .product-hero-wrapper {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
  }

  .product-hero-content {
    max-width: 100%;
    text-align: center;
  }

  .product-hero-image {
    max-width: 350px;
  }

  .product-hero h1 {
    font-size: 32px;
  }

  .product-hero-badges {
    justify-content: center;
  }

  .product-hero-actions {
    justify-content: center;
  }

  .product-hero-icon {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .product-hero {
    padding: 60px 15px;
  }

  .product-hero h1 {
    font-size: 28px;
  }

  .product-hero-image {
    max-width: 280px;
  }
}

/* ========================================
   Buttons
   ======================================== */
.product-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.product-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--theme-glow);
}

.product-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.product-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.product-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 18px;
}

.product-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.product-feature svg {
  width: 14px;
  height: 14px;
  color: var(--success);
  flex-shrink: 0;
}

/* ========================================
   Features Section
   ======================================== */
.product-features-section {
  padding: 80px 20px;
  background: rgba(0,0,0,0.2);
}

.product-features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.product-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.product-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
}

.product-feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--theme-primary-rgb), 0.3);
}

.product-feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.2), rgba(var(--theme-secondary-rgb), 0.2));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-feature-icon svg {
  width: 32px;
  height: 32px;
  color: var(--theme-primary);
}

.product-feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.product-feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ========================================
   Theme-Specific Hero Glow Effects
   ======================================== */

/* Baremetal - Orange/Copper Glow */
.theme-baremetal .product-hero::before {
  background:
    radial-gradient(ellipse 600px 400px at 15% 25%, rgba(249, 115, 22, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 85% 75%, rgba(234, 88, 12, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 50% 10%, rgba(251, 146, 60, 0.1) 0%, transparent 60%);
}

.theme-baremetal .product-hero::after {
  background-image:
    linear-gradient(rgba(249, 115, 22, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.05) 2px, transparent 2px);
  background-size: 40px 40px;
}

/* Host - Sky Blue Glow */
.theme-host .product-hero::before {
  background:
    radial-gradient(ellipse 600px 450px at 30% 40%, rgba(14, 165, 233, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 70% 55%, rgba(6, 182, 212, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 450px 350px at 50% 50%, rgba(56, 189, 248, 0.15) 0%, transparent 55%);
}

.theme-host .product-hero::after {
  background-image:
    radial-gradient(circle 1.5px at center, rgba(14, 165, 233, 0.12) 0%, transparent 100%);
  background-size: 50px 50px;
}

/* SSL - Emerald Green Glow */
.theme-ssl .product-hero::before {
  background:
    radial-gradient(ellipse 600px 400px at 25% 35%, rgba(16, 185, 129, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 75% 65%, rgba(5, 150, 105, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 350px 250px at 50% 15%, rgba(52, 211, 153, 0.1) 0%, transparent 60%);
}

.theme-ssl .product-hero::after {
  background-image:
    repeating-linear-gradient(45deg, rgba(16, 185, 129, 0.03) 0%, rgba(16, 185, 129, 0.03) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(-45deg, rgba(5, 150, 105, 0.03) 0%, rgba(5, 150, 105, 0.03) 1px, transparent 1px, transparent 20px);
}

/* SQL - Indigo Glow */
.theme-sql .product-hero::before {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(99, 102, 241, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(79, 70, 229, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 55% 20%, rgba(129, 140, 248, 0.1) 0%, transparent 60%);
}

.theme-sql .product-hero::after {
  background-image:
    linear-gradient(0deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: dataFlow 10s linear infinite;
}

@keyframes dataFlow {
  0% { background-position: 0 0; }
  100% { background-position: 20px 20px; }
}

/* Mail - Fuchsia Glow */
.theme-mail .product-hero::before {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(217, 70, 239, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 350px 250px at 45% 15%, rgba(232, 121, 249, 0.1) 0%, transparent 60%);
}

.theme-mail .product-hero::after {
  background-image:
    linear-gradient(135deg, rgba(217, 70, 239, 0.04) 25%, transparent 25%),
    linear-gradient(225deg, rgba(168, 85, 247, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, rgba(217, 70, 239, 0.04) 25%, transparent 25%),
    linear-gradient(315deg, rgba(168, 85, 247, 0.04) 25%, transparent 25%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 0, 30px -30px, 0 30px;
}

/* Site - Rose Glow */
.theme-site .product-hero::before {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(244, 63, 94, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(225, 29, 72, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 350px 250px at 50% 15%, rgba(251, 113, 133, 0.1) 0%, transparent 60%);
}

.theme-site .product-hero::after {
  background-image:
    linear-gradient(30deg, rgba(244, 63, 94, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(244, 63, 94, 0.05) 87.5%),
    linear-gradient(150deg, rgba(225, 29, 72, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(225, 29, 72, 0.05) 87.5%),
    linear-gradient(30deg, rgba(244, 63, 94, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(244, 63, 94, 0.05) 87.5%),
    linear-gradient(150deg, rgba(225, 29, 72, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(225, 29, 72, 0.05) 87.5%);
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}

/* ========================================
   SSL Certificate Specific Styles
   ======================================== */
.ssl-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(var(--theme-primary-rgb), 0.1);
  border: 1px solid rgba(var(--theme-primary-rgb), 0.2);
  border-radius: 6px;
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.ssl-type-dv { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); color: #3b82f6; }
.ssl-type-ov { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); color: #10b981; }
.ssl-type-ev { background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.2); color: #f97316; }

.ssl-domains-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ssl-domain-row {
  display: flex;
  gap: 8px;
}

.ssl-domain-row input {
  flex: 1;
}

.ssl-add-domain-btn {
  padding: 8px 16px;
  background: rgba(var(--theme-primary-rgb), 0.1);
  border: 1px dashed rgba(var(--theme-primary-rgb), 0.3);
  border-radius: 8px;
  color: var(--theme-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ssl-add-domain-btn:hover {
  background: rgba(var(--theme-primary-rgb), 0.2);
}


/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


.product-section-title {
    text-align: center;
    margin-bottom: 48px;
}
.product-section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.product-section-title p {
    color: var(--text-muted);
    font-size: 16px;
}
.product-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}
/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .product-hero {
    padding: 80px 16px 60px;
  }

  .product-hero h1 {
    font-size: 32px;
  }

  .product-hero p {
    font-size: 15px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card-footer {
    flex-direction: column;
    text-align: center;
  }

  .product-buy-btn {
    width: 100%;
    justify-content: center;
  }

  .product-buy-container {
    padding: 20px 16px;
  }

  .product-buy-specs {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-buy-duration-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-buy-price-section {
    flex-direction: column;
    text-align: center;
  }
}
