/**
 * Templates Design System
 * 66 High-End Distinct Profiles Stylesheets
 */
@import 'templates_extended.css';

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

:root {
  --profile-max-w: 680px;
  --font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  --primary: #4f46e5;
  --secondary: #06b6d4;
  --bg-color: #0f172a;
  --text-color: #ffffff;
  --radius: 16px;
}

/* Base Profile Container */
.profile-page-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 30px 16px 60px;
  box-sizing: border-box;
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--bg-color);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  transition: all 0.3s ease;
  direction: rtl;
}

.profile-container {
  width: 100%;
  max-width: var(--profile-max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
}

/* Top Action Bar (Share & QR) */
.profile-top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: -10px;
}
.profile-action-btn {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.25s ease;
  text-decoration: none;
}
.profile-action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

/* Profile Header */
.profile-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}
.profile-avatar:hover {
  transform: scale(1.05);
}

/* Authentic Facebook / Meta Verified Badges */
.verified-badge,
.avatar-verified-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  z-index: 5;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  line-height: 1;
}
.verified-badge:hover,
.avatar-verified-badge:hover {
  transform: scale(1.15) rotate(4deg);
}

.name-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 4px;
  filter: drop-shadow(0 1px 3px rgba(8, 102, 255, 0.35));
  transition: transform 0.2s ease;
  line-height: 1;
}
.name-verified-badge:hover {
  transform: scale(1.18);
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
}

.profile-name-text {
  display: inline;
  vertical-align: middle;
}

.profile-title {
  font-size: 1rem;
  opacity: 0.85;
  margin: 0;
  font-weight: 500;
}

.profile-meta-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-size: 0.85rem;
  opacity: 0.75;
}
.profile-meta-info span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 520px;
  margin: 4px auto 0;
  opacity: 0.9;
  text-align: center;
  white-space: pre-line;
}

/* Save Contact Button (vCard) */
.vcard-btn-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
  margin-bottom: 12px;
}
.vcard-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
  border: none;
}
.vcard-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  filter: brightness(1.1);
}

/* Social Media Bar */
.social-links-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 24px 0 24px;
  width: 100%;
}
.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}
.social-icon-btn:hover {
  transform: translateY(-4px) scale(1.1);
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Custom Links Section */
.custom-links-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.custom-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
.custom-link-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.link-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.link-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.link-texts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  flex: 1;
  min-width: 0;
}
.link-title-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.link-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text-main, #ffffff);
}
.link-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--secondary);
  color: #fff;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.link-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted, #94a3b8);
  opacity: 0.9;
  margin-top: 2px;
}
.link-arrow {
  opacity: 0.6;
  font-size: 14px;
  transition: transform 0.2s ease;
  margin-right: 8px;
  flex-shrink: 0;
}
.custom-link-card:hover .link-arrow {
  transform: translateX(-4px);
  opacity: 1;
}

/* Animations */
.anim-pulse {
  animation: pulseEffect 2s infinite;
}
@keyframes pulseEffect {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.anim-bounce {
  animation: bounceEffect 2s infinite;
}
@keyframes bounceEffect {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}

.anim-glow {
  box-shadow: 0 0 15px var(--primary);
}

/* Section Title */
.profile-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  text-align: center;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.portfolio-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.portfolio-img {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 150px;
  object-fit: cover;
  display: block;
  box-sizing: border-box;
}
.portfolio-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.portfolio-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
}
.portfolio-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}
.portfolio-item-desc {
  font-size: 0.8rem;
  opacity: 0.75;
  line-height: 1.4;
  flex: 1;
  word-break: break-word;
  overflow-wrap: break-word;
}
.portfolio-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  max-width: 100%;
  word-break: break-word;
}

/* Products & Services Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.product-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.product-img {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 160px;
  object-fit: cover;
  display: block;
  box-sizing: border-box;
}
.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
}
.product-old-price {
  font-size: 0.9rem;
  text-decoration: line-through;
  opacity: 0.5;
}
.product-cta-btn {
  margin-top: auto;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: calc(var(--radius) * 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}
.product-cta-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Profile Footer & Branding */
.profile-footer {
  margin-top: 20px;
  text-align: center;
}
.platform-watermark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: inherit;
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.platform-watermark:hover {
  opacity: 1;
}

/* =========================================================
   8 SPECIFIC TEMPLATES - RICH DISTINCT DESIGN SYSTEMS
   ========================================================= */

/* ---------------------------------------------------------
   1. MINIMAL TEMPLATE (بسيط وراقي - Light Clean Aesthetic)
   --------------------------------------------------------- */
