/*
Theme Name: Zaffehpro
Theme URI: 
Author: 
Description: A premium Arabic music library theme. One unified song library with a 30-second preview player, credit-based downloads, on-site login and registration, and a mobile-first, touch-friendly selection flow. Built for wedding songs and DJ libraries.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zafat-pro
Tags: rtl-language, music, arabic, custom-post-types, mobile-first
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-bg:        #0a0a0f;
  --color-surface:   #12121a;
  --color-surface2:  #1a1a26;
  --color-border:    #2a2a3a;
  --color-gold:      #c9a84c;
  --color-gold-light:#e8c96a;
  --color-gold-muted:#8a6f30;
  --color-text:      #f0ede8;
  --color-muted:     #8a8a9a;
  --color-accent:    #7c5cbf;
  --color-success:   #2d9c6b;
  --color-danger:    #c0392b;
  --radius:          12px;
  --radius-sm:       8px;
  --radius-lg:       20px;
  --radius-pill:     100px;
  --shadow-card:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:     0 0 40px rgba(201,168,76,0.12);
  --font-arabic:     'Tajawal', 'Cairo', 'Segoe UI', sans-serif;
  --font-display:    'Playfair Display', 'Georgia', serif;
  --transition:      all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:           70px;
  --bottom-nav-h:    72px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-arabic);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body.ltr-mode { direction: ltr; }

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-arabic); border: none; outline: none; }
input, textarea, select { font-family: var(--font-arabic); }
ul, ol { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text);
}

.display-title {
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold), var(--color-gold-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-wrapper {
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--bottom-nav-h) + 20px);
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .site-wrapper { padding-bottom: 0; }
}

/* ============================================================
   TOP NAVIGATION (Desktop)
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-muted));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav { display: none; }

@media (min-width: 1024px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .header-nav a {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-muted);
    transition: var(--transition);
  }

  .header-nav a:hover,
  .header-nav a.active {
    color: var(--color-gold);
    background: rgba(201,168,76,0.1);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-lang {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.btn-lang:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--color-gold);
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition);
}
.btn-credits:hover { background: rgba(201,168,76,0.2); }

.btn-account {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.btn-account:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* ============================================================
   BOTTOM NAVIGATION (Mobile)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: rgba(18,18,26,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--color-muted);
  font-size: 0.65rem;
  font-weight: 600;
  transition: var(--transition);
  min-width: 64px;
}

.bottom-nav a .nav-icon {
  font-size: 1.4rem;
  transition: var(--transition);
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--color-gold);
}

.bottom-nav a.active .nav-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.5));
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

/* ============================================================
   NOW PLAYING BAR
   ============================================================ */
.now-playing-bar {
  position: fixed;
  bottom: var(--bottom-nav-h);
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(26,26,38,0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border);
  display: none;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.now-playing-bar.active { display: flex; }

.np-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-surface2);
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}

.np-info { flex: 1; min-width: 0; }
.np-title { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-cat { font-size: 0.72rem; color: var(--color-gold); }

.np-progress {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar {
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s linear;
}

.np-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--color-muted);
}

.np-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.np-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.np-btn.play-btn {
  background: var(--color-gold);
  color: var(--color-bg);
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
}

.np-btn:hover { color: var(--color-gold); }
.np-btn.play-btn:hover { background: var(--color-gold-light); }

@media (min-width: 1024px) {
  .now-playing-bar {
    bottom: 0;
    padding: 0 40px;
    height: 72px;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-muted));
  color: var(--color-bg);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--color-text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
}

.section-link {
  font-size: 0.85rem;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { opacity: 0.8; }

/* ============================================================
   SONG / ZAFFA CARD
   ============================================================ */
/* ============================================================
   SONG CARD — clean touch-friendly row (no thumbnail, no emoji)
   ============================================================ */
.music-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .music-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (min-width: 1200px) {
  .music-grid { grid-template-columns: repeat(3, 1fr); }
}

.music-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 68px;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.music-card:hover { border-color: rgba(201,168,76,0.4); }

/* Selected state — clear, high-contrast on touch */
.music-card.selected {
  border-color: var(--color-gold);
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.03));
}

/* Inline SVG icon sizing */
.ic { display: block; }

/* Play / preview button — ALWAYS visible, large tap target */
.card-play-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(201,168,76,0.28);
  border: none;
}
.card-play-btn:hover { background: var(--color-gold-light); }
.card-play-btn.is-disabled { background: var(--color-surface2); color: var(--color-muted); box-shadow: none; cursor: default; }

/* Icon toggle: show play by default, pause while this card plays */
.card-play-btn .icon-pause,
.music-card.playing .card-play-btn .icon-play { display: none; }
.music-card.playing .card-play-btn .icon-pause { display: block; }

.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.tag {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--color-surface2);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.tag-gold {
  background: rgba(201,168,76,0.1);
  color: var(--color-gold);
  border-color: rgba(201,168,76,0.3);
}

.card-credits {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-gold);
}
.card-credits .credit-label { color: var(--color-muted); font-weight: 600; font-size: 0.72rem; }

