@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ========== BASE & RESETS ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0071e3;
  --primary-light: #2997ff;
  --primary-dark: #0077ed;
  --accent: #0071e3;
  --accent-glow: transparent;
  --cyan: #0071e3;
  
  --bg-main: #f5f5f7;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-hover: rgba(255, 255, 255, 0.85);
  
  --border-subtle: rgba(0, 0, 0, 0.08); /* light borders */
  --border-glow: transparent;
  
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --text-dim: #a1a1a6;
  
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 8px;
  
  --shadow-soft: 2px 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-glow: none;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========== DARK THEME OVERRIDES (Ultra Premium) ========== */
body.dark-theme {
  --bg-main: #000000;
  --bg-glass: rgba(0, 0, 0, 0.85); /* Deeper black glass */
  --bg-glass-hover: rgba(28, 28, 30, 0.95);
  
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 113, 227, 0.4);
  
  --text-main: #ffffff; /* Brighter white for high-end contrast */
  --text-muted: #a1a1a6;
  --text-dim: #86868b;
  
  --shadow-soft: 0 8px 64px rgba(0, 0, 0, 0.8);
}

body.dark-theme .navbar-apple {
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
}

body.dark-theme .apple-nav-item,
body.dark-theme .sec-nav-item,
body.dark-theme .apple-logo {
  color: var(--text-main);
}

body.dark-theme .nav-secondary-apple {
  background: var(--bg-glass);
  border-bottom-color: var(--border-subtle);
}

body.dark-theme .sidebar-card,
body.dark-theme .modal-content,
body.dark-theme .product-detail,
body.dark-theme .sidebar-ad,
body.dark-theme .admin-sidebar,
body.dark-theme .admin-content,
body.dark-theme .edit-article-container,
body.dark-theme .message-view-modal .modal-content {
  background: #1c1c1e !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-main) !important;
}

body.dark-theme .admin-input,
body.dark-theme select,
body.dark-theme input {
  background: #2c2c2e !important;
  border-color: #3a3a3c !important;
  color: #fff !important;
}

body.dark-theme .top-news-card {
  background: #1c1c1e;
}

body.dark-theme .news-card {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .apple-footer {
  background: #1c1c1e;
  border-top: 1px solid var(--border-subtle);
}

body.dark-theme #theme-toggle {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-theme .time-slot:not(.booked) {
  background: #2c2c2e !important;
  color: #fff !important;
  border-color: #3a3a3c !important;
}

body.dark-theme .time-slot.booked {
  background: #1c1c1e !important;
  color: #444 !important;
  border-color: #222 !important;
}

body.dark-theme .chip {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #fff;
}

body.dark-theme .pdp-thumb {
  background: #2c2c2e;
  border-color: #3a3a3c;
}

body.dark-theme .pdp-thumb.active {
  border-color: var(--primary);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body.rtl-layout {
  font-family: 'Assistant', 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { 
  background: rgba(255, 255, 255, 0.3); 
  border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.6); }


/* ========== APPLE NAVBAR ========== */
.navbar-apple {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed + #main-wrapper .navbar-apple,
.sidebar-collapsed + #main-wrapper .navbar-apple,
.sidebar-collapsed ~ #main-wrapper .navbar-apple {
  left: calc(var(--sidebar-collapsed-width) + 25px) !important;
  width: calc(100% - (var(--sidebar-collapsed-width) + 25px)) !important;
}

.nav-inner-apple {
  max-width: 100%;
  margin: 0 auto;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.apple-logo {
  color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  padding: 0 8px;
}

.apple-logo:hover {
  opacity: 0.65;
}

.apple-nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.apple-nav-item {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
  padding: 0;
}

.apple-nav-item:hover {
  opacity: 0.65;
}

.apple-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-secondary-apple {
  display: none;
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-secondary-apple::-webkit-scrollbar {
  display: none;
}

.sec-nav-item {
  background: transparent;
  border: none;
  font-size: 13.5px;
  font-weight: 500;
  color: #86868b;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
}

.sec-nav-item:hover {
  color: var(--text-main);
}

/* Dropdown Styles */
.apple-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}

.apple-dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 8px;
  z-index: 1002;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.apple-dropdown:hover .apple-dropdown-content,
.apple-dropdown.active .apple-dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.apple-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  text-align: right;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
  gap: 10px;
}

.apple-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.apple-dropdown-item:active {
  transform: scale(0.98);
}

body.dark-theme .apple-dropdown-content {
  background: rgba(28, 28, 30, 0.95);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-theme .apple-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-trigger i {
  font-size: 9px;
  transition: transform 0.3s;
}

.apple-dropdown:hover .dropdown-trigger i,
.apple-dropdown.active .dropdown-trigger i {
  transform: rotate(180deg);
}

/* Mega Menu → Small elegant panel (no overlay) */
.apple-dropdown-content.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  width: 220px;
  min-height: unset;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 8px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 1002;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.apple-dropdown:hover .apple-dropdown-content.mega-menu,
.apple-dropdown.active .apple-dropdown-content.mega-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.dark-theme .apple-dropdown-content.mega-menu {
  background: rgba(28,28,30,0.97);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.mega-menu-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 6px 12px 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.apple-dropdown-content.mega-menu .apple-dropdown-item {
  justify-content: flex-end;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 14px;
  width: 100%;
  margin: 1px 0;
  border-radius: 8px;
  transition: background 0.15s;
  text-align: right;
}

.apple-dropdown-content.mega-menu .apple-dropdown-item:hover {
  background: rgba(0,0,0,0.05);
  transform: none;
}

body.dark-theme .apple-dropdown-content.mega-menu .apple-dropdown-item:hover {
  background: rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
  .apple-dropdown-content.mega-menu {
    right: -60px;
    width: 200px;
  }
  .apple-dropdown-content.mega-menu .apple-dropdown-item {
    font-size: 0.85rem;
  }
}


.apple-nav-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-right: 8px;
}

.apple-icon-btn {
  color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: opacity 0.2s;
}
.apple-icon-btn:hover {
  opacity: 0.65;
}

.apple-cart-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.apple-cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  border-radius: 980px;
  min-width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid #fff;
}


/* ========== PAGES ========== */
.page {
  display: none;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 40px 100px;
  box-sizing: border-box;
  animation: fadeIn 0.5s ease-out forwards;
}
.page.active { display: block !important; }

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

/* ========== HERO SECTION (Ultra Premium) ========== */
.hero {
  position: relative;
  padding: 100px 48px;
  text-align: center;
  margin-bottom: 80px;
}

/* ========== NEWS LAYOUT ========== */
.top-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border-subtle);
  border-bottom: 2px solid var(--border-subtle);
}

.top-news-card {
  position: relative;
  height: 380px;
  cursor: pointer;
  overflow: hidden;
  background: #000;
}

.top-news-bg {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.9;
}

.top-news-card:hover .top-news-bg {
  transform: scale(1.05);
  opacity: 1;
}

.top-news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  color: #fff;
}

.top-news-overlay h3 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ========== BUTTONS ========== */
.btn-primary {
  background: rgba(0, 113, 227, 0.15);
  color: var(--primary);
  border: 1px solid rgba(0, 113, 227, 0.2);
  padding: 12px 24px;
  border-radius: 980px; /* Apple signature pill */
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.1);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: rgba(0, 113, 227, 0.25);
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 113, 227, 0.2);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.full-width { width: 100%; }

/* ========== SECTIONS & GRID ========== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
  padding: 6px 16px;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.15);
}

/* ========== CATEGORIES (Bento Grid) ========== */
.ad-banner-horizontal {
  text-align: center;
  margin: 40px auto;
  max-width: 970px;
  padding: 0 16px;
}

.ad-placeholder {
  background: #ffffff;
  border: 1px solid #e5e5ea;
  padding: 30px;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.main-news-layout {
  display: flex;
  gap: 40px;
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .main-news-layout {
    flex-direction: column;
    padding: 0 16px;
  }
}

.news-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-sidebar {
  width: 380px;
  flex-shrink: 0;
}

.sidebar-ad {
  position: sticky;
  top: 80px;
  padding-top: 24px;
}

/* ========== PRODUCT CARDS ========== */
.feed-item {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: opacity 0.3s;
}

.feed-item:first-child {
  padding-top: 0;
}

.feed-item:hover {
  opacity: 0.8;
}

/* Mobile Side-by-Side optimized for iPhone (Matching Reference Image) */
@media (max-width: 600px) {
  .feed-item {
    flex-direction: row-reverse; /* Text Left, Image Right */
    gap: 16px;
    padding: 20px 0;
    align-items: center;
  }
}

.feed-image {
  width: 250px;
  height: 180px;
  flex-shrink: 0;
  background-size: cover; /* Changed to cover for full fill like reference */
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px; /* Smoother corner */
  background-color: #f5f5f7;
}

@media (max-width: 600px) {
  .feed-image {
    width: 110px;
    height: 85px;
    border-radius: 10px;
  }
}

.feed-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feed-title {
  font-size: 1.3rem;
  font-weight: 850; /* Heavier weight like reference */
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

@media (max-width: 600px) {
  .feed-title {
    font-size: 1.15rem;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.feed-meta {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .feed-meta {
    margin-bottom: 0;
    font-size: 0.8rem;
  }
}

.author-name {
  color: #db3a2b; /* matching the vibrant red author name */
}

.meta-sep {
  color: #aaa;
  margin: 0 4px;
  font-weight: 400;
}

.meta-date {
  color: var(--text-main);
}

.feed-snippet {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

body.rtl-layout #page-home .news-feed {
  direction: rtl;
}

body.rtl-layout #page-home .feed-item {
  flex-direction: row;
  direction: rtl;
}

body.rtl-layout #page-home .feed-content,
body.rtl-layout #page-home .feed-title,
body.rtl-layout #page-home .feed-snippet {
  text-align: right;
}

body.rtl-layout #page-home .feed-meta {
  direction: rtl;
  justify-content: flex-start;
}

body.rtl-layout #page-home .meta-bookmark-btn {
  margin-right: 0 !important;
  margin-left: auto !important;
}

@media (max-width: 600px) {
  .feed-snippet {
    display: none; /* Reference image 2 does not show snippets in list */
  }
}

/* ========== BROWSE PAGE ========== */
.browse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.browse-header h2 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filters input, .filters select {
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 12px 24px;
  font-size: 0.95rem;
  background: var(--bg-glass);
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.filters input:focus, .filters select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
  background: rgba(25, 25, 30, 0.9);
}

.filters select option { background: var(--bg-main); }

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 100px;
  font-size: 1.1rem;
}

/* ========== SELL FORM ========== */
.form-container {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 56px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.form-header {
  text-align: center;
  margin-bottom: 48px;
}

.form-icon {
  width: 72px;
  height: 72px;
  background: rgba(0, 113, 227, 0.1);
  border-radius: 980px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.form-container h2 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.form-container .sub { color: var(--text-muted); font-size: 1rem; }

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

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 1rem;
  background: #fbfbfd;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* ========== PRODUCT DETAIL ========== */
.back-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-bottom: 40px;
  transition: var(--transition-bounce);
  color: var(--text-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
  background: var(--bg-glass-hover);
  transform: translateX(4px); /* RTL */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 60px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.detail-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  background: #fbfbfd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.detail-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-info { display: flex; flex-direction: column; gap: 24px; }

.detail-category {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 113, 227, 0.1);
  border-radius: 980px;
  padding: 6px 16px;
  width: fit-content;
}

.article-title-main {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .article-title-main {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 16px;
  }
}

.article-body {
  font-size: 1.35rem;
  line-height: 1.85; /* Increased for high-end readability like reference 1 */
  color: #d1d1d6; /* Slightly off-white for reading comfort in dark mode */
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .article-body {
    font-size: 1.25rem;
    line-height: 1.75;
    padding: 0 4px;
  }
  
  .article-body p {
    margin-bottom: 24px;
  }
}

.detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.detail-price {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-main);
}

.detail-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.85rem;
  font-weight: 500;
  background: #f5f5f7;
  border: 1px solid var(--border-subtle);
  border-radius: 980px;
  padding: 6px 16px;
  color: var(--text-main);
}

.detail-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
}

.detail-desc-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: -12px;
}

.detail-desc {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* ========== CART ========== */
#page-cart h2 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
}

.cart-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.cart-item:hover { 
  border-color: rgba(0, 113, 227, 0.3); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cart-item-icon {
  font-size: 3rem;
  min-width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fbfbfd;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.cart-item-info { flex: 1; }

.cart-item-title {
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.cart-item-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-light);
}

.remove-btn {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  color: #f87171;
  font-size: 1.2rem;
  transition: var(--transition-bounce);
}

.remove-btn:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.4);
  transform: scale(1.05);
}

.cart-summary {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 40px;
  max-width: 480px;
  margin-right: auto;
  box-shadow: var(--shadow-soft);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 1rem;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 1.4rem;
  font-weight: 700;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  margin-top: 12px;
  color: var(--text-main);
}

.summary-row.total span:last-child {
  color: var(--text-main);
}

.empty-cart {
  text-align: center;
  padding: 120px 24px;
  color: var(--text-muted);
}

.empty-cart .icon {
  font-size: 5rem;
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-cart p {
  font-size: 1.2rem;
  margin-bottom: 32px;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  background: #ffffff; /* Consistent White background */
  color: #1d1d1f;      /* Consistent Black text */
  padding: 14px 28px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 1000;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15); /* Shadow for visibility in light mode */
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 8px;
}

body.dark-theme .toast {
  background: #ffffff;
  color: #1d1d1f;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.show,
.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 500px;
  border-radius: 24px;
  padding: 40px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-overlay.show .modal-content,
.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* Sidebar Right Animation */
.modal-sidebar-right {
  justify-content: flex-end !important;
  align-items: stretch !important;
}
.modal-sidebar-right .modal-content {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  max-width: 450px !important;
  width: 100%;
  border-radius: 0;
  margin: 0;
  transform: translateX(100%) !important;
  display: flex;
  flex-direction: column;
}
.modal-overlay.show.modal-sidebar-right .modal-content,
.modal-overlay.active.modal-sidebar-right .modal-content {
  transform: translateX(0) !important;
}
.modal-close {
  position: absolute;
  top: 20px;
  left: 20px; /* RTL, so left is the "end" */
  background: #f5f5f7;
  border: none;
  width: 32px; height: 32px;
  border-radius: 16px;
  font-size: 1rem;
  color: #1d1d1f;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover {
  background: #e5e5ea;
}
.admin-input {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  background: #f5f5f7;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
  font-family: inherit;
}
.admin-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ========== MODAL ========== */


.modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 24px;
}

.modal h3 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 16px;
}

.modal p {
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* ========== ARTICLE PAGE ========== */
.article-header { margin-bottom: 32px; }
.article-category {
  display: inline-block;
  background: rgba(0, 113, 227, 0.1);
  color: var(--primary);
  padding: 4px 16px;
  border-radius: 980px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.article-title-main {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.article-meta-main {
  font-size: 1.05rem;
  font-weight: 500;
  color: #555;
  padding-bottom: 24px;
}
.article-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 40px;
  background-color: #f5f5f7;
}
.article-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
}
.article-body p {
  margin-bottom: 20px;
}
.article-body a {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none !important;
  cursor: default !important;
}
.article-detail p[style*="background"],
.article-body p[style*="background"],
.article-source-box {
  display: none !important;
}
.article-detail p[style*="background"] a,
.article-body p[style*="background"] a,
.article-source-box a {
  color: #38bdf8 !important;
  text-decoration: underline !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}
.article-intro {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-main);
}

/* ========== FOOTER ========== */
.apple-footer {
  background: #f5f5f7;
  border-top: 1px solid #e5e5ea;
  padding: 60px 24px;
  font-size: 0.85rem;
  color: #86868b;
  margin-top: 80px;
}
.footer-content {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}
.social-col {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Align right in the left column for Hebrew flow */
}
.social-col h4 {
  margin-bottom: 0px !important;
}
.footer-col h4 {
  color: #1d1d1f;
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a:hover {
  color: #ffffff !important;
  text-decoration: none;
}
.footer-col ul li a {
  color: #515154;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom {
  border-top: 1px solid #e5e5ea;
  padding-top: 24px;
  text-align: center;
}

/* ========== ADMIN DASHBOARD ========== */
.admin-login-box {
  max-width: 400px;
  margin: 80px auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th, .admin-table td {
  padding: 16px;
  border-bottom: 1px solid #e5e5ea;
  text-align: right;
}
.admin-table th {
  background: #fbfbfd;
  font-weight: 600;
  color: #86868b;
}
.admin-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  background: #f5f5f7;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
}
.admin-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

/* ========== ADMIN SIDEBAR ========== */
.admin-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  text-align: right;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  font-family: inherit;
  width: 100%;
}
.admin-nav-btn:hover {
  background: var(--bg-main);
  color: var(--text-main);
}
.admin-nav-btn.active {
  background: rgba(0, 113, 227, 0.1);
  color: var(--primary);
}

/* ========== UTILS ========== */
.hidden { display: none !important; }


/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .product-detail { grid-template-columns: 1fr; gap: 40px; }
  .detail-img { aspect-ratio: 16/9; }
}
/* ========== PDF STORE GRID ========== */
.pdf-store-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 60px;
  max-width: 900px;
  margin-left: 0;
}

.pdf-card {
  background: #1c1c1e; /* Deep black rectangle */
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 0;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  text-align: right;
  height: 90px;
}

.pdf-card:hover {
  background: #2c2c2e;
  transform: translateX(-8px);
  border-color: rgba(0, 113, 227, 0.4);
}

.pdf-card-icon {
  width: 25%;
  background: rgba(255,255,255,0.05);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-left: 0;
}

.pdf-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #db3a2b;
  line-height: 1.2;
  padding: 0 12px;
}

.pdf-card-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.pdf-card-ticker-wrapper {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-card-ticker-img {
  width: 50px;
  height: 30px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
}

.pdf-card-bookmark-btn {
  background: transparent;
  border: none;
  color: #86868b;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-card-bookmark-btn:hover {
  color: #f9b233;
  transform: scale(1.1);
}
.pdf-card-bookmark-btn.active {
  color: #f9b233 !important;
  transform: scale(1.1);
}


.pdf-card-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
}

.pdf-card-type {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0,113,227,0.1);
  padding: 2px 10px;
  border-radius: 980px;
  letter-spacing: 0.05em;
  width: fit-content;
  margin: 0 auto;
}

.pdf-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #db3a2b;
  line-height: 1.2;
  padding: 0 12px;
}

.pdf-card-desc {
  font-size: 0.88rem;
  color: #86868b;
  line-height: 1.4;
  padding: 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pdf-card-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: auto;
  padding-bottom: 4px;
}

@media (max-width: 1024px) {
  .pdf-store-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 600px) {
  .pdf-store-grid { grid-template-columns: repeat(1, 1fr); gap: 16px; padding: 0 16px 40px; }
}


@media (max-width: 768px) {
  .featured-top-grid { grid-template-columns: 1fr; gap: 16px; padding: 0 16px; }
  .featured-card.center { min-height: 320px; }
  .top-news-grid { display: none !important; }
  .main-news-layout { flex-direction: column; gap: 24px; }
  .news-sidebar { width: 100%; }
  .sidebar-ad { position: relative; top: 0; padding-top: 0; }
  .feed-item { flex-direction: column; gap: 16px; }
  .feed-image { width: 100%; height: auto; aspect-ratio: 16/9; }
  
  .form-grid { grid-template-columns: 1fr; }
  .browse-header { flex-direction: column; align-items: flex-start; }
  .filters { width: 100%; justify-content: stretch; }
  .filters input, .filters select { flex: 1; }
  
  .apple-nav-links {
    display: none !important;
  }
  
  .nav-inner-apple {
    height: 48px;
    padding: 0 12px;
  }
  
  .nav-secondary-apple {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
  }

  .apple-nav-actions {
    gap: 8px;
  }

  .pdf-store-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .page { padding: 40px 16px 80px; }
  .hero h1 { font-size: 2.2rem; }
}