body.template-minimal:not(.has-bg-image) {
  background: #ffffff !important;
}
.template-minimal:not(.has-bg-image) .profile-page-wrapper {
  background: #ffffff !important;
}
.template-minimal .profile-page-wrapper {
  color: #09090b !important;
}
.template-minimal .profile-container {
  max-width: 600px;
}
.template-minimal .profile-avatar {
  border: 3px solid #f4f4f5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.template-minimal .profile-name {
  color: #09090b;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.template-minimal .profile-title {
  color: #71717a;
}
.template-minimal .profile-meta-info {
  color: #71717a;
}
.template-minimal .profile-bio {
  color: #3f3f46;
}
.template-minimal .profile-action-btn {
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #09090b;
}
.template-minimal .profile-action-btn:hover {
  background: #e4e4e7;
  color: #000;
}
.template-minimal .social-icon-btn {
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #18181b;
}
.template-minimal .social-icon-btn:hover {
  background: #18181b;
  color: #ffffff;
}
.template-minimal .custom-link-card {
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 30px; /* Pill links */
  padding: 14px 22px;
  box-shadow: none;
  color: #09090b;
}
.template-minimal .custom-link-card:hover {
  background: #e4e4e7;
  border-color: #d4d4d8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.template-minimal .link-title {
  color: #09090b;
}
.template-minimal .link-desc {
  color: #71717a;
}
.template-minimal .link-arrow {
  color: #18181b;
}
.template-minimal .link-icon-box {
  background: #ffffff;
  color: #18181b;
  border: 1px solid #e4e4e7;
}
.template-minimal .vcard-btn {
  background: #18181b;
  color: #ffffff;
  border: none;
  border-radius: 30px;
}
.template-minimal .platform-watermark {
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #71717a;
}

/* ---------------------------------------------------------
   2. BUSINESS TEMPLATE (الأعمال والشركات)
   --------------------------------------------------------- */
body.template-business:not(.has-bg-image) {
  background: #0b1329 !important;
}
.template-business:not(.has-bg-image) .profile-page-wrapper {
  background: linear-gradient(180deg, #0b1329 0%, #0f172a 100%) !important;
}
.template-business .profile-page-wrapper {
  color: #f8fafc !important;
}
.template-business {
  --radius: 14px;
}
.template-business .profile-container {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 24px;
  padding: 30px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}
.template-business .profile-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  z-index: 0;
}
.template-business .profile-header {
  position: relative;
  z-index: 1;
  padding-top: 20px;
}
.template-business .profile-avatar {
  border-radius: 20px;
  border: 3px solid #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
.template-business .profile-name {
  color: #ffffff;
  font-weight: 800;
}
.template-business .custom-link-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid #334155;
  border-right: 4px solid #2563eb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.template-business .custom-link-card:hover {
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 1);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
  transform: translateY(-2px);
}
.template-business .vcard-btn {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border: 1px solid #3b82f6;
  font-weight: 700;
}

/* ---------------------------------------------------------
   3. CREATOR TEMPLATE (صناع المحتوى - نيون وجريء)
   --------------------------------------------------------- */