/* Add-to-list button — ALWAYS visible, large tap target */
.card-add-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface2);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: 1px solid var(--color-border);
}
.card-add-btn:hover { border-color: var(--color-gold); color: var(--color-gold); }

/* Icon toggle: plus by default, check when added */
.card-add-btn .add-icon-check { display: none; }
.card-add-btn.added {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-bg);
}
.card-add-btn.added .add-icon-plus { display: none; }
.card-add-btn.added .add-icon-check { display: block; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: 60px 0 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  font-size: 0.8rem;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-sub {
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label { font-size: 0.75rem; color: var(--color-muted); }

@media (min-width: 768px) {
  .hero { padding: 80px 0 60px; }
  .hero-title { font-size: 3.5rem; }
}

/* ============================================================
   CATEGORY TABS / FILTER
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(201,168,76,0.1);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* ============================================================
   CATEGORY CARDS (Homepage)
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.category-card {
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card:hover { transform: translateY(-3px); }

.cat-zafat {
  background: linear-gradient(145deg, #1a1208 0%, #2d1f0a 50%, #3d2b0d 100%);
  border: 1px solid rgba(201,168,76,0.2);
}

.cat-nasheed {
  background: linear-gradient(145deg, #0a0a1a 0%, #0d0d28 50%, #10103a 100%);
  border: 1px solid rgba(124,92,191,0.2);
}

.cat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.cat-name {
  font-size: 1.1rem;
  font-weight: 800;
}

.cat-count {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 4px;
}

.cat-bg-text {
  position: absolute;
  top: 10px;
  left: -10px;
  font-size: 5rem;
  font-weight: 900;
  opacity: 0.04;
  pointer-events: none;
  line-height: 1;
}

/* ============================================================
   REQUEST FORM
   ============================================================ */
.form-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin: 40px 0;
}

.form-header {
  margin-bottom: 28px;
}

.form-header h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.form-note {
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 12px 16px;
  background: rgba(201,168,76,0.05);
  border-right: 3px solid var(--color-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-label span {
  color: var(--color-gold);
  margin-right: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.9rem;
  transition: var(--transition);
  direction: rtl;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-muted); }

.form-select { cursor: pointer; }

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  margin-top: 8px;
  width: 100%;
}

.form-success {
  display: none;
  text-align: center;
  padding: 32px;
}

.form-success.show { display: block; }
.form-success-icon { font-size: 3rem; margin-bottom: 12px; }
.form-success h3 { font-size: 1.2rem; margin-bottom: 8px; }
.form-success p { color: var(--color-muted); font-size: 0.9rem; }

/* ============================================================
   SELECTION / CART
   ============================================================ */
.selection-bar {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 10px);
  left: 16px;
  right: 16px;
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.05));
  border: 1px solid rgba(201,168,76,0.3);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: none;
  align-items: center;
  justify-content: space-between;
  z-index: 998;
  animation: slideUp 0.3s ease;
}

.selection-bar.active { display: flex; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.selection-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selection-count {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.selection-text { font-size: 0.9rem; font-weight: 600; }

@media (min-width: 1024px) {
  .selection-bar {
    bottom: 20px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    min-width: 400px;
  }
}

/* ============================================================
   SELECTIONS PAGE
   ============================================================ */
.selections-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selection-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px;
  transition: var(--transition);
}

.selection-item:hover { border-color: rgba(201,168,76,0.3); }

.si-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-surface2);
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}

.si-info { flex: 1; }
.si-title { font-size: 0.95rem; font-weight: 700; }
.si-meta { font-size: 0.8rem; color: var(--color-muted); margin-top: 2px; }

.si-credits {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.si-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}
.si-remove:hover { color: var(--color-danger); background: rgba(192,57,43,0.1); }

.selections-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--color-muted); font-size: 0.9rem; }
.summary-value { font-weight: 700; }
.summary-total .summary-label { color: var(--color-text); font-size: 1rem; font-weight: 700; }
.summary-total .summary-value { color: var(--color-gold); font-size: 1.1rem; }

/* ============================================================
   CREDITS INFO BOX
   ============================================================ */
.credits-info-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(201,168,76,0.05);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.credits-icon { font-size: 1.5rem; flex-shrink: 0; }

.credits-text h4 {
  font-size: 0.9rem;
  color: var(--color-gold);
  margin-bottom: 4px;
}

.credits-text p {
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* ============================================================
   ACCOUNT PAGE
   ============================================================ */
.account-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0 24px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.account-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-muted));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-bg);
  font-weight: 800;
}

.account-name { font-size: 1.3rem; font-weight: 800; }
.account-email { font-size: 0.85rem; color: var(--color-muted); }