/* PRODUCT DETAIL PAGE (PDP) */
.product-pdp-container {
  display: flex;
  gap: 48px;
  background: #000;
  padding: 40px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  max-width: 100% !important;
  margin: 0 auto !important;
  min-height: 85vh;
}

.product-info-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pdp-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.pdp-rating {
  margin-bottom: 24px;
}

.pdp-price-container {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f2f2f2;
}

.pdp-price {
  font-size: 2rem;
  font-weight: 700;
  color: #1d1d1f;
}

.pdp-discount-info {
  font-size: 0.9rem;
  color: #86868b;
  margin-top: 4px;
}

.pdp-variants {
  margin-bottom: 32px;
}

.variant-chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  padding: 10px 20px;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chip.active {
  border-color: #0071e3;
  background: rgba(0, 113, 227, 0.05);
  color: #0071e3;
}

.pdp-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #e5e5e7;
  margin-bottom: 40px;
  white-space: pre-wrap;
}

.pdp-actions {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

.product-visual-column {
  flex: 5;
  display: flex;
  gap: 16px;
  min-width: 0;
}

.main-image-wrapper {
  flex: 1;
  background: #111;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  min-height: 75vh;
  max-height: 90vh;
  width: 100%;
}

.main-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-list {
  width: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdp-thumb {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: #fbfbfd;
  border: 1px solid #f2f2f2;
  cursor: pointer;
  overflow: hidden;
  transition: 0.2s;
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-thumb.active {
  border-color: #0071e3;
  box-shadow: 0 0 0 1px #0071e3;
}

@media (max-width: 900px) {
  .product-pdp-container { flex-direction: column-reverse; padding: 24px; }
  .product-visual-column { flex-direction: column; }
  .thumbnail-list { width: 100%; flex-direction: row; }
}

/* APPOINTMENT WIDGET & 3-COLUMN LAYOUT */
@media (max-width: 1100px) {
  .main-news-layout {
    grid-template-columns: 1fr !important;
  }
  .news-sidebar-right, .news-sidebar {
    width: 100%;
    position: static !important;
  }
}

.time-slot:hover {
  border-color: #0071e3 !important;
  background: rgba(0, 113, 227, 0.02) !important;
}

#book-time-grid::-webkit-scrollbar {
  width: 6px;
}
#book-time-grid::-webkit-scrollbar-thumb {
  background: #d2d2d7;
  border-radius: 10px;
}

body.dark-theme .product-detail,
body.dark-theme .product-pdp-container,
body.dark-theme #page-photo-detail div[style*="background: #f5f5f7"] {
  background: #1c1c1e !important;
  color: #f5f5f7 !important;
  border-color: #38383a !important;
}

body.dark-theme #theme-toggle i {
  color: #ffffff !important;
}

#theme-toggle:hover {
  background: rgba(0,0,0,0.05);
}

body.dark-theme #theme-toggle:hover {
  background: rgba(255,255,255,0.1) !important;
}

body.dark-theme .main-image-wrapper {
  background: #000 !important;
  border-color: #38383a !important;
}

body.dark-theme .admin-sidebar,
body.dark-theme .admin-content,
body.dark-theme .admin-section {
  background: #1c1c1e !important;
  color: #f5f5f7 !important;
}

body.dark-theme .pdf-card {
  background: #2c2c2e !important;
  border-color: #38383a !important;
}

body.dark-theme .pdp-title,
body.dark-theme .pdp-description,
body.dark-theme #photo-pdp-telegram,
body.dark-theme #photo-pdp-age {
  color: #f5f5f7 !important;
}

body.dark-theme .pdp-price {
  color: #0a84ff !important;
}

body.dark-theme .feed-title,
body.dark-theme .feed-snippet,
body.dark-theme .meta-date,
body.dark-theme .meta-sep {
  color: #ffffff !important;
}

body.dark-theme .feed-item:hover .feed-title {
  color: #0a84ff !important;
}

body.dark-theme .article-intro,
body.dark-theme .article-body {
  color: #ffffff !important;
}

body.dark-theme .sidebar-card p {
  color: #f5f5f7 !important;
}

/* ========== IPHONE & MOBILE OPTIMIZATIONS (Premium) ========== */
@media (max-width: 768px) {
  /* Global Adjustments */
  body {
    -webkit-tap-highlight-color: transparent;
  }
  
  .page {
    padding: 24px 16px 80px;
  }

  /* Navbar Mobile: Horizontal Scroll Style (App Store like) */
  .navbar-apple {
    height: 70px;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .nav-inner-apple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
   .apple-nav-links {
    display: none;
  }
  
  .apple-nav-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
  }

  .apple-nav-actions .subscription-btn,
  .apple-nav-actions #btn-join,
  .apple-nav-actions #btn-logout-nav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    margin-left: 12px;
  }

  /* Mobile Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  .mobile-menu-content {
    position: absolute;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-main);
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 24px;
  }

  .mobile-menu-overlay.active .mobile-menu-content {
    left: 0;
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
  }

  .close-mobile-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
  }

  .mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-nav-link {
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
  }

  .mobile-nav-link i {
    width: 24px;
    color: var(--text-muted);
  }

  .mobile-nav-link.premium-link {
    color: #f9b233;
  }

  .mobile-menu-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 12px 0;
  }
  
  .nav-secondary-apple {
    display: none !important;
  }
}

@media (min-width: 601px) {
  .mobile-menu-btn { display: none; }
  .mobile-menu-overlay { display: none !important; }
}

}

  .apple-nav-item {
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 6px 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 100px;
  }
  
  body.dark-theme .apple-nav-item {
    background: rgba(255,255,255,0.05);
  }

  /* News Feed */
  .top-news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    background: transparent;
    border: none;
  }
  
  .top-news-card {
    height: 240px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
  }

  .main-news-layout {
    flex-direction: column;
    padding: 0 16px;
  }
  
  .news-card {
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 20px;
    overflow: hidden;
    padding-bottom: 20px;
  }
  
  .news-card-img {
    width: 100%;
    height: 200px;
    border-radius: 0;
  }
  
  .news-card-content {
    padding: 20px;
  }

  /* Store & PDF Grid */
  .pdf-store-grid {
    grid-template-columns: 1fr !important;
    padding: 0 16px;
  }
  
  /* Product Detail */
  .product-detail {
    grid-template-columns: 1fr;
    padding: 24px;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  
  .product-visual-column {
    flex-direction: column;
  }
  
  .pdp-thumbnails {
    flex-direction: row;
    order: 2;
    overflow-x: auto;
    width: 100%;
    padding: 4px;
    gap: 12px;
  }
  
  .pdp-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }
  
  .main-image-wrapper {
    min-height: 320px;
  }

  /* Appointments */
  #page-appointments {
    padding: 20px 12px;
  }
  
  #page-appointments .sidebar-card {
    padding: 24px;
    border-radius: 24px;
  }
  
  .booking-widget > div {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  /* Footer */
  .footer-columns {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    padding: 24px;
    border-radius: 24px;
  }
}

/* Specific iPhone Tweaks */
@media screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
  .pdp-title {
    font-size: 1.8rem;
  }
  .section-title {
    font-size: 2rem;
  }
}

/* ========== MOBILE REFINEMENTS ========== */
@media (max-width: 768px) {
  #top-news-grid {
    display: none !important;
  }

  /* Tables Mobile */
  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.85rem;
  }
  
  /* Admin Sidebar */
  #page-admin > div {
    flex-direction: column !important;
  }
  
  #page-admin aside {
    width: 100% !important;
    position: static !important;
    padding: 16px !important;
    margin-bottom: 24px;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px !important;
  }
  
  #page-admin aside h3 {
    grid-column: 1 / -1;
    margin-bottom: 12px !important;
  }
  
  .admin-nav-btn {
    font-size: 0.8rem !important;
    padding: 12px 10px !important;
    text-align: center !important;
  }

  /* PD Admin List */
  #pdf-admin-list {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Hero Section Mobile */
  .hero-logo-img {
    height: 120px !important;
  }
  
  .article-title-main {
    font-size: 2.2rem !important;
  }

  /* Hide Pagination on mobile to save space or stack */
  #news-pagination {
    gap: 4px !important;
  }
  #news-pagination button {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .top-news-overlay {
    padding: 24px 16px 16px !important;
  }
  .top-news-overlay h3 {
    font-size: 1.1rem !important;
  }
  
  .admin-stats-grid > div {
    flex: 1 1 100% !important;
  }
  
  #pdf-admin-list {
    grid-template-columns: 1fr !important;
  }
}

/* ========== IPAD OPTIMIZATIONS (Tablet View) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .top-news-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    padding: 20px !important;
  }
  
  .main-news-layout {
    flex-direction: column !important;
    gap: 40px !important;
    padding: 0 40px !important;
  }
  
  .news-feed {
    width: 100% !important;
  }
  
  .sidebar-ad {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .pdf-store-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .product-detail {
    grid-template-columns: 1fr !important;
    padding: 40px !important;
  }
}

/* ========== EMOJI PICKER ========== */
.emoji-opt {
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}
.emoji-opt:hover {
  background: rgba(0, 113, 227, 0.05);
  transform: scale(1.15);
}
.emoji-opt.active {
  background: rgba(0, 113, 227, 0.1);
  border-color: var(--primary);
  transform: scale(1.1);
}

/* ========== COMMENTS SYSTEM ========== */
.comment-card {
  background: #fbfbfd;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  animation: slideUp 0.4s ease-out;
  margin-bottom: 12px;
}

body.dark-theme .comment-card {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.05);
}

.comment-avatar {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

body.dark-theme .comment-avatar {
  background: #2c2c2e;
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-author {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-main);
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

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

/* ========== UPLOAD FORMS IMAGE PREVIEW ========== */
#user-pdf-image-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preview-item {
  position: relative;
  display: inline-block;
}

.remove-img-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff3b30;
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 10;
}

@media (max-width: 768px) {
  #user-pdf-upload-section {
    padding: 30px !important;
    margin-top: 60px !important;
  }
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: #fff;
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(0.98); }
}
/* ========== BRANDED DOWNLOAD BUTTONS ========== */
.btn-platform-container {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn-download-mac, .btn-download-android {
  padding: 14px 32px;
  border-radius: 980px;
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  min-width: 220px;
  color: white;
  text-decoration: none;
}

.btn-download-mac {
  background: #1d1d1f;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-download-mac:hover {
  background: #000000;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.btn-download-android {
  background: #3DDC84;
  box-shadow: 0 4px 15px rgba(61, 220, 132, 0.2);
}

.btn-download-android:hover {
  background: #2cb36a;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(61, 220, 132, 0.35);
}

.platform-icon {
  font-size: 1.4rem;
}

body.dark-theme .btn-download-mac {
  background: #f5f5f7;
  color: #1d1d1f;
}
body.dark-theme .btn-download-mac:hover {
  background: #ffffff;
}
/* ========== SUBSCRIPTION & CHECKOUT ========== */
.btn-orange {
  background: rgba(255, 149, 0, 0.15); /* Apple orange glass */
  color: #ff9500;
  border: 1px solid rgba(255, 149, 0, 0.2);
  padding: 6px 16px;
  border-radius: 980px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(255, 149, 0, 0.1);
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.btn-orange:hover {
  background: rgba(255, 149, 0, 0.25);
  transform: scale(1.02);
  box-shadow: 0 8px 15px rgba(255, 149, 0, 0.2);
}

/* PREMIUM CHECKOUT MODAL */
.checkout-container {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  max-width: 1000px;
  width: 95vw;
}

.checkout-left {
  flex: 1.4;
  padding: 48px;
  text-align: right;
  border-left: 1px solid #f2f2f2;
}

.checkout-right {
  flex: 1;
  padding: 48px;
  background: #fbfbfd;
  text-align: right;
}

.billing-badge {
  color: #34c759;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.checkout-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

/* Branded Payment Buttons */
.pay-btn {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  margin-bottom: 12px;
  transition: opacity 0.2s;
}

.pay-btn-apple { background: #000; color: #fff; }
.pay-btn-google { background: #000; color: #fff; border: 1px solid #3c4043; }
.pay-btn-paypal { background: #ffc439; color: #000; }

.checkout-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #86868b;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 24px 0;
}
.checkout-divider::before, .checkout-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #f2f2f2;
}

/* Form Grid */
.billing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.billing-grid .full { grid-column: 1 / -1; }

.checkout-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
}
.checkout-input:focus { border-color: #0071e3; }

/* Right Summary */
.summary-header {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
}

.summary-total {
  border-top: 1px solid #d2d2d7;
  margin-top: 24px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 1.5rem;
  font-weight: 900;
}

.feature-list {
  list-style: none;
  margin: 32px 0;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #424245;
}
.feature-list li::before {
  content: "✓";
  color: #34c759;
  font-weight: 900;
}

/* ========== MOBILE-ONLY EXCLUSIVE (iPhone optimization) ========== */
@media (max-width: 600px) {
  /* Side-by-Side News Feed - Reverting to desktop-like structure as requested */
  .feed-item {
    display: flex !important;
    flex-direction: row !important; /* Back to desktop order: Image Right, Text Left in RTL */
    gap: 16px !important;
    padding: 20px 0 !important;
    align-items: flex-start !important;
    border-bottom: 0.5px solid var(--border-subtle) !important;
  }

  .feed-image {
    width: 120px !important;
    height: 90px !important;
    border-radius: 12px !important;
    margin-bottom: 0 !important;
  }

  .feed-content {
    flex: 1 !important;
    padding-left: 0 !important;
    text-align: right !important;
  }

  .feed-title {
    font-size: 1.25rem !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
  }

  .feed-meta {
    font-size: 0.85rem !important;
    margin-bottom: 8px !important;
  }

  .feed-snippet {
    display: block !important; /* Restore snippets for consistency with desktop */
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: var(--text-muted) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Article Reading Premium Feel */
  .article-title-main {
    font-size: 2.3rem !important;
    line-height: 1.15 !important;
    margin-bottom: 20px !important;
    font-weight: 900 !important;
  }

  .article-body {
    font-size: 1.25rem !important;
    line-height: 1.8 !important;
    padding: 0 4px !important;
    letter-spacing: -0.01em !important;
  }

  .article-body p {
    margin-bottom: 28px !important;
  }

  /* Responsive Navbar Adjustments */
  .apple-nav-links {
    gap: 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .apple-nav-links::-webkit-scrollbar { display: none; }

  .apple-nav-item {
    font-size: 0.8rem !important;
    white-space: nowrap !important;
  }
}

/* ========== RECOMMENDED ARTICLES SECTION ========== */
.recommendations-wrapper {
  margin-top: 80px;
  padding-top: 60px;
  margin-bottom: 60px;
  border-top: 1px solid var(--border-subtle);
}

.recommendations-title {
  font-size: 1.8rem;
  font-weight: 850;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.recommendations-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}

.recommendations-grid::-webkit-scrollbar {
  height: 6px;
}

.recommendations-grid::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 10px;
}

.rec-card {
  flex: 0 0 210px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.rec-card:hover {
  transform: translateY(-4px);
  opacity: 0.8;
}

.rec-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.rec-meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0071e3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.rec-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .recommendations-wrapper {
    margin-top: 60px;
    padding-top: 40px;
  }
  .recommendations-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
  .rec-card {
    flex: 0 0 240px;
  }
  .rec-title {
    font-size: 1rem;
  }
}

/* ========== SOCIAL FOOTER (Bottom-Left) ========== */
.social-footer {
  padding: 80px 40px;
  background: transparent;
  width: 100%;
  display: flex;
  justify-content: flex-start; /* Bottom-Left */
  position: relative;
  z-index: 10;
}

.social-container {
  max-width: 400px;
  text-align: right; /* Hebrew alignment */
}

.social-description {
  color: #86868b;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 24px;
  font-weight: 500;
}

body.dark-theme .social-description {
  color: #f5f5f7 !important;
}

.social-icons {
  display: flex;
  gap: 12px;
  justify-content: flex-end; /* Align to the right side of the left-aligned column */
}

.social-icon-btn {
  width: 48px;
  height: 48px;
  background: #1c1c1e; /* Dark rounded square background */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========== PAYPAL INTEGRATION ========== */
.btn-paypal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #0070ba; /* PayPal Blue */
  color: white !important;
  padding: 16px 32px;
  border-radius: 25px; /* Requested rounded Pill shape */
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 112, 186, 0.2);
  width: 100%;
  cursor: pointer;
  border: none;
}

.btn-paypal:hover {
  background-color: #005ea6;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 112, 186, 0.35);
}

.paypal-footer-icon {
  filter: grayscale(1) brightness(1.2); /* Strictly black and white as requested */
  transition: filter 0.3s ease;
}

.paypal-footer-icon:hover {
  filter: grayscale(0) brightness(1); /* Optional: Color on hover for interaction */
}

body.dark-theme .paypal-footer-icon {
  filter: grayscale(1) brightness(2); /* Brighter in dark mode */
}

/* ========== PRICING TIERS ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.pricing-card {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.pricing-card.selected {
  transform: scale(1.05) translateY(-10px) !important;
  z-index: 10;
  box-shadow: 0 40px 100px rgba(0, 113, 227, 0.25);
  border: 2px solid #0071e3 !important;
  background: var(--bg-main);
}

.pricing-card.featured {
  /* Featured now only handles the badge and base transform if not selected */
  transform: scale(1.02);
}

.pricing-card.featured.selected {
  transform: scale(1.05) translateY(-10px) !important;
}

.popular-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #0071e3;
  color: white;
  padding: 4px 12px;
  border-radius: 980px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.pricing-header {
  margin-bottom: 32px;
}

.tier-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.tier-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.04em;
}

.tier-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--text-muted);
}

.pricing-features li i {
  color: #34c759;
  font-size: 0.85rem;
}

.btn-paypal-tier {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f7;
  color: #1d1d1f;
  height: 56px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 1px solid #d2d2d7;
}

.btn-paypal-tier:hover {
  background: #e8e8ed;
}

.btn-paypal-tier.featured-btn {
  background: #0071e3;
  color: white;
  border: none;
}

.btn-paypal-tier.featured-btn:hover {
  background: #0077ed;
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

body.dark-theme .pricing-card {
  background: #1c1c1e;
}

body.dark-theme .btn-paypal-tier {
  background: #2c2c2e;
  color: white;
  border-color: #3a3a3c;
}

body.dark-theme .btn-paypal-tier:hover {
  background: #3a3a3c;
}

@media (max-width: 900px) {
  .pricing-card.featured {
    transform: none;
  }
  .pricing-card.featured:hover {
    transform: translateY(-10px);
  }
}

@media (max-width: 600px) {
  .social-footer {
    padding: 60px 24px;
    justify-content: center;
  }
  .social-container {
    text-align: center;
  }
  .social-icons {
    justify-content: center;
  }
  .social-description {
    font-size: 0.9rem;
  }
}
/* ========== NEW AUTH SYSTEM (Premium Redesign) ========== */
.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
  border-bottom: 2px solid #f2f2f2;
  padding-bottom: 0;
}

.auth-tab {
  background: none;
  border: none;
  font-size: 1.8rem;
  font-weight: 800;
  color: #86868b;
  cursor: pointer;
  padding: 12px 0;
  position: relative;
  transition: all 0.3s ease;
}

.auth-tab.active {
  color: #1d1d1f;
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  border-radius: 980px;
}

body.dark-theme .auth-tab.active {
  color: #fff;
}

body.dark-theme .auth-tabs {
  border-bottom-color: #333;
}

.auth-form-group {
  margin-bottom: 30px;
  text-align: right;
}

.auth-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 12px;
}

body.dark-theme .auth-label {
  color: #fff;
}

.auth-input {
  width: 100%;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid #d2d2d7;
  font-size: 1.1rem;
  background: #fff;
  color: var(--text-main);
  outline: none;
  transition: all 0.3s ease;
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

body.dark-theme .auth-input {
  background: #1c1c1e;
  border-color: #38383a;
  color: #fff;
}

.btn-auth-submit {
  width: 100%;
  height: 72px;
  background: rgba(0, 113, 227, 0.15);
  color: var(--primary);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 980px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.1);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.btn-auth-submit:hover {
  background: rgba(0, 113, 227, 0.25);
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 113, 227, 0.2);
}