body.template-creator:not(.has-bg-image) {
  background: #120b22 !important;
}
.template-creator:not(.has-bg-image) .profile-page-wrapper {
  background: radial-gradient(circle at 50% 10%, #2e1065 0%, #0f0728 100%) !important;
}
.template-creator .profile-page-wrapper {
  color: #ffffff !important;
}
.template-creator {
  --radius: 20px;
}
.template-creator .profile-avatar {
  border: 3px solid #ec4899;
  box-shadow: 0 0 25px #ec4899, 0 0 50px rgba(236, 72, 153, 0.35);
  animation: creatorPulseGlow 3s infinite alternate ease-in-out;
}
@keyframes creatorPulseGlow {
  0% { box-shadow: 0 0 20px #ec4899, 0 0 40px rgba(236, 72, 153, 0.3); }
  100% { box-shadow: 0 0 35px #8b5cf6, 0 0 60px rgba(139, 92, 246, 0.4); }
}
.template-creator .profile-name {
  background: linear-gradient(90deg, #f472b6, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
.template-creator .social-icon-btn {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.2);
}
.template-creator .social-icon-btn:hover {
  background: #ec4899;
  color: #fff;
  box-shadow: 0 0 20px #ec4899;
}
.template-creator .custom-link-card {
  background: rgba(26, 16, 45, 0.65);
  border: 1px solid rgba(236, 72, 153, 0.35);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.15);
}
.template-creator .custom-link-card:hover {
  border-color: #ec4899;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.4);
  transform: translateY(-4px) scale(1.01);
}
.template-creator .link-badge {
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.5);
}

/* ---------------------------------------------------------
   4. DEVELOPER TEMPLATE (المطورين والتقنيين - Terminal / IDE)
   --------------------------------------------------------- */
body.template-developer:not(.has-bg-image) {
  background: #0d1117 !important;
}
.template-developer:not(.has-bg-image) .profile-page-wrapper {
  background: #0d1117 !important;
}
.template-developer .profile-page-wrapper {
  color: #c9d1d9 !important;
}
.template-developer {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
  --radius: 8px;
}
.template-developer .profile-container {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  position: relative;
}
.template-developer .profile-container::before {
  content: "● ● ●  dev@terminal: ~ - bash - 80x24";
  display: block;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  margin: -24px -24px 20px -24px;
  padding: 10px 18px;
  font-size: 0.75rem;
  color: #8b949e;
  font-family: 'JetBrains Mono', monospace;
  direction: ltr;
  text-align: left;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.template-developer .profile-avatar {
  border: 2px solid #10b981;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.template-developer .profile-name {
  color: #7ee787;
  font-family: inherit;
}
.template-developer .profile-name::before {
  content: ">_ ";
  color: #10b981;
  font-weight: 900;
}
.template-developer .profile-title {
  color: #58a6ff;
  font-family: inherit;
}
.template-developer .custom-link-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  font-family: inherit;
}
.template-developer .custom-link-card::before {
  content: "$ exec ";
  color: #58a6ff;
  font-weight: 700;
  margin-left: 8px;
  font-size: 0.85rem;
}
.template-developer .custom-link-card:hover {
  border-color: #58a6ff;
  background: #1c2128;
  box-shadow: 0 0 15px rgba(88, 166, 255, 0.25);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   5. FREELANCER TEMPLATE (المستقلين والمصممين)
   --------------------------------------------------------- */
body.template-freelancer:not(.has-bg-image) {
  background: #120e24 !important;
}
.template-freelancer:not(.has-bg-image) .profile-page-wrapper {
  background: linear-gradient(180deg, #181428 0%, #0f0c1c 100%) !important;
}
.template-freelancer .profile-page-wrapper {
  color: #ffffff !important;
}
.template-freelancer {
  --radius: 20px;
}
.template-freelancer .profile-portfolio-section {
  order: -1; /* Highlights portfolio works front and center */
}
.template-freelancer .profile-avatar {
  border: 3px solid #8b5cf6;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}
.template-freelancer .portfolio-card {
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  background: rgba(30, 27, 46, 0.7);
}
.template-freelancer .portfolio-card:hover {
  border-color: #8b5cf6;
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.35);
  transform: translateY(-5px);
}
.template-freelancer .custom-link-card {
  background: rgba(30, 27, 46, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 18px;
}
.template-freelancer .custom-link-card:hover {
  border-color: #a855f7;
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.25);
}

/* ---------------------------------------------------------
   6. STORE TEMPLATE (المتاجر والمنتجات)
   --------------------------------------------------------- */
body.template-store:not(.has-bg-image) {
  background: #181512 !important;
}
.template-store:not(.has-bg-image) .profile-page-wrapper {
  background: linear-gradient(180deg, #181512 0%, #0c0a09 100%) !important;
}
.template-store .profile-page-wrapper {
  color: #fdf4ff !important;
}
.template-store {
  --radius: 16px;
}
.template-store .profile-products-section {
  order: -1; /* Highlights products showcase right below header */
}
.template-store .product-card {
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(28, 25, 23, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.template-store .product-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
  transform: translateY(-4px);
}
.template-store .product-price {
  color: #f59e0b;
  font-size: 1.35rem;
}
.template-store .product-cta-btn {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* ---------------------------------------------------------
   7. PERSONAL TEMPLATE (الهوية الشخصية)
   --------------------------------------------------------- */
body.template-personal:not(.has-bg-image) {
  background: #0b1528 !important;
}
.template-personal:not(.has-bg-image) .profile-page-wrapper {
  background: linear-gradient(135deg, #0b1528 0%, #1e1b4b 100%) !important;
}
.template-personal .profile-page-wrapper {
  color: #ffffff !important;
}
.template-personal {
  --radius: 18px;
}
.template-personal .avatar-wrapper {
  padding: 4px;
  background: linear-gradient(45deg, #f59e0b, #ec4899, #06b6d4);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.3);
}
.template-personal .profile-avatar {
  width: 125px;
  height: 125px;
  border: 3px solid #0f172a;
}
.template-personal .profile-bio {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 10px;
}
.template-personal .custom-link-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}

/* ---------------------------------------------------------
   8. PROFESSIONAL TEMPLATE (النخبة والمستشارين - VIP Luxury)
   --------------------------------------------------------- */
body.template-professional:not(.has-bg-image) {
  background: #041a13 !important;
}
.template-professional:not(.has-bg-image) .profile-page-wrapper {
  background: radial-gradient(circle at top, #064e3b 0%, #021a12 100%) !important;
}
.template-professional .profile-page-wrapper {
  color: #ecfdf5 !important;
}
.template-professional {
  --radius: 16px;
}
.template-professional .profile-container {
  background: radial-gradient(circle at top, rgba(6, 78, 59, 0.25) 0%, rgba(3, 20, 15, 0.85) 100%), #041a13;
  border: 1px solid rgba(217, 119, 6, 0.4);
  border-radius: 22px;
  padding: 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(217, 119, 6, 0.15);
}
.template-professional .profile-avatar {
  border: 3px solid #d97706;
  box-shadow: 0 0 25px rgba(217, 119, 6, 0.45);
}
.template-professional .profile-name {
  color: #fef08a;
  font-weight: 800;
}
.template-professional .profile-title {
  color: #6ee7b7;
}
.template-professional .custom-link-card {
  background: rgba(6, 78, 59, 0.45);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 14px;
  color: #fef08a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.template-professional .custom-link-card:hover {
  border-color: #d97706;
  box-shadow: 0 0 22px rgba(217, 119, 6, 0.35);
  transform: translateY(-2px);
}
.template-professional .vcard-btn {
  background: linear-gradient(135deg, #059669 0%, #d97706 100%);
  border: 1px solid #fbbf24;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
}

/* =========================================================
   BACKGROUND IMAGE & OVERLAY SYSTEM
   ========================================================= */
.profile-page-wrapper.has-bg-image {
  background-size: cover !important;
  background-position: center center !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  position: relative;
}

.profile-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  transition: all 0.3s ease;
}

.profile-bg-overlay.overlay-dark {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.profile-bg-overlay.overlay-glass {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.profile-bg-overlay.overlay-gradient {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 27, 75, 0.72) 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.profile-bg-overlay.overlay-none {
  background: transparent;
}

.profile-page-wrapper.has-bg-image .profile-container {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------
   9. ROYAL LUXURY GOLD TEMPLATE (الفخامة الملكية)
   --------------------------------------------------------- */
body.template-luxury_gold:not(.has-bg-image) {
  background: #0c0a09 !important;
}
.template-luxury_gold:not(.has-bg-image) .profile-page-wrapper {
  background: radial-gradient(circle at top, #1c1917 0%, #0c0a09 100%) !important;
}
.template-luxury_gold .profile-page-wrapper {
  color: #fef3c7 !important;
}
.template-luxury_gold {
  --radius: 16px;
}
.template-luxury_gold .profile-container {
  background: radial-gradient(circle at top, #1c1917 0%, #0c0a09 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 24px;
  padding: 34px 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(217, 119, 6, 0.2);
  position: relative;
}
.template-luxury_gold .profile-container::after {
  content: "";
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fbbf24, #f59e0b, transparent);
}
.template-luxury_gold .avatar-wrapper {
  padding: 4px;
  background: linear-gradient(135deg, #fbbf24 0%, #b45309 50%, #fef3c7 100%);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
  display: inline-block;
}
.template-luxury_gold .profile-avatar {
  border: 2px solid #0c0a09;
}
.template-luxury_gold .profile-name {
  color: #fef3c7;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  letter-spacing: 0.5px;
}
.template-luxury_gold .profile-title {
  color: #fbbf24;
  font-weight: 600;
}
.template-luxury_gold .custom-link-card {
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.9) 0%, rgba(41, 37, 36, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  color: #fef3c7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.template-luxury_gold .custom-link-card::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 4px;
  background: linear-gradient(180deg, #fbbf24, #d97706);
}
.template-luxury_gold .custom-link-card:hover {
  border-color: #fbbf24;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
  transform: translateY(-3px);
}
.template-luxury_gold .link-icon-box {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.template-luxury_gold .vcard-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  border: 1px solid #fde68a;
  color: #0c0a09;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

/* ---------------------------------------------------------
   10. CYBERPUNK NEON FUTURE TEMPLATE (المستقبل والسايبر)
   --------------------------------------------------------- */
body.template-cyberpunk:not(.has-bg-image) {
  background: #050508 !important;
}
.template-cyberpunk:not(.has-bg-image) .profile-page-wrapper {
  background: #050508 !important;
}
.template-cyberpunk .profile-page-wrapper {
  color: #00ffcc !important;
}
.template-cyberpunk {
  font-family: 'JetBrains Mono', 'Cairo', monospace !important;
  --radius: 4px;
}
.template-cyberpunk .profile-container {
  background: #090914;
  border: 2px solid #00f0ff;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  padding: 30px 24px;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.35), inset 0 0 25px rgba(255, 0, 60, 0.15);
  position: relative;
}
.template-cyberpunk .profile-container::before {
  content: "// SYSTEM_BOOT: OK // NEON_PROTOCOL_V4";
  display: block;
  font-size: 0.7rem;
  color: #ff003c;
  margin-bottom: 12px;
  letter-spacing: 2px;
  font-weight: 800;
}
.template-cyberpunk .profile-avatar {
  border-radius: 0;
  clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
  border: 2px solid #ff003c;
  box-shadow: 0 0 20px #ff003c, 0 0 40px rgba(0, 240, 255, 0.5);
}
.template-cyberpunk .profile-name {
  color: #00f0ff;
  font-weight: 900;
  text-shadow: 0 0 10px #00f0ff, 0 0 20px rgba(0, 240, 255, 0.8);
  letter-spacing: 1px;
}
.template-cyberpunk .profile-title {
  color: #fcee0a;
  background: #000000;
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid #fcee0a;
  font-size: 0.82rem;
  font-weight: 700;
}
.template-cyberpunk .custom-link-card {
  background: rgba(10, 15, 30, 0.85);
  border: 1.5px solid #00f0ff;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}
.template-cyberpunk .custom-link-card:hover {
  border-color: #ff003c;
  background: rgba(20, 10, 30, 0.95);
  box-shadow: 0 0 25px rgba(255, 0, 60, 0.4);
  transform: translateX(-4px);
}
.template-cyberpunk .link-icon-box {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border-radius: 0;
}
.template-cyberpunk .vcard-btn {
  background: #fcee0a;
  color: #000000;
  font-weight: 900;
  border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  border: none;
  box-shadow: 0 0 15px rgba(252, 238, 10, 0.5);
}

/* ---------------------------------------------------------
   11. FROSTED GLASSMORPHISM TEMPLATE (الزجاجي الكريستالي)
   --------------------------------------------------------- */
body.template-glassmorphism:not(.has-bg-image) {
  background: #1e1b4b !important;
}
.template-glassmorphism:not(.has-bg-image) .profile-page-wrapper {
  background: linear-gradient(135deg, #31104b 0%, #1e1b4b 50%, #0f172a 100%) !important;
}
.template-glassmorphism .profile-page-wrapper {
  color: #ffffff !important;
}
.template-glassmorphism {
  --radius: 24px;
}
.template-glassmorphism .profile-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 32px;
  padding: 34px 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.template-glassmorphism .profile-avatar {
  border: 3px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}
.template-glassmorphism .custom-link-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.template-glassmorphism .custom-link-card:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}
.template-glassmorphism .link-icon-box {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.template-glassmorphism .vcard-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

/* ---------------------------------------------------------
   12. WARM SUNSET TEMPLATE (الغروب الدافئ)
   --------------------------------------------------------- */
body.template-sunset_warm:not(.has-bg-image) {
  background: #1c0b1f !important;
}
.template-sunset_warm:not(.has-bg-image) .profile-page-wrapper {
  background: linear-gradient(180deg, #311042 0%, #170724 100%) !important;
}
.template-sunset_warm .profile-page-wrapper {
  color: #fed7aa !important;
}
.template-sunset_warm {
  --radius: 22px;
}
.template-sunset_warm .profile-container {
  background: rgba(30, 27, 75, 0.65);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: 28px;
  padding: 32px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.template-sunset_warm .avatar-wrapper {
  padding: 4px;
  background: linear-gradient(135deg, #f43f5e, #fb923c, #fbbf24);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.4);
  display: inline-block;
}
.template-sunset_warm .profile-avatar {
  border: 2px solid #1e1b4b;
}
.template-sunset_warm .profile-name {
  background: linear-gradient(90deg, #fecdd3, #fed7aa, #fef08a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.template-sunset_warm .custom-link-card {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12) 0%, rgba(251, 146, 60, 0.12) 100%);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 20px;
}
.template-sunset_warm .custom-link-card:hover {
  border-color: #f43f5e;
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.3);
  transform: translateY(-3px);
}
.template-sunset_warm .vcard-btn {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  border: none;
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}

/* ---------------------------------------------------------
   13. EMERALD BOTANICAL TEMPLATE (الزمرد والطبيعة)
   --------------------------------------------------------- */
body.template-emerald_nature:not(.has-bg-image) {
  background: #022c22 !important;
}
.template-emerald_nature:not(.has-bg-image) .profile-page-wrapper {
  background: radial-gradient(circle at top, #064e3b 0%, #022c22 100%) !important;
}
.template-emerald_nature .profile-page-wrapper {
  color: #ecfdf5 !important;
}
.template-emerald_nature {
  --radius: 18px;
}
.template-emerald_nature .profile-container {
  background: radial-gradient(circle at top, #064e3b 0%, #022c22 100%);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 26px;
  padding: 32px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.template-emerald_nature .profile-avatar {
  border: 3px solid #34d399;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}
.template-emerald_nature .profile-name {
  color: #ecfdf5;
  font-weight: 800;
}
.template-emerald_nature .profile-title {
  color: #6ee7b7;
}
.template-emerald_nature .custom-link-card {
  background: rgba(4, 47, 46, 0.7);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 16px;
  color: #ecfdf5;
}
.template-emerald_nature .custom-link-card:hover {
  border-color: #34d399;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
  transform: translateY(-3px);
}
.template-emerald_nature .link-icon-box {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.template-emerald_nature .vcard-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid #6ee7b7;
  color: #ffffff;
  font-weight: 800;
}

/* ---------------------------------------------------------
   14. RETRO VINTAGE TEMPLATE (الكلاسيكي العتيق)
   --------------------------------------------------------- */
body.template-retro_vintage:not(.has-bg-image) {
  background: #1c1917 !important;
}
.template-retro_vintage:not(.has-bg-image) .profile-page-wrapper {
  background: #1c1917 !important;
}
.template-retro_vintage .profile-page-wrapper {
  color: #fef3c7 !important;
}
.template-retro_vintage {
  --radius: 10px;
  font-family: 'Amiri', 'Cairo', serif !important;
}
.template-retro_vintage .profile-container {
  background: #1c1917;
  border: 3px double #78350f;
  border-radius: 14px;
  padding: 34px 26px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  position: relative;
}
.template-retro_vintage .profile-container::before {
  content: "★ EST. CLASSIC EDITION ★";
  display: block;
  text-align: center;
  font-size: 0.72rem;
  color: #d97706;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.template-retro_vintage .profile-avatar {
  border: 2px solid #92400e;
  border-radius: 50%;
  filter: sepia(0.25) contrast(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}
.template-retro_vintage .profile-name {
  color: #fef3c7;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.template-retro_vintage .profile-title {
  color: #d97706;
  font-style: italic;
}
.template-retro_vintage .custom-link-card {
  background: #292524;
  border: 1px solid #78350f;
  border-radius: 8px;
  color: #fef3c7;
}
.template-retro_vintage .custom-link-card:hover {
  border-color: #d97706;
  background: #332d29;
  transform: translateY(-2px);
}
.template-retro_vintage .link-icon-box {
  background: #1c1917;
  color: #d97706;
  border: 1px solid #78350f;
}
.template-retro_vintage .vcard-btn {
  background: #78350f;
  border: 1px solid #d97706;
  color: #fef3c7;
  font-weight: 700;
  border-radius: 6px;
}

/* ---------------------------------------------------------
   15. PURE DARK OLED TEMPLATE (الأسود المطلق)
   --------------------------------------------------------- */
body.template-dark_modern:not(.has-bg-image) {
  background: #000000 !important;
}
.template-dark_modern:not(.has-bg-image) .profile-page-wrapper {
  background: #000000 !important;
}
.template-dark_modern .profile-page-wrapper {
  color: #ffffff !important;
}
.template-dark_modern {
  --radius: 14px;
}
.template-dark_modern .profile-container {
  background: #0a0a0a;
  border: 1px solid #262626;
  border-radius: 24px;
  padding: 34px 26px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
}
.template-dark_modern .profile-avatar {
  border: 1.5px solid #404040;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
.template-dark_modern .profile-name {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.template-dark_modern .profile-title {
  color: #a3a3a3;
}
.template-dark_modern .custom-link-card {
  background: #141414;
  border: 1px solid #262626;
  border-radius: 14px;
  color: #ffffff;
  transition: all 0.2s ease;
}
.template-dark_modern .custom-link-card:hover {
  border-color: #ffffff;
  background: #1f1f1f;
  transform: scale(1.015);
}
.template-dark_modern .link-icon-box {
  background: #262626;
  color: #ffffff;
}
.template-dark_modern .vcard-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  font-weight: 800;
}
.template-dark_modern .vcard-btn:hover {
  background: #e5e5e5;
}
.template-dark_modern .dock-action-btn.dock-vcard {
  background: #ffffff !important;
  color: #09090b !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25) !important;
}
.template-dark_modern .dock-action-btn.dock-vcard i,
.template-dark_modern .dock-action-btn.dock-vcard span {
  color: #09090b !important;
}

/* ---------------------------------------------------------
   16. GAMING & STREAMER TEMPLATE (الألعاب والبث)
   --------------------------------------------------------- */
body.template-game_streamer:not(.has-bg-image) {
  background: #070312 !important;
}
.template-game_streamer:not(.has-bg-image) .profile-page-wrapper {
  background: radial-gradient(circle at 50% 15%, #2c0b4d 0%, #070312 100%) !important;
}
.template-game_streamer .profile-page-wrapper {
  color: #ffffff !important;
}
.template-game_streamer {
  --radius: 16px;
}
.template-game_streamer .profile-container {
  background: #090514;
  border: 1px solid rgba(147, 51, 234, 0.4);
  border-radius: 22px;
  padding: 30px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(147, 51, 234, 0.2);
  position: relative;
}
.template-game_streamer .avatar-wrapper {
  position: relative;
  display: inline-block;
}
.template-game_streamer .avatar-wrapper::after {
  content: "● LIVE";
  position: absolute;
  top: 0;
  right: 0;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 8px;
  border: 2px solid #090514;
  animation: streamerLivePulse 1.5s infinite;
}
@keyframes streamerLivePulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
.template-game_streamer .profile-avatar {
  border: 3px solid #9333ea;
  box-shadow: 0 0 25px rgba(147, 51, 234, 0.5);
}
.template-game_streamer .profile-name {
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(147, 51, 234, 0.6);
}
.template-game_streamer .profile-title {
  color: #22d3ee;
}
.template-game_streamer .custom-link-card {
  background: rgba(22, 13, 38, 0.85);
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: 14px;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.template-game_streamer .custom-link-card:hover {
  border-color: #06b6d4;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
  transform: translateY(-3px);
}
.template-game_streamer .link-icon-box {
  background: rgba(147, 51, 234, 0.25);
  color: #c084fc;
}
.template-game_streamer .vcard-btn {
  background: linear-gradient(135deg, #9333ea 0%, #06b6d4 100%);
  border: none;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(147, 51, 234, 0.5);
}

/* ==========================================================================
   Advanced Responsive Engine (Desktop Pro & Mobile App Experience)
   ========================================================================== */

/* Base Layout Grid Defaults */
.profile-layout-grid {
  width: 100%;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-hero-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  box-sizing: border-box;
}

.profile-feed-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Desktop View Mode Switcher Toolbar (Visible on Desktop >= 992px) */
.desktop-view-mode-bar {
  display: none;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.view-mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: inherit;
}

.view-mode-toggles {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 10px;
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-mode-btn:hover {
  color: #ffffff;
}

.view-mode-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Desktop QR Widget (Hidden on Mobile) */
.desktop-qr-widget {
  display: none;
  width: 100%;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 16px;
  box-sizing: border-box;
  text-align: center;
}

.desktop-qr-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
}

.desktop-qr-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: #ffffff;
  padding: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.desktop-qr-info {
  flex: 1;
}

.desktop-qr-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main, #ffffff);
  margin-bottom: 3px;
}

.desktop-qr-text {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
  line-height: 1.4;
}

/* Mobile Sticky Bottom Floating Action Dock */
.mobile-sticky-dock {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99998;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  padding: 6px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  gap: 8px;
  align-items: center;
  max-width: calc(100% - 32px);
  width: max-content;
}

.dock-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dock-action-btn:hover,
.dock-action-btn:active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.dock-action-btn.dock-vcard {
  background: var(--dock-vcard-bg, var(--primary, #4f46e5));
  color: var(--dock-vcard-text, #ffffff);
  border-color: transparent;
}
.dock-action-btn.dock-vcard i,
.dock-action-btn.dock-vcard span {
  color: inherit;
}

.dock-action-btn.dock-wa {
  background: #25D366;
  color: #ffffff;
  border-color: transparent;
}

/* --- DESKTOP VIEWPORTS (min-width: 992px) --- */
@media (min-width: 992px) {
  :root {
    --profile-max-w: 1140px;
  }

  .desktop-view-mode-bar {
    display: flex;
  }

  .desktop-qr-widget {
    display: block;
  }

  .profile-layout-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    width: 100%;
  }

  .profile-hero-column {
    position: sticky;
    top: 24px;
    z-index: 10;
  }

  .profile-hero-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 30px 24px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.35);
  }

  .portfolio-grid,
  .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Desktop Mobile Mockup Simulation Frame */
  .profile-layout-grid.mobile-mockup-frame {
    display: block;
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-color, #0f172a);
    border: 12px solid #1e293b;
    border-radius: 48px;
    padding: 24px 18px 40px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
  }

  .profile-layout-grid.mobile-mockup-frame::before {
    content: '';
    display: block;
    width: 120px;
    height: 18px;
    background: #1e293b;
    border-radius: 0 0 14px 14px;
    margin: -24px auto 20px auto;
  }

  .profile-layout-grid.mobile-mockup-frame .profile-hero-column {
    position: static;
    margin-bottom: 14px;
  }

  .profile-layout-grid.mobile-mockup-frame .vcard-btn-container {
    margin-top: 18px !important;
    margin-bottom: 14px !important;
    width: 100%;
  }

  .profile-layout-grid.mobile-mockup-frame .social-links-bar {
    gap: 14px;
    margin: 28px 0 36px !important;
  }

  .profile-layout-grid.mobile-mockup-frame .profile-hero-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .profile-layout-grid.mobile-mockup-frame .desktop-qr-widget {
    display: none;
  }

  .profile-layout-grid.mobile-mockup-frame .portfolio-grid,
  .profile-layout-grid.mobile-mockup-frame .products-grid {
    grid-template-columns: 1fr;
  }
}

/* --- MOBILE VIEWPORTS (max-width: 991px) --- */
@media (max-width: 991px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative !important;
  }

  .profile-page-wrapper {
    padding: 18px 12px 105px !important;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .profile-container,
  [class*="template-"] .profile-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .profile-layout-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .profile-hero-column {
    position: static;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 14px;
    box-sizing: border-box !important;
  }

  .profile-hero-card {
    padding: 18px 12px 22px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    gap: 14px;
  }

  .profile-top-actions {
    width: 100% !important;
    padding: 0 4px !important;
    margin-bottom: 6px !important;
    box-sizing: border-box !important;
  }

  .profile-header {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
  }

  .profile-avatar {
    width: 96px !important;
    height: 96px !important;
  }

  .profile-name {
    font-size: 1.32rem !important;
    line-height: 1.4 !important;
    margin: 10px 0 6px !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .profile-title {
    font-size: 0.94rem !important;
    line-height: 1.45 !important;
    margin-bottom: 8px !important;
    padding: 0 6px !important;
    word-break: break-word !important;
  }

  .profile-meta-info {
    font-size: 0.82rem !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
    padding: 0 4px !important;
    justify-content: center !important;
  }

  .profile-bio {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    padding: 0 6px !important;
    margin: 6px auto 0 !important;
    word-break: break-word !important;
  }

  .vcard-btn-container {
    margin-top: 18px !important;
    margin-bottom: 14px !important;
    width: 100%;
  }

  .social-links-bar {
    gap: 14px;
    margin: 28px 0 36px !important;
  }

  .social-icon-btn {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }

  .profile-feed-column {
    width: 100%;
    gap: 24px;
  }

  .custom-links-container {
    gap: 16px;
  }

  .custom-link-card {
    padding: 16px 18px;
  }

  .link-content {
    gap: 14px;
  }

  .link-icon-box {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }

  .link-texts {
    gap: 6px;
  }

  .link-title-wrapper {
    gap: 8px;
  }

  .link-title {
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .link-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .link-desc {
    font-size: 0.82rem;
    line-height: 1.55;
    margin-top: 2px;
  }

  .profile-section-title {
    margin: 28px 0 16px;
    font-size: 1.15rem;
  }

  /* Robust Mobile Boundaries for Portfolio & Products */
  .profile-portfolio-section,
  .profile-products-section,
  .profile-feed-column {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .portfolio-grid,
  .products-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .portfolio-card,
  .product-card {
    width: 92% !important;
    max-width: 350px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45) !important;
  }

  .portfolio-img,
  .product-card-img,
  .product-img-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 135px !important;
    max-height: 135px !important;
    box-sizing: border-box !important;
    object-fit: cover !important;
    display: block !important;
  }

  .portfolio-info,
  .product-info {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 12px 14px !important;
    gap: 4px !important;
  }

  .portfolio-category,
  .product-cat-tag {
    font-size: 0.72rem !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
    display: inline-block !important;
  }

  .portfolio-item-title,
  .product-title {
    font-size: 0.94rem !important;
    line-height: 1.4 !important;
    margin: 2px 0 4px !important;
    font-weight: 700 !important;
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  .portfolio-item-desc,
  .product-desc {
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
    opacity: 0.88 !important;
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  .portfolio-link {
    font-size: 0.82rem !important;
    padding-top: 2px !important;
    max-width: 100% !important;
    word-break: break-word !important;
  }

  .product-cta-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
  }

  .btn-card-order,
  .btn-card-cart {
    font-size: 0.78rem !important;
    padding: 7px 10px !important;
    border-radius: 8px !important;
  }

  .profile-avatar {
    width: 105px;
    height: 105px;
  }

  .profile-name {
    font-size: 1.45rem;
  }

  /* Sleek, Polished Mobile Floating Action Dock */
  .mobile-sticky-dock {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99998 !important;
    background: rgba(15, 23, 42, 0.88) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 50px !important;
    padding: 6px 10px !important;
    gap: 8px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    max-width: calc(100vw - 28px) !important;
    width: max-content !important;
    box-sizing: border-box !important;
  }

  .dock-action-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), background 0.18s ease, box-shadow 0.18s ease !important;
  }

  .dock-action-btn:active {
    transform: scale(0.9) !important;
  }

  .dock-action-btn span:not(.dock-cart-badge) {
    display: none !important;
  }
}

/* Extra Small Phones (max-width: 420px) */
@media (max-width: 420px) {
  .profile-page-wrapper {
    padding: 16px 12px 130px !important;
  }

  .custom-link-card {
    padding: 14px 14px;
  }

  .link-content {
    gap: 12px;
  }

  .link-icon-box {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   Modern App Modal System (Glassmorphic QR & Share Modals)
   ========================================================================== */
.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.app-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.app-modal-dialog {
  background: rgba(18, 24, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-width: 380px;
  width: 100%;
  padding: 26px 22px 22px;
  position: relative;
  color: #ffffff;
  text-align: center;
  font-family: inherit;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-modal-overlay.active .app-modal-dialog {
  transform: scale(1) translateY(0);
}

.app-modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.app-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: rotate(90deg);
}

.app-modal-header {
  margin-bottom: 16px;
  padding: 0 10px;
}
.app-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.app-modal-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

/* QR Card Presentation */
.qr-card-presentation {
  background: #ffffff;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  display: inline-block;
  margin: 4px auto 12px;
  position: relative;
}
.qr-card-presentation img {
  width: 200px;
  height: 200px;
  display: block;
  border-radius: 8px;
}
.qr-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 14px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  direction: ltr;
}

/* Modal Actions */
.app-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
}
.app-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.app-modal-btn-primary {
  background: linear-gradient(135deg, var(--primary, #4f46e5) 0%, #6366f1 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}
.app-modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
  filter: brightness(1.08);
}
.app-modal-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.app-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Social Share Grid */
.modal-social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.modal-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 16px;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 1.3rem;
  transition: all 0.25s ease;
}
.modal-social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.modal-social-btn span {
  font-size: 0.72rem;
  font-weight: 600;
}
.modal-social-btn.share-wa { background: #25D366; }
.modal-social-btn.share-tg { background: #0088cc; }
.modal-social-btn.share-tw { background: #0f1419; border: 1px solid rgba(255,255,255,0.15); }
.modal-social-btn.share-fb { background: #1877F2; }

/* Link Copy Field */
.modal-copy-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 4px 6px 4px 12px;
  margin-top: 14px;
  gap: 8px;
}
.modal-copy-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  font-family: inherit;
  direction: ltr;
  text-align: left;
  outline: none;
}
.modal-copy-btn {
  background: var(--primary, #4f46e5);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.modal-copy-btn:hover {
  filter: brightness(1.15);
}