.credits-card {
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.05));
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.credits-balance {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.credits-balance-label { color: var(--color-muted); font-size: 0.85rem; }

.account-menu { display: flex; flex-direction: column; gap: 2px; }

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.account-menu-item:hover {
  background: var(--color-surface);
  color: var(--color-gold);
}

.account-menu-item .menu-icon { font-size: 1.2rem; width: 24px; text-align: center; }
.account-menu-item .menu-arrow { margin-right: auto; color: var(--color-muted); }

/* ============================================================
   QUICK SELECT PACKAGES
   ============================================================ */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.package-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.package-card:hover,
.package-card.selected {
  border-color: var(--color-gold);
  background: rgba(201,168,76,0.05);
}

.pkg-num {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pkg-label { font-size: 0.75rem; color: var(--color-muted); margin-top: 4px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.empty-text { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0 24px;
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand p {
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: 12px;
}

.footer-heading {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-gold);
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--color-muted); font-size: 0.85rem; transition: var(--transition); }
.footer-links a:hover { color: var(--color-gold); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  margin-top: 32px;
  padding-top: 20px;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8rem;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.page-header p { color: var(--color-muted); font-size: 0.9rem; }

/* ============================================================
   LOADING STATES
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface2) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success { border-color: rgba(45,156,107,0.4); color: #4ade80; }
.toast.warning { border-color: rgba(201,168,76,0.4); color: var(--color-gold); }

@keyframes toastIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   AUDIO WAVEFORM ANIMATION
   ============================================================ */
.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.wave-bar {
  width: 3px;
  border-radius: 2px;
  background: var(--color-gold);
  animation: wave 0.8s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; }
.wave-bar:nth-child(5) { animation-delay: 0s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-muted); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.divider { height: 1px; background: var(--color-border); margin: 32px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   ADMIN STYLES (within wp-admin bar offset)
   ============================================================ */
.admin-bar .site-header { top: 32px; }
.admin-bar .bottom-nav { padding-bottom: 0; }

/* ============================================================
   ZAFFATKO — ICON SYSTEM + CHECKOUT (v2.0.0)
   Inline SVG icons inherit currentColor. No emoji anywhere.
   ============================================================ */
.ic { display: block; }
button svg, a svg { pointer-events: none; }

/* Header logo mark */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(201,168,76,0.12);
  color: var(--color-gold);
}

/* Header credit badge + account button */
.btn-credits { display: inline-flex; align-items: center; gap: 6px; }
.btn-credits .ic-star { color: var(--color-gold); }
.btn-credits-label { font-size: 0.8rem; }
.btn-account { display: inline-flex; align-items: center; justify-content: center; }
.btn-account svg { display: block; }

/* Bottom-nav icons (SVG instead of emoji) */
.bottom-nav a .nav-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.bottom-nav a .nav-icon svg { display: block; }

/* Now-playing bar icon mark + play/pause toggle */
.np-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-surface2);
  color: var(--color-gold);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.np-btn { border: none; }
.np-btn .icon-play, .np-btn .icon-pause { display: flex; align-items: center; justify-content: center; }
.np-btn.play-btn .icon-pause { display: none; }
.now-playing-bar.playing .np-btn.play-btn .icon-play { display: none; }
.now-playing-bar.playing .np-btn.play-btn .icon-pause { display: flex; }

/* Empty-state, menu, credits-info, form-success icons */
.empty-icon { display: flex; align-items: center; justify-content: center; color: var(--color-muted); margin-bottom: 8px; }
.empty-icon svg { color: var(--color-gold); opacity: 0.85; }
.menu-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--color-gold); }
.account-menu-item .menu-icon svg { display: block; }
.credits-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--color-gold); }
.form-success-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--color-success); margin-bottom: 8px; }

/* Floating selection bar action group */
.selection-actions { display: flex; gap: 8px; align-items: center; }

/* Selection-item info icon (download history / lists) */
.selection-item .si-info { flex: 1; min-width: 0; }
.selection-item .si-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Checkout (selections page) ---- */
.checkout-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.checkout-btn.is-disabled,
.checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.checkout-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.6;
}
.checkout-note.warn {
  background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.4);
  color: #e8a99f;
}

/* ---- Downloads-ready block ---- */
.downloads-ready {
  margin-top: 24px;
  background: var(--color-surface);
  border: 1px solid rgba(45,156,107,0.4);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.downloads-ready .section-header { margin-bottom: 14px; }
.downloads-ready .section-header h3 { display: flex; align-items: center; gap: 8px; color: var(--color-success); }
.dl-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dl-link svg { display: block; }

/* ============================================================
   ZAFFEHPRO — ON-SITE LOGIN / REGISTER (v3.0.0)
   ============================================================ */
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 20px 0 40px; }

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--color-surface2);
  border-radius: var(--radius-pill);
  padding: 5px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-muted);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  border: none;
}
.auth-tab.active {
  background: var(--color-gold);
  color: var(--color-bg);
  box-shadow: 0 4px 14px rgba(201,168,76,0.28);
}

.auth-form { display: none; }
.auth-form.active { display: block; animation: authFade 0.25s ease; }
@keyframes authFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.auth-form .form-group { margin-bottom: 16px; }

.auth-foot { text-align: center; margin-top: 14px; font-size: 0.85rem; }
.auth-foot a { color: var(--color-gold); }

.auth-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 18px;
}
.auth-alert.warn {
  background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.4);
  color: #e8a99f;
}
.auth-alert.ok {
  background: rgba(45,156,107,0.12);
  border: 1px solid rgba(45,156,107,0.4);
  color: #8fe0bd;
}