.btn-auth-submit:active {
  transform: scale(0.98);
}
/* ========== USER AVATARS & PROFILE PICS ========== */
.user-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.1);
  background: #f5f5f7;
}

body.dark-theme .user-avatar-small {
  border-color: rgba(255,255,255,0.1);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-pic-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: #fbfbfd;
  padding: 32px;
  border-radius: 28px;
  border: 1px solid #d2d2d7;
}

body.dark-theme .profile-pic-container {
  background: #1c1c1e;
  border-color: #38383a;
}

#register-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background: #eee;
  transition: all 0.3s ease;
}

.profile-pic-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-pic-action {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #d2d2d7;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-pic-action:hover {
  background: #f5f5f7;
  border-color: #86868b;
}

body.dark-theme .btn-pic-action {
  background: #2c2c2e;
  border-color: #38383a;
  color: #fff;
}
/* ========== TOAST REFINEMENTS ========== */
.toast.success {
  background: #28a745; /* Green */
  color: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3);
}

.toast.error {
  background: #ff3b30;
  color: #fff;
}

/* ============================================ */
/* SHOP & SERVICES GRIDS                        */
/* ============================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 0 60px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px 32px;
  padding: 0 0 80px;
}

@media (max-width: 1100px) {
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .shop-grid { grid-template-columns: 1fr; }
}

/* Service Card (Legacy styled) */
.service-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-soft);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}
.service-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: right;
}
.service-card-cat {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0071e3;
  background: rgba(0, 113, 227, 0.10);
  padding: 4px 10px;
  border-radius: 980px;
  display: inline-block;
  margin-bottom: 10px;
  align-self: flex-start;
}
.service-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1d1d1f;
  margin-bottom: 8px;
  line-height: 1.3;
}
.service-card-desc {
  font-size: 0.95rem;
  color: #86868b;
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}
.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.service-card-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}
.service-card-btn {
  background: #1d1d1f;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 980px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

/* ===================== */
/* AMAZON-STYLE SHOP CARD */
/* ===================== */
.shop-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  direction: ltr;
}

/* Image container */
.shop-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f0efed;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  border-radius: 4px;
}

.shop-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}
.shop-card:hover .shop-card-img {
  transform: scale(1.04);
}

/* Yellow "+" add button */
.shop-add-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f4c842;
  border: none;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: #1d1d1f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: background 0.18s, transform 0.18s;
  z-index: 3;
}
.shop-add-btn:hover {
  background: #e6b800;
  transform: scale(1.1);
}

/* Body */
.shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
  text-align: left;
}

/* Deal badge row */
.shop-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.shop-badge-deal {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e31c23;
  letter-spacing: 0.01em;
}
.shop-badge-pct {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #e31c23;
  padding: 1px 7px;
  border-radius: 3px;
}

/* Price row */
.shop-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.shop-price-main {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f1111;
  line-height: 1;
}
.shop-price-orig {
  font-size: 0.8rem;
  color: #888;
  text-decoration: line-through;
}

/* Title */
.shop-card-title {
  font-size: 0.82rem;
  font-weight: 400;
  color: #0f1111;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Swatches */
.shop-swatches-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.shop-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.shop-swatch:hover {
  transform: scale(1.15);
}
.shop-swatch.active {
  border-color: #0f1111;
}
.shop-swatch-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f1111;
}
.shop-swatch-label {
  font-size: 0.7rem;
  color: #565959;
}

/* Brand link */
.shop-brand-link {
  font-size: 0.72rem;
  color: #007185;
  text-decoration: none;
  cursor: pointer;
  margin-top: 2px;
}
.shop-brand-link:hover {
  text-decoration: underline;
  color: #c45500;
}

/* Legacy quick-ship badge (kept for other uses) */
.quick-ship-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.shop-card-btn,
.service-card-btn {
  background: #1d1d1f;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 980px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.shop-card-btn:hover,
.service-card-btn:hover {
  background: #0071e3;
  transform: scale(1.04);
}

.service-card-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #0071e3, #0a84ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  color: #fff;
}

/* Dark theme support */
body.dark-theme .shop-card { background: transparent; }
body.dark-theme .service-card { background: var(--bg-card); border-color: var(--border-subtle); }
body.dark-theme .shop-card-image { background: #2a2a2c; }
body.dark-theme .shop-card-title,
body.dark-theme .shop-price-main { color: #f5f5f7; }
body.dark-theme .shop-price-orig { color: #888; }
body.dark-theme .shop-swatch.active { border-color: #f5f5f7; }
body.dark-theme .service-card-title,
body.dark-theme .service-card-price { color: var(--text-main); }

/* ============================================ */
/* SHOPPING CART                                */
/* ============================================ */

.cart-nav-btn {
  font-size: 1.3rem !important;
  padding: 6px 12px !important;
}

.cart-badge {
  position: absolute;
  top: -2px;
  left: -2px;
  background: #ff3b30;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg-main, #fff);
  pointer-events: none;
  animation: cartBadgePop 0.25s ease-out;
}

@keyframes cartBadgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 8px;
  border-bottom: 1px solid #f0f0f2;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f5f7, #fbfbfd);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.cart-pdf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  image-rendering: -webkit-optimize-contrast; /* Sharpness for Webkit */
  image-rendering: high-quality;
}

.pdp-gallery-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.cart-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 4px;
  line-height: 1.3;
}

.cart-item-price {
  font-size: 0.85rem;
  color: #86868b;
  font-weight: 600;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  background: #f5f5f7;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-qty button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1d1d1f;
  cursor: pointer;
  transition: background 0.15s;
}

.cart-item-qty button:hover {
  background: #e5e5ea;
}

.cart-item-qty span {
  min-width: 32px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1d1d1f;
}

.cart-item-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: #c0c0c5;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s;
}

.cart-item-remove:hover {
  background: #ffe5e5;
  color: #ff3b30;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #86868b;
}

.cart-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* Dark theme */
body.dark-theme .cart-item {
  border-bottom-color: var(--border-subtle);
}

body.dark-theme .cart-item-title,
body.dark-theme .cart-item-qty span,
body.dark-theme .cart-item-qty button {
  color: var(--text-main);
}

body.dark-theme .cart-item-qty {
  background: var(--bg-card);
}

body.dark-theme .cart-item-qty button:hover {
  background: var(--bg-hover, #2c2c2e);
}
/* ========== PAYWALL & PREMIUM STYLES ========== */
.content-blurred {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.5s ease;
}

.premium-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 450px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: 48px 32px;
  text-align: center;
  z-index: 100;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  animation: modalScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-theme .premium-overlay {
  background: rgba(28, 28, 30, 0.85);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.premium-overlay-icon {
  font-size: 3.5rem;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #f9b233, #f5d142);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.premium-overlay-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.premium-overlay-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.premium-cta-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.premium-cta-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.article-body {
  position: relative;
  min-height: 300px;
}

/* ========== CUSTOM CHAT MODAL STYLING ========== */
.chat-window {
  background: #ffffff !important;
  color: #000000 !important;
  transition: background 0.3s, color 0.3s;
}

body.dark-theme .chat-window {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.chat-header {
  background: #f8f9fa !important;
  border-bottom: 1px solid #eee !important;
  color: #1d1d1f !important;
}

body.dark-theme .chat-header {
  background: #1c1c1e !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.chat-terms-btn {
  background: #34c759 !important; /* Elegant Apple Green */
  color: #ffffff !important;
  padding: 8px 20px !important;
  border-radius: 980px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.2) !important;
}

.chat-terms-btn:hover {
  background: #28a745 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(52, 199, 89, 0.3) !important;
}

.chat-terms-btn:active {
  transform: translateY(0);
}

/* Chat bubble adjustments for dark mode */
body.dark-theme #ai-chat-messages div {
    color: #ffffff !important;
}

body.dark-theme #ai-chat-messages div:not([style*="background:var(--primary)"]) {
    background: #1c1c1e !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme #ai-chat-input {
    background: #1c1c1e !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========== FEATURED TOP GRID (3 POSITIONS) ========== */
.featured-top-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 24px;
  max-width: 1300px;
  margin: 0 auto 48px;
  padding: 0 24px;
  direction: ltr;
}

.featured-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.featured-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  height: 100%;
  min-height: 280px;
}

.featured-card.center {
  min-height: 450px;
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.5s ease;
}

.featured-card:hover img {
  transform: scale(1.05);
}

.featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 30%, transparent);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: right;
}

.featured-tag {
  display: none !important;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 980px;
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.featured-card.center .featured-title {
  font-size: 2.2rem;
}

@media (max-width: 1024px) {
  .featured-top-grid {
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 12px;
    padding: 0 12px;
  }
  .featured-card.center .featured-title { font-size: 1.5rem; }
  .featured-title { font-size: 1rem; }
  .featured-overlay { padding: 16px; }
}

@media (max-width: 600px) {
  .featured-top-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 12px;
    margin: 16px auto 24px;
  }
  .featured-card { min-height: 220px; border-radius: 16px; }
  .featured-card.center { min-height: 220px; }
  .featured-card.center .featured-title, .featured-title { 
    font-size: 0.85rem; 
    line-height: 1.2;
    font-weight: 700;
  }
  .featured-overlay { 
    padding: 12px; 
    gap: 6px; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 40%, transparent);
  }
  .featured-tag { font-size: 0.65rem; padding: 3px 8px; }
  
  .news-sidebar { display: none !important; }
  .main-news-layout { gap: 0; margin-top: 20px; }
  #page-home { padding-top: 10px; }
}

/* Radio Button Styling for Admin */
.position-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.pos-option {
  position: relative;
}

.pos-option input {
  position: absolute;
  opacity: 0;
}

.pos-label {
  display: block;
  padding: 12px;
  text-align: center;
  background: #f5f5f7;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.pos-option input:checked + .pos-label {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ========== 3D TILT EFFECT & MODEL VIEWER ========== */
.product-card {
  perspective: 1000px;
}

.product-card img {
  transition: transform 0.3s ease-out;
  transform-style: preserve-3d;
}

.product-card:hover img {
  transform: rotateY(10deg) rotateX(5deg) scale(1.05);
}

model-viewer {
  --poster-color: transparent;
  background-color: transparent;
  width: 100%;
  height: 100%;
  border-radius: 24px;
}

#pdp-3d-container.active {
  display: block;
}

#pdp-3d-container.hidden {
  display: none;
}

.tilt-3d {
  transition: transform 0.1s ease;
  transform: perspective(1000px);
}

/* ========== COLLAPSIBLE SIDEBAR ========== */
:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 92px; /* Decreased by 1cm (38px) as per user request */
}


.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: #0a0a0a;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-toggle {
  display: none !important;
  position: absolute;
  top: 80px; /* Moved further down to ensure it's below the navbar in all states */
  right: -18px;
  width: 36px;
  height: 36px;
  background: #0071e3; /* Classic Apple Blue */
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.4);
  z-index: 999999 !important; /* Absolute top priority */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-toggle:hover {
  background: #0077ed;
  transform: scale(1.1);
}

.sidebar.collapsed .sidebar-toggle {
  transform: none; /* No rotation */
  width: 6px;
  height: 60px;
  border-radius: 10px;
  right: -3px; /* Stick halfway out the edge */
  border: none;
  background: #4a4a4f; /* Subtle gray line */
  box-shadow: none;
}

.sidebar.collapsed .sidebar-toggle:hover {
  background: #0071e3; /* Light up on hover */
  transform: scaleY(1.1);
}

.sidebar.collapsed .sidebar-toggle i {
  display: none; /* Hide the arrow icon */
}

.sidebar-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-header {
  margin-bottom: 40px;
  white-space: nowrap;
}

.sidebar-logo {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  opacity: 1;
  transition: opacity 0.3s;
  letter-spacing: -0.01em;
}

.sidebar.collapsed .sidebar-logo {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center !important;
}

#sidebar-hamburger-btn {
  flex-shrink: 0;
  transition: background 0.2s, border 0.2s;
}
#sidebar-hamburger-btn:hover rect {
  fill: #f59e0b !important;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  padding-right: 12px;
  color: #a1a1aa;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-link span {
  flex: 1;
  white-space: nowrap;
}

.sidebar-link i {
  font-size: 0.95rem;
  min-width: 18px;
  text-align: center;
  opacity: 0.8;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.sidebar-link:hover i { opacity: 1; }

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link.active i { opacity: 1; }

.sidebar.collapsed .sidebar-inner {
  padding: 20px 10px; /* Slimmer padding for collapsed state */
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .sidebar-link i {
  margin: 0;
  font-size: 1.4rem; /* Slightly larger in collapsed state for better look */
}

.sidebar.collapsed .sidebar-link span {
  display: none;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

/* Sidebar Ads */
.sidebar-ads-container {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-ad-box {
  background: #f5f5f7;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-ads-container {
  opacity: 0;
  pointer-events: none;
}

.sidebar-ad-box p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #86868b;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dynamic-ad-slot {
  min-height: 100px;
  background: #fff;
  border-radius: 8px;
  border: 1px dashed #d2d2d7;
}

/* Main Content Adjustment */
#main-wrapper {
  margin-left: var(--sidebar-width);
  transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: calc(100% - var(--sidebar-width));
  padding-top: 44px; /* Space for the fixed navbar */
}

#main-wrapper.sidebar-collapsed {
  margin-left: calc(var(--sidebar-collapsed-width) + 24px); /* Premium 24px safety gap when collapsed */
  width: calc(100% - (var(--sidebar-collapsed-width) + 24px));
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
    width: 280px;
  }
  .sidebar.active ~ #main-wrapper,
  .sidebar.active + #main-wrapper {
    margin-left: calc(280px + 24px) !important;
    width: calc(100% - (280px + 24px)) !important;
  }
  #main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ========== WATCHLIST STYLES (TradingView Style) ========== */
.watchlist-container {
  background: #131722; /* Dark theme background */
  border-radius: 12px;
  overflow: hidden;
  color: #d1d4dc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin-top: 20px;
  max-width: 450px; /* Half the size */
  margin-left: auto; /* Align to the extreme right in RTL */
  margin-right: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.watchlist-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 40px;
  padding: 10px 16px;
  background: #1e222d;
  font-size: 0.75rem;
  font-weight: 700;
  color: #787b86;
  text-transform: uppercase;
  border-bottom: 1px solid #2a2e39;
}

.watchlist-group {
  border-bottom: 1px solid #2a2e39;
}

.group-title {
  padding: 8px 16px;
  background: #1a1e2a;
  font-size: 0.7rem;
  color: #86868b;
  font-weight: 700;
  text-transform: uppercase;
}

.watchlist-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 40px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid #2a2e39;
  transition: background 0.2s;
  cursor: pointer;
}

.watchlist-row:hover {
  background: #2a2e39;
}

.col-symbol {
  display: flex;
  align-items: center;
  gap: 12px;
}

.symbol-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.symbol-info {
  display: flex;
  flex-direction: column;
}

.symbol-name {
  font-weight: 700;
  color: #f0f3fa;
  font-size: 0.9rem;
}

.symbol-desc {
  font-size: 0.7rem;
  color: #787b86;
}

.col-last {
  font-weight: 600;
  font-size: 0.9rem;
  color: #f0f3fa;
}

.col-chg.up, .col-chg-pct.up {
  color: #089981; /* Green */
}

.col-chg.down, .col-chg-pct.down {
  color: #f23645; /* Red */
}

.remove-btn {
  background: transparent;
  border: none;
  color: #787b86;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.remove-btn:hover {
  color: #f23645;
  background: rgba(242, 54, 69, 0.1);
}

/* Dark Theme Adjustments - FORCED */
body.dark-theme .sidebar,
body.dark-theme aside.sidebar,
body#body.dark-theme .sidebar {
  background-color: #1c1c1e !important;
  background: #1c1c1e !important;
  border-right: 1px solid #38383a !important;
}

body.dark-theme .sidebar-logo, 
body.dark-theme .sidebar-link,
body.dark-theme .sidebar h2,
body.dark-theme .sidebar span {
  color: #f5f5f7 !important;
}

body.dark-theme .sidebar-link i {
  color: #f5f5f7 !important;
}

body.dark-theme .sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

body.dark-theme .sidebar-link.active {
  background: rgba(245, 158, 11, 0.1) !important; /* Soft premium gold background */
  color: #f59e0b !important; /* Golden active text */
  border-left: 3px solid #f59e0b !important; /* Elegant gold indicator bar on the left */
}

/* Position indicator bar on the right side inside RTL mode */
body.rtl-layout .sidebar-link.active {
  border-left: none !important;
  border-right: 3px solid #f59e0b !important;
}

body.dark-theme .sidebar-link.active i {
  color: #f59e0b !important; /* Golden active icon */
}

body.dark-theme .sidebar-divider {
  background-color: #38383a !important;
}

body.dark-theme .sidebar-ad-box {
  background-color: #2c2c2e !important;
  border: 1px solid #38383a !important;
}

/* Sidebar Submenu Styles - Refined */
.sidebar-submenu {
  margin: 0;
  padding: 5px 0 10px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}

.submenu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 45px 10px 15px; /* Aligned with sidebar icons */
  color: #86868b;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
  border-radius: 0;
  position: relative;
}

.submenu-link::before {
  content: '';
  position: absolute;
  right: 25px;
  width: 4px;
  height: 4px;
  background: #d2d2d7;
  border-radius: 50%;
}

.submenu-link:hover {
  background: rgba(0, 113, 227, 0.05);
  color: var(--primary);
}

.submenu-link:hover::before {
  background: var(--primary);
  transform: scale(1.5);
}

body.dark-theme .submenu-link {
  color: #a1a1a6;
}

body.dark-theme .submenu-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f7;
}

body.dark-theme .submenu-link::before {
  background: #424245;
}

.sidebar.collapsed .sidebar-submenu,
.sidebar.collapsed .sidebar-link .fa-chevron-down,
.sidebar.collapsed .sidebar-link[data-page^="my-"],
.sidebar.collapsed .sidebar-link-actions,
.sidebar.collapsed .sidebar-divider:nth-of-type(2) {
  display: none !important;
}

.btn-save-article {
  background: #000000 !important; /* Black in light mode */
  color: #ffffff !important;      /* White text in light mode */
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 10px 24px !important;
  border-radius: 980px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-save-article:hover {
  transform: scale(1.02);
  background: #111111 !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

body.dark-theme .btn-save-article {
  background: #000000 !important; /* Black in dark mode */
  color: #ffffff !important;      /* White text in dark mode */
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Meta Bookmark Button */
.meta-bookmark-btn {
  background: none;
  border: none;
  padding: 0 5px;
  cursor: pointer;
  color: #86868b;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.meta-bookmark-btn:hover {
  color: #1d1d1f;
  transform: scale(1.1);
}

.meta-bookmark-btn.active {
  color: #f9b233; /* Yellow for active state */
}

body.dark-theme .meta-bookmark-btn {
  color: #a1a1a6;
}

body.dark-theme .meta-bookmark-btn:hover {
  color: #f5f5f7;
}

body.dark-theme .meta-bookmark-btn.active {
  color: #f9b233;
}

.btn-save-article.active {
  background: #f9b233 !important;
  color: #ffffff !important;
  border-color: #f9b233 !important;
}

.btn-save-article.active i {
  color: #ffffff !important;
}

/* Focus Mode Styles */
.sidebar-link-actions {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}

.focus-toggle {
  font-size: 0.85rem;
  opacity: 0.4;
  cursor: pointer;
  transition: all 0.2s;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.focus-toggle:hover {
  opacity: 1;
  background: rgba(0, 113, 227, 0.1);
  color: var(--primary);
}

.sidebar.focus-mode .sidebar-link:not(.focused-link),
.sidebar.focus-mode .sidebar-divider,
.sidebar.focus-mode .sidebar-logo,
.sidebar.focus-mode .sidebar-ads-container {
  display: none !important;
}

.sidebar.focus-mode .sidebar-link.focused-link {
  background: rgba(0, 113, 227, 0.05);
  margin-bottom: 10px;
  cursor: default;
}

.sidebar.focus-mode .sidebar-link.focused-link i:not(.focus-toggle),
.sidebar.focus-mode .sidebar-link.focused-link span {
  pointer-events: none !important;
}

.sidebar.focus-mode .sidebar-link.focused-link .focus-toggle {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 100;
  background: var(--primary);
  color: white !important;
  opacity: 1 !important;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.sidebar.focus-mode .sidebar-link.focused-link .focus-toggle::before {
  content: '\f061'; /* fa-arrow-right */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 0.9rem;
}

.sidebar.focus-mode .sidebar-link.focused-link .focus-toggle::after {
  content: none;
}






.sidebar.focus-mode .sidebar-link.focused-link .fa-chevron-down {
  display: none !important;
}

.sidebar.focus-mode .sidebar-submenu {
  display: flex !important;
  opacity: 1 !important;
  max-height: none !important;
}

#back-from-focus {
  display: none;
  margin-bottom: 20px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.sidebar.focus-mode #back-from-focus {
  display: flex;
}

/* Saved Highlight Style */
.feed-item.saved-highlight {
  background: rgba(249, 178, 51, 0.08) !important;
  border-right: 4px solid #f9b233 !important;
  transition: all 0.3s ease;
}

body.dark-theme .feed-item.saved-highlight {
  background: rgba(249, 178, 51, 0.15) !important;
}

.featured-card.saved-highlight {
  box-shadow: inset 0 0 0 4px #f9b233, 0 10px 30px rgba(249, 178, 51, 0.3) !important;
}

.featured-card.saved-highlight::after {
  content: '\f02e'; /* Bookmark solid */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 15px;
  left: 15px;
  color: #f9b233;
  font-size: 1.2rem;
  z-index: 10;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ========== APPLE STYLE HOME ========== */
.hero-section-apple {
  text-align: center;
  padding: 100px 24px;
  background: #000;
  color: #fff;
  border-radius: 28px;
  margin-bottom: 40px;
  animation: fadeIn 1s ease-out;
}
.hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.5rem;
  color: #86868b;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-btn {
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 980px;
  margin: 0 10px;
}
.content-section-apple {
  padding: 0 24px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.articles-grid-apple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}
.article-card-apple {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  cursor: pointer;
}
.article-card-apple:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.article-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: #f5f5f7;
}
.article-card-content {
  padding: 24px;
}
.article-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0071e3;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
  letter-spacing: 0.05em;
}
.article-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.25;
  color: #1d1d1f;
}
.article-card-snippet {
  font-size: 0.95rem;
  color: #86868b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .articles-grid-apple { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 3rem; }
}
@media (max-width: 600px) {
  .articles-grid-apple { grid-template-columns: 1fr; }
  .hero-section-apple { padding: 60px 20px; }
  .hero-title { font-size: 2.5rem; }
}

body.dark-theme .article-card-apple {
  background: #1c1c1e;
  border-color: #333;
}
body.dark-theme .article-card-title {
  color: #fff;
}
body.dark-theme .article-card-snippet {
  color: #a1a1a6;
}
/* VIDEO REVIEWS STYLES */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-card {
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Bottom gradient for text legibility */
.video-thumbnail::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
  pointer-events: none;
}

.video-brand {
  position: absolute;
  bottom: 10px;
  left: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 1;
}

.video-brand span {
  font-size: 1.1rem;
  line-height: 1;
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}

.play-overlay {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0;
  transition: all 0.3s;
  z-index: 2;
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.video-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 40px; /* Large gap like screenshot */
}

.video-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin: 0;
}

.video-subtitle {
  color: #a1a1a6;
  font-size: 0.95rem;
  margin: 0;
  margin-top: auto;
}

.video-embed-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 32px;
  overflow: hidden;
  margin-bottom: 40px;
  background: #000;
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.video-embed-wrapper iframe {
  width: 100%;
  height: 100%;
}

.review-detail-container {
  max-width: 900px;
  margin: 0 auto;
}
/* 3D STORE GALLERY STYLES */
.store-3d-wrapper {
  background: #000;
  min-height: 100vh;
  padding: 80px 20px;
  border-radius: 48px;
  margin-top: 40px;
}

.store-3d-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.store-3d-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-3d-card:hover {
  transform: scale(1.02);
}

.store-3d-title {
  display: none;
}

.store-3d-visual {
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 32px;
}

.store-3d-visual img {
  width: 100%;
  height: auto;
  max-width: 500px;
  object-fit: contain;
}

.store-3d-info {
  padding: 40px 20px;
  text-align: center;
}

.store-card-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.store-card-desc {
  color: #a1a1a6;
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 30px;
  font-weight: 400;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.store-card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.store-card-price {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
}

.store-card-add-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 12px 32px;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-card-add-btn:hover {
  background: #f5f5f7;
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  .store-3d-grid {
    grid-template-columns: 1fr;
    gap: 80px;
  }
  .store-3d-title {
    font-size: 2rem;
  }
}

/* ARTICLE REVIEWS STYLES */
.article-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.article-review-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border-subtle);
}

.article-review-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.article-review-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}

.article-review-info {
  padding: 24px;
}

.article-review-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-review-desc {
  color: #86868b;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-review-meta {
  font-size: 0.85rem;
  color: #86868b;
  font-weight: 600;
}

.review-article-hero {
  width: 100%;
  height: 500px;
  background-size: cover;
  background-position: center;
  border-radius: 32px;
  margin-bottom: 40px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

/* Category Filter Bar */
.category-filter-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  margin-bottom: 10px;
}
.category-filter-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-pill {
  flex: 0 0 auto;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-soft);
}
.category-pill:hover {
  background: var(--bg-hover);
}
.category-pill.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

/* Featured Carousel */
.featured-carousel-container {
  position: relative;
  width: 100%;
  margin-bottom: 30px;
}

@media (min-width: 1025px) {
  #page-home .category-filter-bar,
  #page-home .featured-carousel-container {
    max-width: 1280px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0;
    padding-right: 0;
  }

  body:not(.rtl-layout) #page-home .category-filter-bar,
  body:not(.rtl-layout) #page-home .featured-carousel-container,
  body:not(.rtl-layout) #page-home .main-news-layout {
    padding-left: 76px;
  }

  body.rtl-layout #page-home .category-filter-bar,
  body.rtl-layout #page-home .featured-carousel-container,
  body.rtl-layout #page-home .main-news-layout {
    padding-right: 76px;
  }
}

.carousel-track-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 24px;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 10px;
  width: 100%;
}
.carousel-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.carousel-slide {
  scroll-snap-align: center;
  flex: 0 0 90%; /* 90% width to hint next slide on mobile */
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  height: 400px;
  background: #000;
}

@media (min-width: 768px) {
  .carousel-slide {
    flex: 0 0 calc(33.333% - 11px); /* Three featured articles per slide group */
    height: 330px;
  }
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

.carousel-slide:hover img {
  opacity: 1;
  transform: scale(1.05);
}

.carousel-arrow {
  display: none;
}
.carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}
.carousel-arrow.left {
  left: 12px;
}
.carousel-arrow.right {
  right: 12px;
}

body.rtl-layout .carousel-arrow.left {
  left: 12px;
}

body.rtl-layout .carousel-arrow.right {
  right: 12px;
}

@media (max-width: 768px) {
  .carousel-arrow {
    display: none; /* Hide arrows on mobile, rely on swipe */
  }
}

/* ========== MODERN STORE (GROCERY UI) ========== */
.store-container-modern {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Banners */
.store-banners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.store-banner-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px;
  min-height: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.store-banner-content {
  flex: 1;
  max-width: 60%;
  z-index: 2;
}

.store-banner-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.store-banner-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.store-banner-img {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 50%;
  height: 120%;
  z-index: 1;
  opacity: 0.9;
}

.store-banner-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(-5deg);
}

/* Categories */
.store-categories-container {
  overflow: hidden;
  width: 100%;
  padding: 10px 0;
  position: relative;
}

.store-categories-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollCategories 40s linear infinite;
}

.store-categories-track:hover {
  animation-play-state: paused;
}

@keyframes scrollCategories {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 10px)); }
}

.store-category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-width: 80px;
}

.store-category-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-category-item:hover .store-category-icon-box {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.store-category-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Product Grid */
.store-modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.store-modern-card {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.store-modern-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.store-modern-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.dark-theme .store-modern-image {
  background: rgba(255,255,255,0.05);
}

.store-modern-image img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.store-modern-card:hover .store-modern-image img {
  transform: scale(1.05);
}

.store-modern-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868b;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: color 0.2s, background 0.2s;
}

.store-modern-fav-btn:hover {
  color: #ff3b30;
  background: white;
}

.store-modern-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.store-modern-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.3;
}

.store-modern-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px 0;
}

.store-modern-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.store-modern-price {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary);
}

.store-modern-add-btn {
  background: #101010;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

body.dark-theme .store-modern-add-btn {
  background: #fbfbfd;
  color: #101010;
}

.store-modern-add-btn:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: white;
}

/* ========== LOCATION SELECTOR ========== */
.location-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
  border-radius: 980px;
  transition: opacity 0.2s;
  user-select: none;
}

.location-selector:hover {
  opacity: 0.8;
}

.location-chevron {
  color: #0ea5e9;
  font-size: 0.85rem;
}

.location-text {
  color: #0ea5e9;
  font-weight: 600;
  font-size: 1.1rem;
}

.location-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0b1426;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0ea5e9;
  font-size: 1.1rem;
}

body.light-theme .location-icon-circle {
  background: #e0f2fe;
  color: #0369a1;
}
body.light-theme .location-text,
body.light-theme .location-chevron {
  color: #0369a1;
}

.location-dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 8px;
  z-index: 1000;
  flex-direction: column;
  gap: 4px;
}

.location-selector:hover .location-dropdown-content,
.location-dropdown-content.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.location-item {
  background: none;
  border: none;
  color: var(--text-main);
  padding: 10px 16px;
  text-align: right;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
  font-family: inherit;
}

.location-item:hover {
  background: var(--bg-glass-hover);
}

/* ========== WEATHER WIDGET ========== */
.sidebar-weather-widget {
  margin: 10px 20px 20px;
  padding: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-soft);
}

#sidebar-weather-widget,
.sidebar-weather-widget {
  display: none !important;
}

.weather-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weather-capital {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.weather-temp {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.weather-icon-container {
  font-size: 2.2rem;
  color: #0ea5e9;
}

/* ========== BOTTOM DRAWER (CART / SAVED ITEMS) ========== */
.bottom-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #0d0f12; /* Match beautiful dark theme */
  color: #fff;
  z-index: 99999; /* Ensure it is above cookie banner and footer always */
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -15px 50px rgba(0,0,0,0.6);
  height: 45vh;
  display: flex;
  flex-direction: column;
}

.bottom-drawer.active {
  transform: translateY(0);
}

.bottom-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #333;
}

.bottom-drawer-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 16px;
  overflow-y: auto;
  align-items: start;
}

.bottom-drawer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  width: 100%;
}

.bottom-drawer-item-img {
  width: 100%;
  aspect-ratio: 1;
  background: #2a2a2a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bottom-drawer-item-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.bottom-drawer-item-qty {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1a1a1a;
}

.bottom-drawer-item-title {
  font-size: 0.75rem;
  color: #a1a1a6;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.bottom-drawer-item-remove {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  background: #ff3b30;
  color: white;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.bottom-drawer-item:hover .bottom-drawer-item-remove {
  opacity: 1;
}

.bottom-drawer-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

/* Animated Video Ad */
.ad-video-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  overflow: hidden;
}

.ad-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  padding: 15px;
  animation: adVideoLoop 5s infinite;
}

.slide-1 { animation-delay: 0s; }
.slide-2 { animation-delay: 1.66s; }
.slide-3 { animation-delay: 3.33s; background: linear-gradient(135deg, #2563eb, #1d4ed8); }

@keyframes adVideoLoop {
  0% { opacity: 0; transform: translateY(10px) scale(0.95); }
  5% { opacity: 1; transform: translateY(0) scale(1); }
  28% { opacity: 1; transform: translateY(0) scale(1); }
  33.33% { opacity: 0; transform: translateY(-10px) scale(1.05); }
  100% { opacity: 0; }
}

.ad-text {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ad-icon {
  color: #60a5fa;
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.slide-3 .ad-text {
  color: #fbbf24;
  font-size: 1.1rem;
}

.ad-btn {
  background: #fbbf24;
  color: #000;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  margin-top: 5px;
}

.ad-video-container::after {
  content: "SPONSORED";
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
}

/* ========== FLOATING AD WIDGET ========== */
.floating-ad-card {
  position: fixed;
  bottom: 24px;
  right: -400px; /* Hidden offscreen by default */
  width: 320px;
  background: rgba(28, 28, 30, 0.85); /* Apple dark modal background */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  overflow: hidden;
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
  direction: rtl;
  text-align: right;
}

.floating-ad-card.active {
  right: 24px; /* Slide in */
}

.floating-ad-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.ad-close-btn {
  position: absolute;
  top: 10px;
  left: 10px; /* Left side in RTL */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.ad-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.ad-card-inner {
  display: flex;
  flex-direction: column;
}

.ad-image-container {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.ad-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.floating-ad-card:hover .ad-image-container img {
  transform: scale(1.05);
}

.ad-content-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ad-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ff9500; /* Apple Premium Gold/Orange */
  background: rgba(255, 149, 0, 0.15);
  padding: 4px 8px;
  border-radius: 6px;
  align-self: flex-start;
}

.ad-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.ad-desc {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #a1a1a6;
  margin: 0;
}

.ad-cta-btn {
  background: #ff9500;
  color: #000;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.ad-cta-btn:hover {
  background: #ffcc00;
}

.ad-cta-btn:active {
  transform: scale(0.98);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .floating-ad-card {
    width: calc(100% - 32px) !important;
    left: 16px !important;
    right: auto !important;
    bottom: -400px !important;
  }
  
  .floating-ad-card.active {
    bottom: 16px !important;
  }
}

/* ========== NAVBAR TOGGLE & SOKI LOGO ========== */
.navbar-sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.navbar-sidebar-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.08);
}

body.dark-theme .navbar-sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.soki-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 4px;
  user-select: none;
}

.soki-logo:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.soki-logo-crown {
  font-size: 18px;
  color: #ff9500; /* Premium gold */
  filter: drop-shadow(0 2px 6px rgba(255, 149, 0, 0.3));
  transition: transform 0.3s;
}

.soki-logo:hover .soki-logo-crown {
  transform: translateY(-2px) rotate(5deg);
}

.soki-logo-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 850; /* Extra bold */
  letter-spacing: -0.03em;
  color: var(--text-main);
  text-transform: uppercase;
}

/* Hide weather widget when sidebar is collapsed */
.sidebar.collapsed .sidebar-weather-widget {
  display: none !important;
}

/* ========== NAVBAR SEARCH BAR ========== */
.apple-search-wrapper {
  position: relative;
  margin: 0 16px;
  width: 220px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-search-wrapper input {
  width: 100%;
  padding: 8px 16px 8px 36px;
  font-size: 13.5px;
  font-family: inherit;
  border-radius: 980px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  direction: rtl; /* RTL aligned search text */
  box-sizing: border-box;
}

body.dark-theme .apple-search-wrapper input {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.apple-search-wrapper input::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

.apple-search-wrapper input:focus {
  outline: none;
  background: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
  width: 280px; /* Expand on focus */
}

body.dark-theme .apple-search-wrapper input:focus {
  background: #1c1c1e;
  border-color: #30d158; /* Green glow in dark mode */
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.15);
}

.apple-search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
}

.apple-search-wrapper input:focus + .search-icon {
  color: #0071e3;
}

body.dark-theme .apple-search-wrapper input:focus + .search-icon {
  color: #30d158;
}

/* Responsive Navbar Search */
@media (max-width: 900px) {
  .apple-search-wrapper {
    display: none;
  }
}

/* ========== SOKI PREMIUM TECHCRUNCH FOOTER ========== */
.soki-footer-premium {
  background: #0d0f12; /* Dark luxury gray */
  border-top: 1px solid var(--border-subtle);
  padding: 64px 48px 48px;
  color: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 10;
  position: relative;
  margin-top: 120px; /* Generous spacing so it never squishes content */
  width: 100%;
  box-sizing: border-box;
}

.soki-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
}

.soki-footer-brand-col {
  flex: 1.5;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  padding-left: 0px;
}

.soki-footer-brand-col .soki-logo {
  margin-bottom: 24px;
  pointer-events: none; /* Just a logo display */
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.soki-footer-brand-col .soki-logo-crown {
  font-size: 28px;
  color: #ff9500;
  filter: drop-shadow(0 2px 8px rgba(255, 149, 0, 0.4));
}

.soki-footer-brand-col .soki-logo-text {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-transform: uppercase;
}

.soki-footer-socials {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.soki-social-icon {
  color: #86868b;
  font-size: 18px;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.soki-social-icon:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.soki-footer-copyright {
  font-size: 12px;
  color: #86868b;
  margin: 0;
  letter-spacing: -0.01em;
}

.soki-footer-links-container {
  flex: 2;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  min-width: 320px;
}

.soki-footer-col {
  flex: 1;
  min-width: 120px;
}

.soki-footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.soki-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.soki-footer-col ul li a {
  color: #86868b;
  font-size: 13.5px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-block;
}

.soki-footer-col ul li a:hover {
  color: #ffffff;
}

/* App Store & Google Play Badges */
.soki-footer-apps {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.soki-app-badge {
  display: flex;
  align-items: center;
  background: #000000;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 6px 16px;
  text-decoration: none;
  color: #ffffff;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  min-width: 145px;
  box-sizing: border-box;
}

.soki-app-badge:hover {
  background: #111111;
  border-color: #555555;
  transform: translateY(-2px);
}

.soki-app-badge .app-icon {
  font-size: 20px;
  margin-right: 10px;
  color: #ffffff;
}

.soki-app-badge .app-img {
  width: 18px;
  height: 18px;
  margin-right: 10px;
}

.soki-app-badge .app-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.soki-app-badge .app-sub {
  font-size: 7.5px;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.soki-app-badge .app-main {
  font-size: 13.5px;
  font-weight: 700;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .soki-footer-premium {
    padding: 48px 24px 32px;
  }
  
  .soki-footer-inner {
    flex-direction: column;
    gap: 36px;
  }
  
  .soki-footer-brand-col {
    min-height: auto;
    justify-content: flex-start;
    padding-left: 0;
  }
  
  .soki-footer-links-container {
    flex-direction: column;
    gap: 28px;
  }
}

/* =====================================================================
   PREMIUM DARK COOKIE CONSENT BANNER
   ===================================================================== */
.premium-cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  z-index: 99999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 28px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

.premium-cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.premium-cookie-text {
  flex: 1;
  font-size: 0.94rem;
  line-height: 1.6;
  font-weight: 400;
  color: #e8e8ed;
  margin: 0;
}

.premium-cookie-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.premium-cookie-btn {
  border-radius: 980px;
  padding: 10px 24px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  white-space: nowrap;
  border: none;
}

.premium-cookie-btn-accept {
  background-color: #ffffff;
  color: #000000;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.premium-cookie-btn-accept:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.premium-cookie-btn-accept:active {
  transform: translateY(0);
}

.premium-cookie-btn-privacy {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

.premium-cookie-btn-privacy:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.premium-cookie-btn-privacy:active {
  transform: translateY(0);
}

/* RTL Specific alignment */
.premium-cookie-banner[style*="direction: rtl"] .premium-cookie-text {
  text-align: right;
}

.premium-cookie-banner[style*="direction: ltr"] .premium-cookie-text {
  text-align: left;
}

@media (max-width: 768px) {
  .premium-cookie-banner {
    padding: 20px 20px;
  }
  
  .premium-cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .premium-cookie-text {
    text-align: center !important;
  }
  
  .premium-cookie-actions {
    justify-content: center;
    width: 100%;
  }
  
  .premium-cookie-btn {
    flex: 1;
    text-align: center;
  }
}

/* ARTICLE NEW COMMENT PLACEHOLDER */
#article-new-comment::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* =====================================================================
   PREMIUM MESSAGES & ALERTS HUB CSS
   ===================================================================== */
.messages-container {
  display: flex;
  height: 650px;
  background: rgba(20, 20, 22, 0.7);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.messages-tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
  padding-bottom: 12px;
}

.messages-tab-btn {
  background: transparent;
  border: none;
  color: #86868b;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.messages-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.messages-tab-pane {
  display: none;
  height: 100%;
  width: 100%;
}

.messages-tab-pane.active {
  display: flex;
}

/* Chat Sidebar (Left) */
.chat-sidebar {
  width: 320px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
}

.chat-search-wrap {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-search-input {
  width: 100%;
  padding: 10px 16px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
}

.chat-user-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.chat-user-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-user-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.05);
}

.chat-user-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
}

.chat-user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.chat-user-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34c759;
  border: 2px solid #1c1c1e;
}

.chat-user-info {
  flex: 1;
  min-width: 0;
}

.chat-user-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.chat-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-user-time {
  font-size: 0.75rem;
  color: #86868b;
}

.chat-user-lastmsg {
  font-size: 0.82rem;
  color: #86868b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat Main (Right) */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.1);
  position: relative;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
}

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

.chat-header-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
}

.chat-header-status {
  font-size: 0.8rem;
  color: #34c759;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 65%;
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-sizing: border-box;
  word-wrap: break-word;
}

.chat-bubble-received {
  background: #2c2c2e;
  color: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble-sent {
  background: #0071e3;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-bubble-time {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  text-align: right;
}

.chat-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
}

.chat-input-wrap {
  flex: 1;
  position: relative;
}

.chat-input {
  width: 100%;
  padding: 12px 18px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 980px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0071e3;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1rem;
}

.chat-send-btn:hover {
  background: #0077ed;
  transform: scale(1.05);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #86868b;
  text-align: center;
  padding: 40px;
  width: 100%;
}

.chat-placeholder-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.15);
}

/* Notifications Pane */
.notifications-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
  overflow-y: auto;
  width: 100%;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.notification-item-unread {
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.2);
}

.notification-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.notification-item-unread .notification-icon-wrap {
  background: rgba(0, 113, 227, 0.2);
  color: #0071e3;
}

.notification-content {
  flex: 1;
}

.notification-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #ffffff;
  margin-bottom: 4px;
}

.notification-time {
  font-size: 0.8rem;
  color: #86868b;
}

.notification-delete-btn {
  background: transparent;
  border: none;
  color: #86868b;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.2s;
  padding: 4px;
}

.notification-delete-btn:hover {
  color: #ff453a;
}

@media (max-width: 900px) {
  .messages-container {
    flex-direction: column;
    height: 750px;
  }
  
  .chat-sidebar {
    width: 100%;
    height: 220px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* ========== COMMUNITY FORUM & PERSONAL ARCHIVE STYLES ========== */
.forum-category-block {
  box-shadow: var(--shadow-soft);
  margin-top: 16px;
}

.forum-category-header {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.forum-row {
  transition: var(--transition-smooth);
}

.forum-row:last-child {
  border-bottom: none !important;
}

.forum-row:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* Timeline Layout */
.timeline-wrapper {
  margin-top: 24px;
}

.timeline-year-section {
  position: relative;
}

.timeline-month-section {
  position: relative;
}

.archive-item-card {
  transition: var(--transition-smooth) !important;
}

.archive-item-card:hover {
  border-color: rgba(255, 69, 58, 0.3) !important;
  transform: translateX(-6px) !important;
  background: rgba(255, 69, 58, 0.02) !important;
  box-shadow: 0 4px 20px rgba(255, 69, 58, 0.06);
}

/* Watermark Background */
.archive-watermark {
  position: absolute;
  top: -60px;
  right: -50px;
  font-size: 26rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  user-select: none;
  pointer-events: none;
  font-family: 'Inter', 'Assistant', sans-serif;
  z-index: 1;
}

@media (max-width: 768px) {
  .forum-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
    padding: 16px !important;
  }
  .forum-row > div {
    width: 100% !important;
    text-align: right !important;
    justify-content: flex-start !important;
  }
  .archive-watermark {
    font-size: 15rem;
    top: -20px;
    right: -20px;
  }
}

.premium-post-card:hover .post-card-title {
  color: #ff453a !important;
}

/* =====================================================================
   DYNAMIC RTL LAYOUT OVERRIDES (Triggered by body.rtl-layout)
   ===================================================================== */
@media (min-width: 769px) {
  body.rtl-layout .sidebar {
    right: 0 !important;
    left: auto !important;
    border-left: 1px solid var(--border-subtle) !important;
    border-right: none !important;
    direction: rtl !important;
  }
}

body.rtl-layout .sidebar-link {
  flex-direction: row !important; /* Keep icon right and text left inside dynamic RTL */
  justify-content: flex-start !important;
  text-align: right !important;
}

body.rtl-layout .sidebar-link i {
  margin-left: 12px !important;
  margin-right: 0 !important;
}

body.rtl-layout .sidebar-weather-widget {
  flex-direction: row-reverse !important;
  justify-content: space-between !important;
}

body.rtl-layout .weather-info {
  align-items: flex-end !important;
}

@media (min-width: 769px) {
  body.rtl-layout .navbar-apple {
    right: var(--sidebar-width) !important;
    left: 0 !important;
    width: calc(100% - var(--sidebar-width)) !important;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  body.rtl-layout.sidebar-collapsed .navbar-apple,
  body.rtl-layout.sidebar-collapsed ~ #main-wrapper .navbar-apple {
    right: var(--sidebar-collapsed-width) !important;
    left: 0 !important;
    width: calc(100% - var(--sidebar-collapsed-width)) !important;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  body.rtl-layout #main-wrapper {
    margin-right: calc(var(--sidebar-width) + 40px) !important;
    margin-left: 0 !important;
    width: calc(100% - (var(--sidebar-width) + 40px)) !important;
    transition: margin-right 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  body.rtl-layout.sidebar-expanded #main-wrapper {
    margin-right: calc(var(--sidebar-width) + 40px) !important;
    width: calc(100% - (var(--sidebar-width) + 40px)) !important;
  }

  body.rtl-layout .sidebar.collapsed + #main-wrapper,
  body.rtl-layout.sidebar-collapsed #main-wrapper,
  body.rtl-layout #main-wrapper.sidebar-collapsed {
    margin-right: calc(var(--sidebar-collapsed-width) + 40px) !important;
    margin-left: 0 !important;
    width: calc(100% - (var(--sidebar-collapsed-width) + 40px)) !important;
    transition: margin-right 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  body.rtl-layout .sidebar-toggle {
    left: -18px !important;
    right: auto !important;
  }
}

/* LIVE EDIT MODE */
body.live-edit-mode h1, 
body.live-edit-mode h2, 
body.live-edit-mode h3, 
body.live-edit-mode h4, 
body.live-edit-mode p, 
body.live-edit-mode span, 
body.live-edit-mode a, 
body.live-edit-mode button, 
body.live-edit-mode img {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23fb923c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>') 0 20, auto !important;
  transition: outline 0.2s;
}

body.live-edit-mode h1:hover, 
body.live-edit-mode h2:hover, 
body.live-edit-mode h3:hover, 
body.live-edit-mode h4:hover, 
body.live-edit-mode p:hover, 
body.live-edit-mode span:hover, 
body.live-edit-mode a:hover, 
body.live-edit-mode button:hover, 
body.live-edit-mode img:hover {
  outline: 2px dashed #fb923c !important;
  outline-offset: 4px;
}

/* ===========================
   MOBILE (max-width: 768px)
   =========================== */
@media (max-width: 768px) {

  /* Sidebar Drawer: slide in as overlay when .mobile-open */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -280px !important;
    left: auto !important;
    width: 280px !important;
    height: 100vh !important;
    z-index: 3000 !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: none !important;
    overflow-y: auto;
    background: #111111 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: -8px 0 30px rgba(0,0,0,0.5) !important;
  }
  body:not(.rtl-layout) .sidebar {
    right: auto !important;
    left: -280px !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: none !important;
    box-shadow: 8px 0 30px rgba(0,0,0,0.5) !important;
  }
  .sidebar.mobile-open {
    right: 0 !important;
  }
  body:not(.rtl-layout) .sidebar.mobile-open {
    left: 0 !important;
  }

  /* Dark Overlay Backdrop */
  .sidebar-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 2999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .sidebar-mobile-backdrop.active { display: block; }

  /* Main Wrapper: full bleed with header spacing */
  #main-wrapper {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    padding-top: 48px !important;
  }
  body.rtl-layout #main-wrapper {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  /* Header Navbar: clean & fixed */
  .navbar-apple {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 48px !important;
    z-index: 1000 !important;
    background: var(--bg-main) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  }
  body.rtl-layout .navbar-apple {
    right: 0 !important;
    left: 0 !important;
  }
  .nav-inner-apple {
    height: 48px !important;
    padding: 0 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    flex-direction: row !important;
  }
  /* Hide desktop-only controls */
  .nav-left-section,
  .nav-right-section .apple-nav-item,
  .nav-inner-apple > div:nth-child(2) {
    display: none !important;
  }
  .soki-logo {
    font-size: 1.15rem !important;
  }
  .soki-logo-text {
    color: var(--text-main) !important;
  }

  /* Category Navigation (Sticky) */
  .nav-secondary-apple {
    display: flex !important;
    position: sticky !important;
    top: 48px !important;
    z-index: 990 !important;
    background: var(--bg-main) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 0 6px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    align-items: center !important;
    height: 46px !important;
  }
  .nav-secondary-apple::-webkit-scrollbar { display: none !important; }
  .sec-nav-item {
    color: var(--text-muted) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    padding: 10px 14px !important;
    white-space: nowrap !important;
    display: inline-block !important;
    background: none !important;
    border: none !important;
    min-height: unset !important;
    min-width: unset !important;
    border-bottom: 3px solid transparent !important;
    transition: color 0.2s, border-color 0.2s;
  }
  .sec-nav-item.active {
    color: var(--text-main) !important;
    border-bottom-color: #fb923c !important; /* Premium orange accent */
  }

  /* Category pills scrollbar support */
  .category-filter-bar {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding: 12px 16px !important;
    gap: 8px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 !important;
  }
  .category-filter-bar::-webkit-scrollbar { display: none !important; }
  .category-pill {
    font-size: 0.84rem !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
  }

  /* Premium News Layout: Flush & Row-aligned naturally */
  .main-news-layout {
    flex-direction: column !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .news-sidebar, .news-sidebar-right {
    display: none !important;
  }
  .news-main {
    width: 100% !important;
    padding: 0 !important;
  }
  #news-feed-list {
    padding: 0 !important;
  }
  .feed-item {
    display: flex !important;
    flex-direction: row !important;
    padding: 16px !important;
    gap: 16px !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(120, 120, 120, 0.12) !important;
    border-radius: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
  }
  .feed-item:hover {
    background: rgba(120, 120, 120, 0.03) !important;
  }
  .feed-image {
    width: 110px !important;
    height: 80px !important; /* Beautiful 3:2 ratio */
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }
  .feed-content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  .feed-title {
    font-size: 1.02rem !important;
    font-weight: 800 !important; /* Bold headline like Gadgety */
    line-height: 1.35 !important;
    color: var(--text-main) !important;
    margin-bottom: 6px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .feed-snippet {
    display: none !important;
  }
  .feed-meta {
    font-size: 0.76rem !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .author-name {
    font-weight: 600 !important;
  }

  /* Full Bleed Carousel (Square edges flush with screen) */
  .featured-carousel-container {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    width: 100vw !important;
  }
  .carousel-track-wrapper {
    border-radius: 0 !important;
  }

  .carousel-slide {
    flex: 0 0 100% !important; /* Exactly 1 slide on screen at a time */
    height: 250px !important;
    border-radius: 0 !important;
  }
  .featured-card {
    border-radius: 0 !important;
    min-height: 250px !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .featured-card::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%) !important;
    z-index: 1 !important;
  }
  .featured-card-content {
    position: absolute !important;
    bottom: 24px;
    left: 20px;
    right: 20px;
    z-index: 2;
    padding: 0 !important;
    text-align: right !important;
  }
  body:not(.rtl-layout) .featured-card-content {
    text-align: left !important;
  }
  .featured-title {
    font-size: 1.38rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6) !important;
    margin-top: 4px !important;
  }
  .featured-card-category {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #fb923c !important;
    letter-spacing: 1px !important;
  }

  /* Premium Data Store Page (Graphs Stack) */
  #pdf-store-grid {
    padding: 0 16px !important;
    gap: 16px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .premium-post-card > div {
    flex-direction: column !important;
  }
  .premium-post-card > div > div:first-child {
    width: 100% !important;
    height: 180px !important;
  }

  /* Community Forum Page */
  #group-detail-view {
    margin: 16px 0 0 !important;
  }
  #group-detail-view > div[style*="flex"] {
    flex-direction: column !important;
    padding: 12px !important;
  }
  #group-sidebar {
    width: 100% !important;
    position: static !important;
  }

  /* Inputs: 16px to prevent iOS auto-zoom */
  input, textarea, select {
    font-size: 16px !important;
  }

  /* Premium Responsive Footer - shrunk by half */
  .soki-footer-inner {
    flex-direction: column !important;
    padding: 16px 12px !important;
    gap: 16px !important;
  }
  .soki-footer-brand-col {
    gap: 12px !important;
  }
  .soki-footer-brand-col .soki-logo {
    font-size: 1rem !important;
  }
  .soki-footer-socials {
    gap: 8px !important;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
  }
  .soki-social-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
  }
  .soki-footer-apps {
    gap: 8px !important;
  }
  .soki-app-badge {
    padding: 4px 10px !important;
    min-width: 105px !important;
    border-radius: 6px !important;
  }
  .soki-app-badge .app-icon, .soki-app-badge .app-img {
    font-size: 14px !important;
    width: 13px !important;
    height: 13px !important;
    margin-right: 6px !important;
  }
  .soki-app-badge .app-sub {
    font-size: 5px !important;
  }
  .soki-app-badge .app-main {
    font-size: 9.5px !important;
  }
  .soki-footer-copyright {
    font-size: 0.68rem !important;
    margin-top: 12px !important;
  }
  .soki-footer-links-container {
    flex-direction: column !important;
    gap: 16px !important;
  }
  .soki-footer-col h4 {
    font-size: 0.82rem !important;
    margin-bottom: 8px !important;
  }
  .soki-footer-col ul {
    gap: 6px !important;
  }
  .soki-footer-col ul li a {
    font-size: 0.76rem !important;
  }

  /* Disable floating popup ad on mobile */
  #floating-ad-card, .floating-ad-card, #recent-activity-floating-btn-container, .recent-activity-floating-card {
    display: none !important;
  }

  /* Floating Widgets & Draggable Support */
  #support-floating-btn-container {
    position: fixed !important;
    top: 10px !important;
    left: 12px !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 2000 !important;
    transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }
  #support-floating-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: #1c1c1e !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #support-floating-btn svg {
    width: 14px !important;
    height: 14px !important;
  }
  #chat-draggable-window {
    left: 12px !important;
    right: auto !important;
    width: 70vw !important;
    max-width: 300px !important;
    bottom: 80px !important;
    z-index: 9999 !important;
  }
}

/* =====================================================================
   GLOBAL CHAT WIDGET TRANSITIONS & OPTION B BEHAVIORS
   ===================================================================== */
#support-floating-btn-container {
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), bottom 0.3s ease, left 0.3s ease, right 0.3s ease, top 0.3s ease !important;
  transform-origin: center center !important;
}

/* Option B: Hide and scale down support button when the chat window is active */
#contact-modal.active ~ #support-floating-btn-container {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0) !important;
}

/* =====================================================================
   REDDIT-STYLE THREE-COLUMN LAYOUT AND PERFECT PROPORTIONS
   ===================================================================== */
@media (min-width: 1025px) {
  #page-home {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  /* Spacious 1280px articles carousel and wide news layout globally on desktop */
  #page-home .category-filter-bar,
  #page-home .featured-carousel-container,
  #page-home .main-news-layout {
    max-width: 1280px !important;
    margin: 20px auto !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
  }
  #page-home .news-feed {
    max-width: 100% !important;
  }
  
  /* Main news layout - flex columns matching Reddit's exact grid proportions */
  #page-home .main-news-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 24px !important;
    margin: 40px auto 0 auto !important;
    justify-content: center !important;
    align-items: flex-start !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
    direction: ltr !important; /* Ensure Left-Nav -> Center-Feed -> Right-Sidebar layout order */
  }

  /* Center Content Column (Feed) */
  #page-home .news-feed {
    flex: 1 !important;
    min-width: 0 !important;
    direction: rtl !important; /* Keep Hebrew text alignment and direction correct */
  }

  /* Right Column (Sidebar) */
  #page-home .news-sidebar-right {
    width: 312px !important;
    min-width: 312px !important;
    flex-shrink: 0 !important;
    display: block !important;
    direction: rtl !important; /* Keep Hebrew text alignment inside sidebar correct */
  }
}

/* Floating Recent Activity Card Styles */
.recent-activity-floating-card {
  position: fixed !important;
  bottom: 162px !important;
  right: 28px !important;
  width: 312px !important;
  z-index: 8900 !important;
  background: #1a1a1b !important;
  border-radius: 16px !important;
  padding: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.9) translateY(10px) !important;
  transition: opacity 0.3s ease, visibility 0.3s ease, bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.recent-activity-floating-card.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1) translateY(0) !important;
}

/* Position floating widgets on the bottom-left in Hebrew/RTL mode */
body.rtl-layout #support-floating-btn-container {
  right: auto !important;
  left: 28px !important;
}

body.rtl-layout #recent-activity-floating-btn-container {
  right: auto !important;
  left: 28px !important;
}

body.rtl-layout .recent-activity-floating-card {
  right: auto !important;
  left: 28px !important;
}

body.rtl-layout #chat-draggable-window {
  right: auto !important;
  left: 28px !important;
}

/* Hide floating activity card completely when the support assistant/messages modal is active */
#contact-modal.active ~ #page-home .recent-activity-floating-card,
#contact-modal.active ~ .recent-activity-floating-card {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Smooth shifting of floating elements near the bottom of the page */
#chat-draggable-window {
  transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease !important;
}

/* Align user profile badge to the far right of the nav actions in RTL mode */
body.rtl-layout #user-nav-section {
  order: -10 !important;
}

/* Sidebar inline buttons responsive and collapsed states */
.sidebar-inline-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 4px 16px 12px 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Force absolute symmetry and centering on collapsed sidebar items */
.sidebar.collapsed {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.sidebar.collapsed .sidebar-inner {
  padding: 20px 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center !important;
  padding: 0 !important;
  margin-bottom: 20px !important;
  width: 100% !important;
}

.sidebar.collapsed .sidebar-toggle {
  right: -18px !important; /* Keep floating toggle button positioned perfectly */
}

/* Collapse and center search bar beautifully */
.sidebar.collapsed .sidebar-search-bar {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 auto 12px auto !important;
  border-radius: 50% !important;
  cursor: pointer !important;
}

.sidebar.collapsed .sidebar-search-bar input,
.sidebar.collapsed .sidebar-search-bar kbd {
  display: none !important;
}

.sidebar.collapsed .sidebar-search-bar i {
  margin: 0 !important;
  font-size: 1rem !important;
}

/* Perfect centering for sidebar links, overriding RTL specific margins */
.sidebar.collapsed .sidebar-link {
  width: 52px !important;
  height: 52px !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 4px auto !important;
  border-radius: 12px !important;
  flex-direction: row !important;
}

.sidebar.collapsed .sidebar-link i {
  margin: 0 !important;
  font-size: 1.4rem !important;
}

.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-link-actions,
.sidebar.collapsed .sidebar-submenu {
  display: none !important;
}

/* Divider adjustment */
.sidebar.collapsed .sidebar-divider,
.sidebar.collapsed #purchases-divider {
  width: 40px !important;
  margin: 12px auto !important;
}

/* Center inline buttons at the bottom */
.sidebar.collapsed .sidebar-inline-buttons {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 0 !important;
  width: 100% !important;
  gap: 8px !important;
}

.sidebar.collapsed .sidebar-inline-buttons .sidebar-inline-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  margin: 0 auto !important;
}

/* Hide original floating buttons since they are now integrated inline inside the sidebar */
#support-floating-btn-container,
#recent-activity-floating-btn-container {
  display: none !important;
}

/* ========== LAYOUT DESIGNER STYLES ========== */
.layout-designer-active .layout-designer-block {
  position: relative !important;
  border: 2px dashed rgba(16, 185, 129, 0.4) !important;
  background: rgba(16, 185, 129, 0.02) !important;
  border-radius: 16px !important;
  margin: 16px 0 !important;
  padding: 16px !important;
  cursor: grab !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.layout-designer-active .layout-designer-block.dragging {
  opacity: 0.4 !important;
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  transform: scale(0.98);
}

.layout-drag-handle {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #10b981 !important;
  color: #fff !important;
  padding: 6px 16px !important;
  border-radius: 8px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  width: max-content !important;
  margin-bottom: 12px !important;
  pointer-events: none !important;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3) !important;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* iOS Loading Spinner styles */
.ios-spinner {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-block;
}
.ios-spinner div {
  width: 8%;
  height: 24%;
  background: #8e8e93;
  position: absolute;
  left: 46%;
  top: 38%;
  opacity: 0;
  border-radius: 50px;
  box-shadow: 0 0 3px rgba(0,0,0,0.1);
  animation: iosSpinnerFade 1s linear infinite;
}
.ios-spinner .bar1 { transform:rotate(0deg) translate(0, -142%); animation-delay: 0s; }
.ios-spinner .bar2 { transform:rotate(30deg) translate(0, -142%); animation-delay: -0.9167s; }
.ios-spinner .bar3 { transform:rotate(60deg) translate(0, -142%); animation-delay: -0.833s; }
.ios-spinner .bar4 { transform:rotate(90deg) translate(0, -142%); animation-delay: -0.75s; }
.ios-spinner .bar5 { transform:rotate(120deg) translate(0, -142%); animation-delay: -0.667s; }
.ios-spinner .bar6 { transform:rotate(150deg) translate(0, -142%); animation-delay: -0.583s; }
.ios-spinner .bar7 { transform:rotate(180deg) translate(0, -142%); animation-delay: -0.5s; }
.ios-spinner .bar8 { transform:rotate(210deg) translate(0, -142%); animation-delay: -0.4167s; }
.ios-spinner .bar9 { transform:rotate(240deg) translate(0, -142%); animation-delay: -0.333s; }
.ios-spinner .bar10 { transform:rotate(270deg) translate(0, -142%); animation-delay: -0.25s; }
.ios-spinner .bar11 { transform:rotate(300deg) translate(0, -142%); animation-delay: -0.1667s; }
.ios-spinner .bar12 { transform:rotate(330deg) translate(0, -142%); animation-delay: -0.083s; }

@keyframes iosSpinnerFade {
  from { opacity: 1; }
  to { opacity: 0.25; }
}

/* ============================================ */
/* TUTORIAL / HOW-TO SECTION (hismile style)    */
/* ============================================ */
.tutorial-hero {
  display: flex;
  align-items: stretch;
  min-height: 480px;
  max-height: 520px;
  margin: 80px 0;
  border-radius: 20px;
  overflow: hidden;
  direction: rtl;
}

.tutorial-text {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 60px 52px;
  background: #f5f5f7;
}

body.dark-theme .tutorial-text {
  background: #1c1c1e;
}

.tutorial-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0071e3;
  letter-spacing: 0.04em;
}

.tutorial-title {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #1d1d1f;
  margin: 0;
}

body.dark-theme .tutorial-title {
  color: #f5f5f7;
}

.tutorial-desc {
  font-size: 0.97rem;
  color: #515154;
  line-height: 1.65;
  margin: 0;
  max-width: 340px;
}

body.dark-theme .tutorial-desc {
  color: #a1a1a6;
}

.tutorial-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1d1d1f;
  color: #fff;
  border: none;
  border-radius: 980px;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s, transform 0.2s;
}
.tutorial-btn:hover {
  background: #0071e3;
  transform: scale(1.03);
}

.tutorial-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  font-size: 0.75rem;
}

.tutorial-visual {
  flex: 1;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.tutorial-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.tutorial-visual:hover .tutorial-bg-img {
  transform: scale(1.04);
}

.tutorial-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0,0,0,0.25);
  transition: background 0.2s;
}
.tutorial-visual:hover .tutorial-play-overlay {
  background: rgba(0,0,0,0.35);
}

.tutorial-play-btn {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tutorial-play-btn svg { fill: #1d1d1f; margin-left: 4px; }
.tutorial-visual:hover .tutorial-play-btn {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.tutorial-play-label {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

@media (max-width: 800px) {
  .tutorial-hero {
    flex-direction: column;
    margin: 60px 0 60px;
    border-radius: 16px;
  }
  .tutorial-text {
    flex: none;
    padding: 40px 28px;
  }
  .tutorial-visual {
    min-height: 260px;
  }
  .tutorial-title {
    font-size: 1.8rem;
  }
}

/* ============================================ */
/* ADD PRODUCT FORM — SHOPIFY STYLE             */
/* ============================================ */

/* Empty banner */
/* ── DARK THEME VARIABLES (admin panel) ── */
:root {
  --ap-bg:       #1c1c1e;
  --ap-bg2:      #141416;
  --ap-border:   #2c2c2e;
  --ap-text:     #fafafa;
  --ap-muted:    #a1a1aa;
  --ap-subtle:   #3a3a3c;
  --ap-input-bg: #0b0b0c;
}

/* ── Empty state banner ── */
.ap-empty-banner {
  display: flex; align-items: stretch;
  background: var(--ap-bg); border: 1px solid var(--ap-border);
  border-radius: 14px; overflow: hidden; min-height: 200px; direction: ltr;
}
.ap-empty-text { flex:1; padding:40px 48px; display:flex; flex-direction:column; justify-content:center; }
.ap-empty-text h3 { font-size:1.2rem; font-weight:700; color:var(--ap-text); margin:0 0 8px; }
.ap-empty-text p  { font-size:0.9rem; color:var(--ap-muted); margin:0; }
.ap-empty-visual {
  flex:0 0 280px; background:linear-gradient(135deg,#2c2c2e,#1c1c1e);
  display:flex; align-items:center; justify-content:flex-end; padding:20px; overflow:hidden;
}
.ap-empty-box {
  width:100px; height:100px; border:2px dashed var(--ap-subtle); border-radius:14px;
  display:flex; align-items:center; justify-content:center; font-size:2rem;
  color:var(--ap-muted); background:rgba(255,255,255,0.04);
}

/* ── Buttons ── */
.ap-btn-dark {
  background: #fafafa; color: #111; border: none;
  padding: 9px 20px; border-radius: 8px; font-size: 0.875rem;
  font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.15s;
}
.ap-btn-dark:hover { opacity: 0.85; }
.ap-btn-outline-dark {
  background: transparent; color: var(--ap-text); border: 1px solid var(--ap-subtle);
  padding: 9px 20px; border-radius: 8px; font-size: 0.875rem;
  font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.ap-btn-outline-dark:hover { background: var(--ap-subtle); }

/* ── Form grid ── */
.ap-form-grid { display:grid; grid-template-columns:1fr 300px; gap:20px; align-items:flex-start; }
.ap-col-main, .ap-col-side { display:flex; flex-direction:column; gap:0; }

/* ── Card ── */
.ap-card {
  background: var(--ap-bg); border: 1px solid var(--ap-border);
  border-radius: 12px; padding: 20px 24px; margin-bottom: 16px;
}
.ap-card-title { font-size:0.95rem; font-weight:700; color:var(--ap-text); margin:0 0 16px; }

/* ── Fields ── */
.ap-field { margin-bottom:16px; }
.ap-field:last-child { margin-bottom:0; }
.ap-label { display:block; font-size:0.8rem; font-weight:600; color:var(--ap-muted); margin-bottom:6px; }

/* ── Inputs ── */
.ap-input {
  width:100%; border:1px solid var(--ap-border); border-radius:8px;
  padding:9px 12px; font-size:0.875rem; color:var(--ap-text);
  background:var(--ap-input-bg); outline:none; font-family:inherit;
  box-sizing:border-box; transition:border-color 0.15s;
}
.ap-input:focus { border-color:#6b7280; box-shadow:0 0 0 3px rgba(255,255,255,0.05); }
.ap-textarea {
  width:100%; border:1px solid var(--ap-border); border-radius:0 0 8px 8px;
  padding:10px 12px; font-size:0.875rem; color:var(--ap-text);
  background:var(--ap-input-bg); outline:none; font-family:inherit; resize:vertical; box-sizing:border-box;
}
.ap-select-wrap { position:relative; }
.ap-select { appearance:auto; }

/* ── Currency input ── */
.ap-currency-input {
  display:flex; align-items:center; border:1px solid var(--ap-border);
  border-radius:8px; overflow:hidden; background:var(--ap-input-bg);
}
.ap-currency-input span {
  padding:9px 12px; background:var(--ap-subtle); color:var(--ap-muted);
  font-size:0.875rem; font-weight:600; border-left:1px solid var(--ap-border);
}

/* ── Rich-text toolbar ── */
.ap-richtext-bar {
  display:flex; align-items:center; gap:2px;
  background:var(--ap-subtle); border:1px solid var(--ap-border);
  border-bottom:none; border-radius:8px 8px 0 0; padding:6px 8px;
}
.ap-rt-btn { background:none; border:none; cursor:pointer; padding:4px 7px; border-radius:4px; color:var(--ap-text); font-size:0.85rem; font-family:inherit; }
.ap-rt-btn:hover { background:rgba(255,255,255,0.1); }
.ap-rt-select { border:none; background:transparent; font-size:0.8rem; color:var(--ap-text); cursor:pointer; padding:2px 4px; border-radius:4px; }

/* ── Media drop ── */
.ap-media-drop {
  border:1.5px dashed var(--ap-subtle); border-radius:10px;
  padding:28px; text-align:center; background:var(--ap-input-bg);
}

/* ── Chips ── */
.ap-chip {
  display:inline-flex; align-items:center; gap:4px;
  background:var(--ap-subtle); border:1px solid var(--ap-border);
  border-radius:20px; padding:4px 12px; font-size:0.78rem; color:var(--ap-text); font-weight:500;
}
.ap-chip-badge { background:var(--ap-border); border-radius:10px; padding:1px 6px; font-size:0.7rem; font-weight:700; color:var(--ap-text); }

/* ── Toggle ── */
.ap-toggle-wrap { display:flex; align-items:center; gap:6px; cursor:pointer; }
.ap-toggle { position:relative; display:inline-block; width:36px; height:20px; flex-shrink:0; }
.ap-toggle input { opacity:0; width:0; height:0; }
.ap-toggle-slider { position:absolute; inset:0; background:var(--ap-subtle); border-radius:20px; transition:background 0.2s; }
.ap-toggle-slider::before {
  content:''; position:absolute; width:14px; height:14px; left:3px; top:3px;
  background:#fff; border-radius:50%; transition:transform 0.2s; box-shadow:0 1px 3px rgba(0,0,0,0.4);
}
.ap-toggle input:checked + .ap-toggle-slider { background:#fafafa; }
.ap-toggle input:checked + .ap-toggle-slider::before { transform:translateX(16px); background:#111; }
.ap-toggle-on .ap-toggle-slider { background:#fafafa; }
.ap-toggle-on .ap-toggle-slider::before { transform:translateX(16px); background:#111; }

/* ── Add option button ── */
.ap-add-option { background:none; border:none; color:var(--ap-muted); font-size:0.875rem; cursor:pointer; display:inline-flex; align-items:center; gap:7px; padding:4px 0; font-family:inherit; }
.ap-add-option:hover { color:var(--ap-text); }
.ap-add-icon { font-size:1.1rem; color:var(--ap-subtle); }

@media (max-width: 900px) {
  .ap-form-grid { grid-template-columns: 1fr; }
  .ap-col-side { order: -1; }
}

/* ============================================ */
/* SHOPIFY ANALYTICS DASHBOARD — DARK           */
/* ============================================ */
.an-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:16px; flex-wrap:wrap; gap:12px;
}
.an-title   { font-size:1.3rem; font-weight:800; color:var(--ap-text); }
.an-refresh { font-size:0.78rem; color:var(--ap-muted); }
.an-btn-ghost  { background:none; border:1px solid var(--ap-border); border-radius:8px; padding:7px 12px; cursor:pointer; font-size:0.875rem; color:var(--ap-text); font-family:inherit; }
.an-btn-outline{ background:transparent; border:1px solid var(--ap-subtle); border-radius:8px; padding:7px 16px; cursor:pointer; font-size:0.875rem; font-weight:600; color:var(--ap-text); font-family:inherit; }
.an-btn-dark   { background:var(--ap-text); color:#111; border:none; border-radius:8px; padding:7px 16px; cursor:pointer; font-size:0.875rem; font-weight:700; font-family:inherit; }

.an-filters { display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.an-filter-chip {
  background:var(--ap-bg); border:1px solid var(--ap-border); border-radius:20px;
  padding:6px 14px; font-size:0.8rem; font-weight:600; cursor:pointer;
  color:var(--ap-text); display:inline-flex; align-items:center; gap:5px; font-family:inherit;
}
.an-filter-chip:hover { background:var(--ap-subtle); }

.an-kpi-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.an-kpi       { background:var(--ap-bg); border:1px solid var(--ap-border); border-radius:10px; padding:16px 20px; }
.an-kpi-label { font-size:0.78rem; color:var(--ap-muted); margin-bottom:6px; }
.an-kpi-val   { font-size:1rem; font-weight:700; color:var(--ap-text); }
.an-kpi-bar   { height:2px; background:#3b82f6; width:36px; margin-top:10px; border-radius:1px; }
.an-dash      { color:var(--ap-muted); font-weight:400; font-size:0.9em; }

.an-main-row      { display:grid; grid-template-columns:1.8fr 1fr; gap:14px; margin-bottom:14px; }
.an-secondary-row { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:14px; }
.an-bottom-row    { display:flex; gap:14px; margin-bottom:14px; }

.an-chart-card  { background:var(--ap-bg); border:1px solid var(--ap-border); border-radius:12px; padding:20px 24px; }
.an-chart-label { font-size:0.875rem; font-weight:600; color:var(--ap-text); margin-bottom:8px; border-bottom:1.5px dotted var(--ap-border); padding-bottom:8px; }
.an-chart-big   { font-size:1.4rem; font-weight:800; color:var(--ap-text); margin-bottom:12px; }
.an-chart-area  { position:relative; min-height:120px; }
.an-chart-empty-line {
  position:absolute; bottom:20px; left:0; right:0; height:2px;
  background:linear-gradient(to right, #3b82f6 45%, transparent 45%),
             repeating-linear-gradient(to right, #60a5fa 0, #60a5fa 6px, transparent 6px, transparent 10px);
  background-size:100% 100%,100% 100%;
}
.an-chart-x-labels { display:flex; justify-content:space-between; font-size:0.68rem; color:var(--ap-muted); margin-top:4px; }
.an-legend         { display:flex; gap:16px; font-size:0.75rem; color:var(--ap-muted); margin-top:8px; }
.an-dot            { display:inline-block; width:10px; height:10px; border-radius:50%; margin-left:4px; }
.an-no-data        { display:flex; align-items:center; justify-content:center; min-height:80px; font-size:0.85rem; color:var(--ap-muted); }

.an-breakdown { display:flex; flex-direction:column; gap:0; }
.an-brow {
  display:flex; justify-content:space-between; align-items:center;
  padding:9px 0; border-bottom:1px solid var(--ap-border);
  font-size:0.85rem; color:var(--ap-text); gap:8px;
}
.an-brow-total { font-weight:700; color:var(--ap-text); border-bottom:none; padding-top:10px; }
.an-blink      { color:#60a5fa; cursor:pointer; text-decoration:none; }
.an-blink:hover{ text-decoration:underline; }

.an-conv-grid  { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-top:10px; font-size:0.75rem; }
.an-conv-label { color:var(--ap-muted); font-size:0.7rem; margin-bottom:2px; }
.an-conv-val   { font-weight:700; color:var(--ap-text); }
.an-conv-sub   { color:var(--ap-muted); font-size:0.68rem; }

@media (max-width: 1000px) {
  .an-kpi-strip    { grid-template-columns: repeat(2,1fr); }
  .an-main-row     { grid-template-columns: 1fr; }
  .an-secondary-row{ grid-template-columns: 1fr 1fr; }
  .an-bottom-row   { flex-direction: column; }
}
@media (max-width: 640px) {
  .an-secondary-row { grid-template-columns: 1fr; }
}

/* ============================================ */
/* PAYMENTS SECTION — DARK THEME                */
/* ============================================ */
.pay-card {
  background: var(--ap-bg);
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 16px;
}
.pay-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fafafa;
  margin-bottom: 6px;
}
.pay-card-desc {
  font-size: 0.875rem;
  color: #a1a1aa;
  margin: 0 0 16px;
  line-height: 1.55;
}
.pay-link {
  color: #60a5fa;
  text-decoration: underline;
}

/* Provider box */
.pay-provider-box {
  border: 1px solid var(--ap-border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.pay-provider-highlight {
  border-color: rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.04);
}

.pay-badge-incomplete {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--ap-subtle);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #a1a1aa;
  font-weight: 600;
}
.pay-badge-soon {
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: #a78bfa;
  font-weight: 600;
}

.pay-info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: #93c5fd;
  line-height: 1.5;
}

.pay-add-method-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fafafa;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition: background 0.15s;
}
.pay-add-method-btn:hover { background: var(--ap-subtle); }

.pay-btn-outline {
  background: transparent;
  border: 1px solid var(--ap-subtle);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fafafa;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.pay-btn-outline:hover { background: var(--ap-subtle); }
.pay-btn-sm { padding: 6px 14px; font-size: 0.82rem; }

/* Radio rows */
.pay-radio-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.pay-radio-row input[type="radio"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #fafafa;
  flex-shrink: 0;
}
.pay-radio-title { font-size: 0.9rem; font-weight: 600; color: #fafafa; }
.pay-radio-desc  { font-size: 0.8rem; color: #a1a1aa; margin-top: 2px; }

/* ============================================ */
/* SHOP — CATEGORY SLIDER                       */
/* ============================================ */
.shop-cat-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.shop-cat-slider::-webkit-scrollbar { display: none; }

.shop-cat-chip {
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 980px;
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.shop-cat-chip:hover {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.85);
}
.shop-cat-chip.active {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.06);
}

/* Light theme overrides */
body:not(.dark-theme) .shop-cat-chip {
  border-color: rgba(0,0,0,0.15);
  color: rgba(0,0,0,0.5);
}
body:not(.dark-theme) .shop-cat-chip:hover { color: #1d1d1f; border-color: rgba(0,0,0,0.4); }
body:not(.dark-theme) .shop-cat-chip.active { border-color: #1d1d1f; color: #1d1d1f; background: rgba(0,0,0,0.04); }

/* ============================================ */
/* SHOP — DOWNLOAD CARDS                        */
/* ============================================ */
.dl-card .shop-card-image {
  overflow: hidden;
  border-radius: 4px;
}

/* Floating type badge */
.dl-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 980px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.03em;
  z-index: 2;
}

/* Hover overlay with unlock button */
.dl-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.dl-card:hover .dl-overlay { opacity: 1; }

.dl-unlock-btn {
  background: #fff;
  color: #111;
  border: none;
  border-radius: 980px;
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s;
}
.dl-unlock-btn:hover { transform: scale(1.05); }

/* File meta chips */
.dl-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.dl-meta-chip {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
body:not(.dark-theme) .dl-meta-chip {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}

/* ============================================ */
/* MARKETPLACE MODAL                            */
/* ============================================ */
.mp-container {
  background: #111113;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 1000px;
  padding: 36px 40px 40px;
  position: relative;
  color: #f5f5f7;
  font-family: 'Inter', sans-serif;
  direction: rtl;
}

.mp-close {
  position: absolute; top: 18px; left: 18px;
  background: rgba(255,255,255,0.07); border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 1rem; color: #a1a1a6;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mp-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.mp-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 24px;
}
.mp-icon { font-size: 2.2rem; }
.mp-title { font-size: 1.6rem; font-weight: 900; margin: 0; }
.mp-subtitle { font-size: 0.85rem; color: #6e6e73; margin: 4px 0 0; }

/* Tabs */
.mp-tabs {
  display: flex; gap: 6px; margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07); padding-bottom: 12px;
}
.mp-tab {
  background: none; border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 7px 18px; font-size: 0.82rem;
  font-weight: 600; color: rgba(255,255,255,0.5); cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.mp-tab:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }
.mp-tab.active { border-color: #f97316; color: #f97316; background: rgba(249,115,22,0.08); }

/* Form */
.mp-form-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
.mp-col-main, .mp-col-side { display: flex; flex-direction: column; gap: 0; }
.mp-card { background: #1c1c1e; border: 1px solid #2c2c2e; border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.mp-field { margin-bottom: 14px; }
.mp-field:last-child { margin-bottom: 0; }
.mp-label { display: block; font-size: 0.78rem; font-weight: 700; color: #a1a1aa; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.mp-input {
  width: 100%; background: #0b0b0c; border: 1px solid #2c2c2e;
  border-radius: 8px; padding: 10px 12px; font-size: 0.875rem;
  color: #f5f5f7; outline: none; font-family: inherit; box-sizing: border-box;
  transition: border-color 0.15s;
}
.mp-input:focus { border-color: #f97316; }
.mp-textarea {
  width: 100%; background: #0b0b0c; border: 1px solid #2c2c2e;
  border-radius: 8px; padding: 10px 12px; font-size: 0.875rem;
  color: #f5f5f7; outline: none; font-family: inherit; resize: vertical; box-sizing: border-box;
}
.mp-select { appearance: auto; }
.mp-hint { font-size: 0.72rem; color: #6e6e73; margin: 5px 0 0; }
.mp-price-input { display: flex; align-items: center; border: 1px solid #2c2c2e; border-radius: 8px; overflow: hidden; background: #0b0b0c; }
.mp-price-input span { padding: 10px 12px; background: #2c2c2e; color: #a1a1aa; font-weight: 700; font-size: 0.875rem; }
.mp-price-input input { border: none; background: transparent; color: #f5f5f7; padding: 10px 12px; font-size: 0.875rem; font-family: inherit; outline: none; flex: 1; }

/* Condition chips */
.mp-condition-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-cond-chip {
  display: flex; align-items: center; gap: 6px;
  background: #0b0b0c; border: 1px solid #2c2c2e;
  border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 0.8rem; color: #a1a1aa;
  transition: all 0.15s;
}
.mp-cond-chip:has(input:checked) { border-color: #f97316; color: #f97316; background: rgba(249,115,22,0.08); }
.mp-cond-chip input { display: none; }

/* Live preview */
.mp-preview { border: 1px solid #2c2c2e; border-radius: 10px; overflow: hidden; }
.mp-prev-img-wrap { position: relative; aspect-ratio: 4/3; }
.mp-prev-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mp-prev-badge { position: absolute; top: 8px; right: 8px; background: #10b981; color: #fff; font-size: 0.68rem; font-weight: 800; padding: 3px 8px; border-radius: 20px; }
.mp-prev-body { padding: 10px 12px; background: #1c1c1e; }
.mp-prev-price { font-size: 1.2rem; font-weight: 900; color: #f97316; }
.mp-prev-title { font-size: 0.85rem; font-weight: 600; color: #f5f5f7; margin: 2px 0; }
.mp-prev-seller { font-size: 0.72rem; color: #6e6e73; }

/* Publish button */
.mp-btn-publish {
  width: 100%; background: #f97316; color: #fff; border: none;
  border-radius: 12px; padding: 15px; font-size: 1rem; font-weight: 800;
  cursor: pointer; font-family: inherit; display: flex; align-items: center;
  justify-content: center; gap: 8px; transition: opacity 0.2s;
}
.mp-btn-publish:hover { opacity: 0.88; }

/* Products grid */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.mp-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: #6e6e73; font-size: 0.9rem; }

.mp-product-card {
  background: #1c1c1e; border: 1px solid #2c2c2e; border-radius: 12px; overflow: hidden;
  transition: transform 0.2s;
}
.mp-product-card:hover { transform: translateY(-3px); }
.mp-prod-img-wrap { position: relative; aspect-ratio: 1; }
.mp-prod-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mp-cond-badge { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 20px; }
.mp-prod-body { padding: 12px; }
.mp-prod-price { font-size: 1.15rem; font-weight: 900; color: #f97316; margin-bottom: 4px; }
.mp-prod-title { font-size: 0.85rem; font-weight: 700; color: #f5f5f7; margin-bottom: 4px; }
.mp-prod-desc { font-size: 0.75rem; color: #a1a1aa; margin-bottom: 8px; line-height: 1.4; }
.mp-prod-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; color: #6e6e73; }
.mp-whatsapp-btn { background: rgba(37,211,102,0.15); border: 1px solid rgba(37,211,102,0.3); color: #25d366; border-radius: 6px; padding: 3px 8px; font-size: 0.7rem; font-weight: 600; text-decoration: none; }
.mp-delete-btn { margin-top: 8px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #ef4444; border-radius: 6px; padding: 4px 10px; font-size: 0.72rem; cursor: pointer; font-family: inherit; width: 100%; }

/* Search bar */
.mp-search-bar { display: flex; gap: 10px; margin-bottom: 4px; }

@media (max-width: 700px) {
  .mp-container { padding: 24px 20px; }
  .mp-form-grid { grid-template-columns: 1fr; }
  .mp-col-side { order: -1; }
  .mp-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Edit mode toggle — inline nav button */
.admin-edit-toggle-btn-inline {
  cursor: pointer;
  background: transparent;
  border: 1.5px solid #e28743;
  color: #e28743;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.admin-edit-toggle-btn-inline:hover {
  background: #e28743;
  color: #09090b;
}
.admin-edit-toggle-btn-inline.active {
  background: #e28743;
  color: #09090b;
  border-color: #e28743;
}

body.admin-edit-mode-active img {
  cursor: pointer !important;
  outline: 2px dashed #e28743 !important;
  outline-offset: -3px;
  transition: all 0.2s ease;
}
body.admin-edit-mode-active img:hover {
  outline: 2px solid #e28743 !important;
  filter: brightness(0.85);
}

/* Premium Image Editor Modal */
.edit-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.edit-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.edit-modal-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  padding: 32px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.8);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f4f4f5;
  direction: rtl;
}
.edit-modal-backdrop.active .edit-modal-card {
  transform: translateY(0) scale(1);
}
.edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.edit-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.edit-modal-close {
  background: none;
  border: none;
  color: #a1a1aa;
  font-size: 1.5rem;
  cursor: pointer;
}
.edit-modal-close:hover {
  color: #fff;
}
.edit-modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.edit-modal-preview-box {
  width: 100%;
  height: 150px;
  background: #09090b;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}
.edit-modal-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.edit-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edit-control-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #a1a1aa;
}
.edit-control-input {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.edit-control-input:focus {
  border-color: #e28743;
}
.edit-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.edit-slider-wrap input[type="range"] {
  flex: 1;
  accent-color: #e28743;
}
.edit-modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
.edit-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}
.edit-modal-btn-primary {
  background: #e28743;
  color: #09090b;
}
.edit-modal-btn-primary:hover {
  background: #f19f5e;
}
.edit-modal-btn-secondary {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
}
.edit-modal-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}
.edit-modal-btn-danger {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.25);
}
.edit-modal-btn-danger:hover {
  background: rgba(239,68,68,0.25);
}

body.admin-edit-mode-active [contenteditable="true"] {
  cursor: text !important;
  border-radius: 4px;
  transition: outline 0.15s, background 0.15s;
  outline: 1.5px dashed rgba(226, 135, 67, 0.4) !important;
  outline-offset: 3px;
}
body.admin-edit-mode-active [contenteditable="true"]:hover {
  outline: 1.5px dashed rgba(226, 135, 67, 0.8) !important;
  background: rgba(226, 135, 67, 0.04) !important;
}
body.admin-edit-mode-active [contenteditable="true"]:focus {
  outline: 2px solid #e28743 !important;
  outline-offset: 3px;
  background: rgba(226, 135, 67, 0.07) !important;
  border-radius: 4px;
}

/* Edit mode — image click indicators (inline background-image only) */
body.admin-edit-mode-active img {
  cursor: pointer !important;
  outline: 2px dashed rgba(226, 135, 67, 0.6) !important;
  outline-offset: -3px;
  transition: outline 0.2s, filter 0.2s;
}
body.admin-edit-mode-active img:hover {
  outline: 2px solid #e28743 !important;
  filter: brightness(0.85);
}






/* ============================================================
   DRAGGABLE SECTIONS SYSTEM — Edit Mode
   ============================================================ */

#home-sections-container {
  display: flex;
  flex-direction: column;
}

.home-section {
  position: relative;
  transition: opacity 0.2s, transform 0.2s;
}

body.admin-edit-mode-active .home-section {
  border: 2px dashed transparent;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
body.admin-edit-mode-active .home-section:hover {
  border-color: rgba(226, 135, 67, 0.5);
  background: rgba(226, 135, 67, 0.02);
}
body.admin-edit-mode-active .home-section.drag-over {
  border-color: #e28743 !important;
  border-style: solid !important;
  box-shadow: 0 0 0 3px rgba(226, 135, 67, 0.2);
  background: rgba(226, 135, 67, 0.04) !important;
}

/* Drag handle bar — always in DOM, shown on hover in edit mode */
.section-drag-handle {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 40px;
  background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
  border: 1px solid rgba(226, 135, 67, 0.35);
  border-radius: 10px 10px 0 0;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  cursor: grab;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.section-drag-handle:hover { border-color: rgba(226, 135, 67, 0.7); }
.section-drag-handle:active { cursor: grabbing; }

body.admin-edit-mode-active .home-section:hover .section-drag-handle {
  display: flex;
}
body.admin-edit-mode-active .home-section:hover > div:not(.section-drag-handle),
body.admin-edit-mode-active .home-section:hover > section:not(.section-drag-handle) {
  margin-top: 40px;
}

.section-grip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  pointer-events: none;
}
.section-grip span {
  display: block;
  width: 16px;
  height: 2px;
  background: #e28743;
  border-radius: 2px;
}

.section-drag-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #e28743;
  font-family: inherit;
  direction: rtl;
  flex: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.section-drag-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.section-move-btn, .section-hide-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #888;
  cursor: pointer;
  font-size: 0.68rem;
  padding: 2px 7px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.section-move-btn:hover {
  background: rgba(226,135,67,0.15);
  border-color: rgba(226,135,67,0.5);
  color: #e28743;
}
.section-hide-btn:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
}

/* Dragging state */
.home-section.is-dragging {
  opacity: 0.3;
  transform: scale(0.98);
  pointer-events: none;
}

/* Drop indicator line */
.section-drop-indicator {
  height: 0;
  overflow: hidden;
  transition: height 0.15s;
  position: relative;
}
.section-drop-indicator.visible {
  height: 6px;
}
.section-drop-indicator.visible::after {
  content: '';
  position: absolute;
  inset: 1px 0;
  background: linear-gradient(90deg, transparent, #e28743 20%, #e28743 80%, transparent);
  border-radius: 4px;
}

/* Hidden section */
.home-section.section-hidden > div:not(.section-drag-handle),
.home-section.section-hidden > section {
  opacity: 0.25;
  filter: grayscale(1);
  pointer-events: none;
}
body.admin-edit-mode-active .home-section.section-hidden {
  border-color: rgba(239, 68, 68, 0.25) !important;
}
.section-hide-btn.is-hidden {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.4);
  color: #22c55e;
}

/* Collapsed section styles */
.home-section.section-collapsed > div:not(.section-drag-handle),
.home-section.section-collapsed > section {
  display: none !important;
}
body.admin-edit-mode-active .home-section.section-collapsed {
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin-bottom: 12px !important;
  overflow: hidden !important;
  border-style: dashed !important;
  border-color: rgba(226, 135, 67, 0.4) !important;
}
body.admin-edit-mode-active .home-section.section-collapsed .section-drag-handle {
  display: flex !important;
  border-radius: 10px !important;
}
.section-collapse-btn {
  background: rgba(226, 135, 67, 0.1);
  border: 1px solid rgba(226, 135, 67, 0.3);
  color: #e28743;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.section-collapse-btn:hover {
  background: rgba(226, 135, 67, 0.25);
  border-color: rgba(226, 135, 67, 0.5);
}
.section-collapse-btn.is-collapsed {
  background: rgba(226, 135, 67, 0.35);
  color: #fff;
  border-color: rgba(226, 135, 67, 0.6);
}

/* ============================================================
   TEXT EDIT POPUP — New Edit Mode
   ============================================================ */

#text-edit-popup {
  position: fixed;
  z-index: 99999;
  width: 320px;
  background: #18181b;
  border: 1px solid rgba(226,135,67,0.5);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(226,135,67,0.1);
  overflow: hidden;
  animation: tepSlideIn 0.15s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@keyframes tepSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tep-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1e1e22, #27272a);
  border-bottom: 1px solid rgba(226,135,67,0.2);
}
.tep-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e28743;
  letter-spacing: 0.02em;
}
.tep-close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.tep-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.tep-textarea {
  display: block;
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  background: #18181b;
  border: none;
  outline: none;
  color: #e4e4e7;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.tep-textarea:focus { background: #1c1c20; }

.tep-actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #1a1a1e;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.tep-save {
  flex: 1;
  padding: 7px 0;
  background: #e28743;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}
.tep-save:hover { background: #d4762d; }
.tep-save:active { transform: scale(0.97); }

.tep-cancel {
  padding: 7px 14px;
  background: rgba(255,255,255,0.06);
  color: #888;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.tep-cancel:hover { background: rgba(255,255,255,0.1); color: #ccc; }

/* Highlight text elements on hover in edit mode */
body.admin-edit-mode-active h1:hover,
body.admin-edit-mode-active h2:hover,
body.admin-edit-mode-active h3:hover,
body.admin-edit-mode-active h4:hover,
body.admin-edit-mode-active h5:hover,
body.admin-edit-mode-active h6:hover,
body.admin-edit-mode-active p:hover,
body.admin-edit-mode-active li:hover {
  outline: 2px dashed rgba(226,135,67,0.5);
  outline-offset: 2px;
  border-radius: 4px;
  cursor: pointer;
}

/* Floating duplicate button styling in admin mode */
.article-duplicate-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 99;
  background: rgba(24, 24, 27, 0.9);
  border: 1px solid rgba(226, 135, 67, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.article-duplicate-btn:hover {
  background: #e28743;
  color: #fff;
  border-color: #e28743;
  transform: scale(1.05);
}
.article-duplicate-btn i {
  font-size: 0.85rem;
}

/* Floating delete button styling in admin mode */
.article-delete-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 99;
  background: rgba(239, 68, 68, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.article-delete-btn:hover {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
  transform: scale(1.05);
}
.article-delete-btn i {
  font-size: 0.85rem;
}

/* Premium toggle switch styling */
.switch input:checked + .slider {
  background-color: #e28743 !important;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.switch input:checked + .slider:before {
  transform: translateX(22px);
}
.slider.round {
  border-radius: 34px;
}

/* Fixed Bottom Admin Edit Bar */
#admin-live-edit-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  z-index: 999999 !important;
  background: rgba(18, 18, 20, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: none !important;
  padding: 10px 24px !important;
  display: none; /* controlled by JS */
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  height: 56px !important;
  box-sizing: border-box;
  direction: rtl;
  font-family: inherit;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5) !important;
}

body.admin-bar-active {
  padding-bottom: 56px !important;
}

/* ── PERFORMANCE DASHBOARD STYLES ── */
.perf-tab-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.perf-tab-btn:hover:not(.active) {
  background: #f4f5f6 !important;
  color: #1d1d1f !important;
}
.perf-kpi-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.perf-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06) !important;
}
@media (max-width: 900px) {
  .perf-charts-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── WORLD CUP BETS & INTERACTIVE POLLS ── */
.wc-bet-card {
  background: #171515 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wc-bet-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.4) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5) !important;
}
.wc-bet-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  font-family: inherit;
}
.wc-bet-btn:hover {
  background: rgba(250, 204, 21, 0.1) !important;
  border-color: rgba(250, 204, 21, 0.3) !important;
}

.poll-card {
  background: #171515 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}
.poll-card:hover {
  border-color: rgba(96, 165, 250, 0.4) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4) !important;
}
.poll-option-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px;
  padding: 12px 18px;
  color: #fafafa;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
  text-align: right;
  margin-bottom: 10px;
}
.poll-option-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
.poll-option-btn.voted-yes:hover {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
.poll-option-btn.voted-no:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
.poll-option-btn.voted-maybe:hover {
  background: rgba(156, 163, 175, 0.1) !important;
  border-color: rgba(156, 163, 175, 0.3) !important;
}

.poll-progress-container {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.poll-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a1a1aa;
}
.poll-progress-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.poll-progress-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}




/* ─── SOKI Logo Bounce (Wolt-style) ─── */
.soki-letter {
  display: inline-block;
  transform-origin: bottom center;
}

@keyframes soki-letter-jump {
  0%   { transform: translateY(0) scaleY(1) scaleX(1); }
  15%  { transform: translateY(1px) scaleY(0.88) scaleX(1.06); } /* anticipation squash */
  42%  { transform: translateY(-10px) scaleY(1.1) scaleX(0.94); } /* spring up */
  64%  { transform: translateY(0) scaleY(0.94) scaleX(1.04); }    /* land */
  80%  { transform: translateY(-4px) scaleY(1.03) scaleX(0.99); } /* rebound */
  92%  { transform: translateY(0) scaleY(0.98) scaleX(1.01); }    /* settle */
  100% { transform: translateY(0) scaleY(1) scaleX(1); }
}

.soki-logo-bounce.play .soki-letter {
  animation: soki-letter-jump 0.9s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}
.soki-logo-bounce.play .soki-letter:nth-child(1) { animation-delay: 0.05s; }
.soki-logo-bounce.play .soki-letter:nth-child(2) { animation-delay: 0.13s; }
.soki-logo-bounce.play .soki-letter:nth-child(3) { animation-delay: 0.21s; }
.soki-logo-bounce.play .soki-letter:nth-child(4) { animation-delay: 0.29s; }

/* crown fades in gently with a soft lift */
@keyframes soki-crown-jump {
  0%   { transform: translateY(4px); opacity: 0; }
  60%  { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
.soki-logo.play .fa-crown {
  animation: soki-crown-jump 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── My Profile Drawer ─── */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.profile-stat-card {
  background: #1c1c1e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.profile-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245,158,11,0.4);
}
.profile-stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: #f59e0b;
  line-height: 1.1;
}
.profile-stat-label {
  font-size: 0.78rem;
  color: #a1a1a6;
  margin-top: 4px;
}

/* ─── Draggable floating windows ─── */
.recent-activity-floating-card.user-dragged {
  transform: translate3d(var(--drag-x, 0px), var(--drag-y, 0px), 0) scale(1) !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}
.drag-grab-handle { cursor: move; user-select: none; }

/* ─── Resizable floating windows ─── */
.win-resize-handle {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  cursor: nesw-resize;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  user-select: none;
}
.win-resize-handle:hover { color: rgba(255,255,255,0.8); }

.recent-activity-floating-card.user-resized,
#chat-draggable-window.user-resized {
  width: var(--win-w, 312px) !important;
  max-width: none !important;
  height: var(--win-h, auto) !important;
  max-height: none !important;
}

/* ════════════════════════════════════════════════
   PRO EFFECTS LAYER — animations & polish
   ════════════════════════════════════════════════ */

/* 1. Ken Burns — featured carousel images slowly breathe */
@keyframes kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1.5%, 1%); }
  100% { transform: scale(1) translate(0, 0); }
}
.carousel-slide.featured-card { overflow: hidden; }
.carousel-slide.featured-card > img {
  animation: kenburns 18s ease-in-out infinite;
  will-change: transform;
}
.carousel-slide.featured-card:nth-child(2) > img { animation-delay: -6s; }
.carousel-slide.featured-card:nth-child(3) > img { animation-delay: -12s; }

/* pause the drift and zoom in on hover */
.carousel-slide.featured-card:hover > img {
  animation-play-state: paused;
  transform: scale(1.12);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 2. Featured overlay — richer cinematic gradient */
.featured-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0) 75%) !important;
}

/* 3. Scroll reveal — feed items fade up as they enter */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 4. Card hover lift — professional depth */
.feed-item, .shop-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.feed-item:hover, .shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.feed-item { overflow: hidden; }
.feed-item .feed-image {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.feed-item:hover .feed-image { transform: scale(1.06); }

/* 5. Living accent — animated gradient under the navbar */
@keyframes accent-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
header.navbar-apple::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f59e0b, #f97316, #f9b233, transparent);
  background-size: 250% 100%;
  animation: accent-flow 7s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.85;
}
/* navbar keeps its original position: fixed — the ::after accent line
   positions against it just fine without overriding position */

/* 6. Shimmer on premium badges */
@keyframes badge-shine {
  0%   { background-position: -150% 0; }
  100% { background-position: 250% 0; }
}
.featured-tag {
  position: relative;
  overflow: hidden;
}
.featured-tag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.35) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: badge-shine 4.5s ease-in-out infinite;
}

/* respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-slide.featured-card > img,
  header.navbar-apple::after,
  .featured-tag::after { animation: none !important; }
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}
/* ════════════ END PRO EFFECTS LAYER ════════════ */

/* ─── Glass navbar + living page background ─── */

/* Transparent glass top bar */
header.navbar-apple {
  background: rgba(8, 8, 12, 0.35) !important;
  backdrop-filter: blur(24px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* Dynamic drifting background image behind the whole site */
@keyframes bg-drift {
  0%   { transform: scale(1.05) translate(0%, 0%); }
  50%  { transform: scale(1.12) translate(-1.5%, -1%); }
  100% { transform: scale(1.08) translate(1%, -2%); }
}
body::before {
  content: '';
  position: fixed;
  inset: -4%;
  z-index: -2;
  background: url('https://images.unsplash.com/photo-1519501025264-65ba15a82390?auto=format&fit=crop&w=1920&q=60') center / cover no-repeat;
  animation: bg-drift 45s ease-in-out infinite alternate;
  will-change: transform;
}
/* dark veil so content stays readable */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5,5,8,0.82) 0%, rgba(5,5,8,0.9) 40%, rgba(5,5,8,0.96) 100%);
  pointer-events: none;
}
body, body.dark-theme {
  background: transparent !important;
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none !important; }
}

/* ─── Live video background ─── */
#bg-live-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.5s ease;
}
#bg-live-video.loaded { opacity: 1; }
/* the drifting image stays one layer behind as a fallback while the video loads */
body::before { z-index: -3; }

/* ─── Micro-interactions: save & buy ─── */
@keyframes fx-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45) rotate(-8deg); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.fx-pop { animation: fx-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* flying icon (article → bookmark, product → cart) */
.fx-fly {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  font-size: 22px;
  transition: transform 0.75s cubic-bezier(0.3, 0.7, 0.4, 1), opacity 0.75s ease;
  will-change: transform;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

/* particle burst */
.fx-burst {
  position: fixed;
  z-index: 999998;
  pointer-events: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  will-change: transform, opacity;
}

/* cart badge bounce */
@keyframes fx-badge-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.6); }
  70%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}
#cart-badge.fx-bounce { animation: fx-badge-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }

@media (prefers-reduced-motion: reduce) {
  .fx-fly, .fx-burst { display: none !important; }
  .fx-pop, #cart-badge.fx-bounce { animation: none !important; }
}

/* ─── 20% off welcome banner ─── */
#promo-20-banner {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 99990;
  background: linear-gradient(135deg, #1a1a1e 0%, #26222e 100%);
  border: 1px solid rgba(245,158,11,0.45);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 30px rgba(245,158,11,0.12);
  direction: rtl;
  max-width: 340px;
  transform: translateY(140%) scale(0.9);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.5s ease;
  pointer-events: none;
}
#promo-20-banner.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
#promo-20-banner .promo-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  animation: promo-wiggle 2.2s ease-in-out infinite;
}
@keyframes promo-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  8%  { transform: rotate(-7deg) scale(1.06); }
  16% { transform: rotate(6deg) scale(1.06); }
  24% { transform: rotate(0deg) scale(1); }
}
#promo-20-banner .promo-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #f5f5f7;
  margin-bottom: 2px;
}
#promo-20-banner .promo-sub {
  font-size: 0.8rem;
  color: #a1a1a6;
}
#promo-20-banner .promo-close {
  position: absolute;
  top: 6px;
  left: 10px;
  background: none;
  border: none;
  color: #86868b;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}
#promo-20-banner .promo-close:hover { color: #fff; }
/* timer line at the bottom showing time left */
#promo-20-banner .promo-timer {
  position: absolute;
  bottom: 0;
  right: 10%;
  left: 10%;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  transform-origin: right center;
}
#promo-20-banner.show .promo-timer { animation: promo-countdown 5s linear forwards; }
@keyframes promo-countdown {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@media (max-width: 600px) {
  #promo-20-banner { left: 14px; right: 14px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  #promo-20-banner { transition: opacity 0.3s ease; transform: none; }
  #promo-20-banner .promo-icon { animation: none; }
}

/* ─── Picturesque chat cards ─── */
.chat-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 18px;
  cursor: pointer;
  text-align: center;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--card-g1) 16%, #17171a), color-mix(in srgb, var(--card-g2) 10%, #131316));
  border: 1px solid color-mix(in srgb, var(--card-g1) 35%, transparent);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease, border-color 0.2s;
}
.chat-user-card::before {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 70%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--card-g1) 28%, transparent), transparent 70%);
  pointer-events: none;
}
.chat-user-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 24px color-mix(in srgb, var(--card-g1) 25%, transparent);
  border-color: color-mix(in srgb, var(--card-g1) 65%, transparent);
}
.chat-user-card.selected {
  border-color: var(--card-g1);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--card-g1) 40%, transparent);
}

/* gradient ring avatar */
.chat-avatar-ring {
  position: relative;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--card-g1), var(--card-g2));
}
.chat-avatar-ring img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #141416;
  display: block;
}
.chat-online-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 14px; height: 14px;
  background: #34c759;
  border: 2.5px solid #141416;
  border-radius: 50%;
}
.chat-online-dot::after {
  content: '';
  position: absolute;
  inset: -2.5px;
  border-radius: 50%;
  border: 2px solid rgba(52,199,89,0.6);
  animation: online-ping 1.8s ease-out infinite;
}
@keyframes online-ping {
  0%   { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.1); opacity: 0; }
}
.chat-unread-pill {
  position: absolute;
  top: -6px; left: -6px;
  background: linear-gradient(135deg, #ff3b30, #ff6b61);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  min-width: 22px; height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(255,59,48,0.5);
  animation: fx-badge-bounce 0.55s cubic-bezier(0.34,1.56,0.64,1);
}
.chat-user-name {
  font-weight: 800;
  color: #fff;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-user-sub { font-size: 0.8rem; color: #a1a1a6; margin-top: 6px; }

/* ─── Picturesque touches site-wide ─── */
/* gradient ink for main section headings */
.bottom-drawer-header h2, #saved-items-title, #drawer-messages-title, #profile-name {
  background: linear-gradient(90deg, #fff 30%, #f59e0b 70%, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* soft glow behind drawers */
.bottom-drawer.active {
  box-shadow: 0 -15px 60px rgba(0,0,0,0.65), 0 0 80px rgba(245,158,11,0.07) !important;
}

@media (prefers-reduced-motion: reduce) {
  .chat-online-dot::after { animation: none; }
}

/* ==========================================================================
   LIVE VIDEO INTEGRATION STYLES
   ========================================================================== */
.live-cameras-section {
  background: rgba(18, 18, 24, 0.45);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  margin: 32px 0;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.live-cameras-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.live-cameras-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-cameras-header .pulse-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-cameras-header .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.live-cameras-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  padding-bottom: 4px;
}

.live-cameras-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.live-camera-card {
  position: relative;
  flex: 0 0 280px;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0d11;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.25s, box-shadow 0.4s;
}

.live-camera-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.1);
}

.live-camera-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.live-camera-card:hover video {
  opacity: 1;
}

.live-camera-card .card-live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.live-camera-card .card-live-dot {
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  animation: live-pulse-dot 1.4s ease-in-out infinite;
}

@keyframes live-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.live-camera-card .card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

/* Fullscreen Lightbox */
#live-video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(4, 4, 6, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

#live-video-lightbox.open {
  display: flex;
  opacity: 1;
}

#live-video-lightbox .lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#live-video-lightbox.open .lightbox-content {
  transform: scale(1);
}

#live-video-lightbox video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#live-video-lightbox .close-lightbox-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 1000;
}

#live-video-lightbox .close-lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

#live-video-lightbox .lightbox-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  padding: 30px 24px 18px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: right;
  pointer-events: none;
}

/* ==========================================================================
   FLOATING PILL NAVIGATION BAR
   ========================================================================== */
.floating-pill-nav {
  position: fixed;
  bottom: 24px;
  /* Adjust horizontal center to account for the left/right sidebar */
  left: calc(50% + var(--sidebar-width) / 2);
  transform: translateX(-50%);
  z-index: 140000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  height: 52px;
  background: rgba(30, 30, 35, 0.75);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #22c55e; /* Green accent on the left curved edge matching image */
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  transition: height 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), 
              padding 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
              background 0.3s,
              left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
  direction: ltr;
}

/* Sidebar collapsed state positioning offsets */
body.sidebar-collapsed .floating-pill-nav {
  left: calc(50% + var(--sidebar-collapsed-width) / 2);
}

/* RTL (right side sidebar) layout offsets */
body.rtl-layout .floating-pill-nav {
  left: calc(50% - var(--sidebar-width) / 2);
}
body.rtl-layout.sidebar-collapsed .floating-pill-nav {
  left: calc(50% - var(--sidebar-collapsed-width) / 2);
}


/* Expanded state on hover */
.floating-pill-nav:hover {
  height: 76px;
  padding: 8px 20px;
  background: rgba(24, 24, 30, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  border-left-color: #22c55e;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 15px rgba(34, 197, 94, 0.15);
  transform: translateX(-50%) translateY(-4px);
}

.pill-nav-item {
  background: none;
  border: none;
  color: #a1a1a6;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  min-width: 64px;
  transition: all 0.25s ease;
  outline: none;
}

.pill-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.pill-nav-item:active {
  transform: scale(0.95);
}

.pill-nav-icon {
  font-size: 1.25rem;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.pill-nav-item:hover .pill-nav-icon {
  transform: translateY(-1px);
}

.pill-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  max-height: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), max-height 0.3s ease;
  pointer-events: none;
  margin-top: 0;
  white-space: nowrap;
}

/* Show labels on hover */
.floating-pill-nav:hover .pill-nav-label {
  opacity: 1;
  max-height: 16px;
  transform: translateY(0);
  margin-top: 4px;
}

/* AI specific premium button style */
.pill-nav-item.pill-nav-ai {
  color: #fff;
}

.pill-nav-icon-ai {
  width: 30px;
  height: 22px;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
  transition: transform 0.25s, box-shadow 0.25s;
}

.pill-nav-item.pill-nav-ai:hover .pill-nav-icon-ai {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.6);
}

/* Hide the old three buttons inside the left sidebar */
#sidebar-inline-buttons, #purchases-divider {
  display: none !important;
}

.floating-pill-panel {
  position: fixed;
  bottom: 84px;
  left: calc(50% + var(--sidebar-width) / 2);
  transform: translateX(-50%) translateY(10px);
  width: 360px;
  height: 480px;
  background: rgba(20, 20, 25, 0.9);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 139000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.floating-pill-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.floating-pill-panel .panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
}

.floating-pill-panel .panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-pill-panel .panel-close-btn {
  background: none;
  border: none;
  color: #86868b;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.floating-pill-panel .panel-close-btn:hover {
  color: #fff;
}

.floating-pill-panel .panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}





/* ─── Manager-reply live notification ─── */
#mgr-notif {
  position: fixed;
  top: 76px;
  left: 24px;
  z-index: 100000;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: linear-gradient(150deg, #1d1d22 0%, #25212c 100%);
  border: 1px solid rgba(110,173,188,0.35);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 20px 55px rgba(0,0,0,0.6), 0 0 30px rgba(80,160,255,0.12);
  direction: rtl;
  cursor: pointer;
  transform: translateX(-130%) scale(0.95);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.34,1.4,0.64,1), opacity 0.45s ease;
}
#mgr-notif.show { transform: translateX(0) scale(1); opacity: 1; }
#mgr-notif .mgr-avatar {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #6E8EFB, #43CEA2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  position: relative;
}
#mgr-notif .mgr-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(110,173,188,0.6);
  animation: online-ping 1.8s ease-out infinite;
}
#mgr-notif .mgr-title { font-size: 0.92rem; font-weight: 800; color: #f5f5f7; margin-bottom: 2px; }
#mgr-notif .mgr-text {
  font-size: 0.8rem; color: #a1a1a6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
#mgr-notif .mgr-close {
  position: absolute; top: 6px; left: 10px;
  background: none; border: none; color: #86868b;
  font-size: 1rem; cursor: pointer; padding: 4px;
}
#mgr-notif .mgr-close:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  #mgr-notif { transition: opacity 0.3s ease; transform: none; }
  #mgr-notif .mgr-avatar::after { animation: none; }
}

/* ─── New users strip ─── */
.new-users-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
}
.new-users-slider::-webkit-scrollbar { height: 6px; }
.new-users-slider::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }

.new-user-card {
  flex: 0 0 auto;
  width: 160px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  border-radius: 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--card-g1) 16%, #16161a), color-mix(in srgb, var(--card-g2) 10%, #121215));
  border: 1px solid color-mix(in srgb, var(--card-g1) 32%, transparent);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease, border-color 0.2s;
}
.new-user-card::before {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 65%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--card-g1) 30%, transparent), transparent 70%);
  pointer-events: none;
}
.new-user-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 38px rgba(0,0,0,0.5), 0 0 22px color-mix(in srgb, var(--card-g1) 22%, transparent);
  border-color: color-mix(in srgb, var(--card-g1) 60%, transparent);
}
.new-user-avatar {
  position: relative;
  width: 66px; height: 66px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--card-g1), var(--card-g2));
}
.new-user-avatar img,
.new-user-avatar .nu-fallback {
  width: 60px; height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #141416;
  display: block;
}
.new-user-avatar .nu-fallback {
  align-items: center;
  justify-content: center;
  background: #2a2a30;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}
.new-user-avatar .nu-online {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 13px; height: 13px;
  background: #34c759;
  border: 2.5px solid #141416;
  border-radius: 50%;
}
.new-user-name {
  font-weight: 800;
  color: #fff;
  font-size: 0.92rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.new-user-msg-btn {
  margin-top: 2px;
  background: linear-gradient(135deg, var(--card-g1), var(--card-g2));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.15s;
}
.new-user-msg-btn:hover { opacity: 0.9; transform: scale(1.04); }

/* ─── Unified WhatsApp-style chat bubbles (all chat windows) ─── */
.fx-chat-row { display: flex; flex-direction: column; max-width: 78%; margin-bottom: 8px; }
.fx-chat-row.me   { align-self: flex-end; align-items: flex-end; }
.fx-chat-row.them { align-self: flex-start; align-items: flex-start; }

.fx-bubble {
  position: relative;
  padding: 8px 12px 8px 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  border-radius: 14px;
  box-shadow: 0 1px 1.5px rgba(0,0,0,0.18);
  direction: rtl;
  text-align: right;
}
/* sent — blue (user's preferred look) */
.fx-chat-row.me .fx-bubble {
  background: #0071e3;
  color: #ffffff;
  border-bottom-right-radius: 5px;
}
/* received — white bubble with dark text */
.fx-chat-row.them .fx-bubble {
  background: #f1f1f1;
  color: #1a1a1a;
  border-bottom-left-radius: 5px;
}
.fx-bubble-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 3px;
  font-size: 0.66rem;
  opacity: 0.9;
}
.fx-chat-row.them .fx-bubble-meta { color: #8a8a8e; }
.fx-chat-row.me   .fx-bubble-meta { color: #d6e9ff; }

/* double-tick read receipts */
.fx-ticks { display: inline-flex; line-height: 1; position: relative; width: 16px; height: 11px; }
.fx-ticks svg { position: absolute; top: 0; width: 16px; height: 11px; }
.fx-ticks .tick2 { right: 3px; }
.fx-ticks.read svg { stroke: #aee0ff; }   /* bright = read */
.fx-ticks.sent svg { stroke: rgba(255,255,255,0.6); } /* faded = delivered */

/* shared scroll container niceties */
.fx-chat-stream { display: flex; flex-direction: column; }

/* ─── Make the conversations unread indicator easy to spot ─── */
@keyframes chat-unread-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,59,48,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(255,59,48,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); }
}
#floating-support-badge[style*="flex"],
#floating-support-dot[style*="block"] {
  animation: chat-unread-pulse 1.6s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  #floating-support-badge, #floating-support-dot { animation: none !important; }
}

/* ─── Admin visibility edit mode (eye control) ─── */
#visibility-edit-fab {
  position: fixed;
  bottom: 90px;
  left: 24px;
  z-index: 100000;
  display: none;            /* shown only for admins via JS */
  align-items: center;
  gap: 8px;
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  font-family: inherit;
  direction: rtl;
}
#visibility-edit-fab.on { background: #16a34a; }
#visibility-edit-fab:hover { filter: brightness(1.08); }

/* in edit mode, hidden items are shown dimmed + dashed so the admin can re-enable them */
body.vis-edit-mode .vis-hideable-marked {
  outline: 2px dashed rgba(0,113,227,0.7) !important;
  outline-offset: 2px;
  position: relative;
}
body.vis-edit-mode .vis-hideable-marked.vis-currently-hidden {
  opacity: 0.4 !important;
  display: revert !important;   /* force-show hidden ones so they can be toggled back */
}

/* the eye badge */
.vis-eye-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0071e3;
  color: #fff;
  border: 2px solid #0b0b0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  z-index: 100001;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.vis-eye-badge.is-hidden { background: #ef4444; }
.vis-eye-badge:hover { transform: scale(1.15); }

/* ========== MANYVIDS STYLE LAYOUT ========== */
.mv-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 20px;
}

.mv-card {
  background: #18181b; /* dark bg */
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
}
.mv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.mv-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mv-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3f3f46;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  font-size: 0.9rem;
}

.mv-author {
  font-weight: 600;
  color: #e4e4e7;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  position: relative;
}

.mv-premium-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #f59e0b;
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mv-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.mv-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mv-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f4f4f5;
  line-height: 1.4;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mv-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.mv-views {
  color: #a1a1aa;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mv-price-btn {
  background: #8b5cf6; /* purple button like MV */
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 980px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
}
.mv-price-btn:hover {
  background: #7c3aed;
}

/* Hide original news layout flex box properties that interfere */
#page-home .main-news-layout {
  display: block !important;
}

body.admin-edit-mode-active .mv-card-delete-btn {
  display: flex !important;
}
#page-home .news-sidebar {
  display: none !important;
}

