:root {
  --primary-color: #7b1fa2;
  --secondary-color: #9c27b0;
  --accent-color: #ff6d00;
  --bg-color: #f5f5f7;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cairo", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
}

/* ========== Top Bar (Unified) ========== */
.top-bar, .navbar {
  background: var(--card-bg);
  padding: 10px 48px;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 20px;
}

.search-container {
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 40px;
  padding: 8px 20px;
  transition: all 0.3s;
}

.search-bar:focus-within {
  background: #e8e8e8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-bar i {
  color: #888;
  margin-right: 10px;
}

.search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 15px;
  outline: none;
  font-family: "Cairo", sans-serif;
}

.logo h1 {
  font-size: 28px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.logo p {
  font-size: 12px;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
  cursor: pointer;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.auth-buttons {
  display: flex;
  gap: 12px;
}

.btn-login {
  padding: 10px 24px;
  border-radius: 40px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-login:hover {
  background: var(--primary-color);
  color: white;
}

.btn-register {
  padding: 10px 28px;
  border-radius: 40px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-register:hover {
  transform: translateY(-2px);
}

/* ========== Main Content & UI Components ========== */

/* Login Modal */
.preview-overlay {
  background: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-prompt {
  background: white;
  padding: 40px;
  border-radius: 28px;
  text-align: center;
  max-width: 400px;
  margin: 20px;
}

.login-prompt i {
  font-size: 60px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.login-prompt h3 {
  margin-bottom: 16px;
}

.login-prompt-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

/* Footer */
.footer {
  background: #1a1a2e;
  color: white;
  padding: 48px;
  text-align: center;
  margin-top: 60px;
}

/* ========== Container ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* ========== Filter Tabs ========== */
.filter-tabs {
  display: flex;
  gap: 20px;
  margin: 30px auto;
  justify-content: center;
  background: white;
  padding: 10px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  max-width: 400px;
}

.filter-tab {
  padding: 8px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  color: #555;
}

.filter-tab.active {
  background: linear-gradient(135deg, #7b1fa2, #9c27b0);
  color: white;
}

/* ========== Toast Notification ========== */
.toast-notification {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #4caf50, #8bc34a);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-notification i {
  font-size: 22px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .logo {
    font-size: 24px;
    order: 1;
    flex: 0 0 auto;
  }

  .search-bar {
    flex: 1 1 100%;
    min-width: 100%;
    margin-top: 10px;
  }

  .auth-buttons {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .container {
    padding: 15px;
  }

  .filter-tabs {
    gap: 10px;
    margin: 20px auto;
  }

  .filter-tab {
    padding: 8px 15px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
    text-align: center;
    width: 100%;
  }

  .search-bar {
    width: 100%;
    flex: 1 1 100%;
  }

  .search-bar input {
    font-size: 14px;
  }

  .auth-buttons {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .container {
    padding: 10px;
  }

  .filter-tabs {
    gap: 8px;
    padding: 8px;
    margin: 15px auto;
  }

  .filter-tab {
    padding: 6px 12px;
    font-size: 11px;
  }

/* ========== Skeleton Loading ========== */
.skeleton-text {
  background: #eee;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  border-radius: 5px;
  background-size: 200% 100%;
  animation: 1.5s shine-skeleton linear infinite;
  display: inline-block;
  color: transparent !important;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

.skeleton-text.name {
  width: 100px;
  height: 18px;
}
.skeleton-text.role {
  width: 80px;
  height: 14px;
  margin-top: 4px;
}
.skeleton-text.welcome {
  width: 120px;
  height: 32px;
}
.skeleton-text.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

@keyframes shine-skeleton {
  to {
    background-position-x: -200%;
  }
}
}

/* ========== Toast Notifications ========== */
#toast {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
}

.toast-message {
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s forwards;
  font-size: 14px;
  min-width: 250px;
}

.toast-message i {
  font-size: 18px;
}

.toast-success i { color: #4caf50; }
.toast-info i { color: #2196f3; }
.toast-warning i { color: #ff9800; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-message.fade-out {
  animation: fadeOutUp 0.5s forwards;
}

@keyframes fadeOutUp {
  to { transform: translateY(-20px); opacity: 0; }
}

/* ========== Empty State ========== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-top: 20px;
}

.empty-state i {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 18px;
}
@media (max-width: 768px) {
  .masonry-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 15px;
  }
  .card-container {
    margin-bottom: 15px;
    width: 100% !important;
  }
}

/* ===== Image performance & CLS prevention ===== */
.product-card-premium {
    contain: layout style; /* Improves performance without blocking overflow visibility */
}

/* Lazy image placeholder */
img[loading="lazy"] {
    background: #f0f0f0;
}

/* Accessibility: High contrast */
.request-banner-label,
.request-stat-label,
.category-premium,
.badge-tender-premium span,
.request-banner-label {
    color: #555555 !important;
}
/* --- Design Tokens for Premium Cards --- */
:root {
  --primary: #4e0078;
  --primary-container: #6a1b9a;
  --secondary: #8b5000;
  --secondary-container: #ff9800;
  --surface: #f8f9fa;
  --surface-container-lowest: #ffffff;
  --surface-container: #edeeef;
  --on-surface: #191c1d;
  --on-surface-variant: #4d4351;
  --outline-variant: #d0c2d3;
  --background: #f8f9fa;
  
  /* Card Container */
  --card-height: 140px;
  --card-radius: 24px;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 12px 35px rgba(90, 42, 156, 0.12);
  
  /* Request Card Fixed Colors */
  --request-bg: #ffffff;
  --request-border: #d0c2d3;
  --request-accent: #ff8a00;
  
  /* Legacy/Shared tokens */
  --clr-1: #7000ff;
  --clr-2: #ff0055;
  --clr-3: #ff00c8;
  --clr-4: #ffe605;
}

/* --- Base Card Container (Shared with Requests) --- */
.card-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 25px;
  display: inline-block;
  break-inside: avoid;
  border-radius: 25px;
  overflow: hidden;
  transition: transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: var(--bg-color, #f5f5f7);
  cursor: pointer;
}

.card-container:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(112, 0, 255, 0.2);
}

/* --- Premium Product Card Styles --- */
.product-card-premium {
    width: 100%;
    background: var(--surface-container-lowest);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 2px solid #5a2a9c;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 40px 60px -15px rgba(78, 0, 120, 0.06);
    position: relative;
    display: flex;
    flex-direction: row;
    margin-bottom: 0;
    cursor: pointer;
    min-height: 140px;
}

.product-card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(78, 0, 120, 0.2);
}

/* ===== NEW: Request Card Fixed Background (ط§ظ„ط®ظ„ظپظٹط© ط§ظ„ط«ط§ط¨طھط© ظ„ظ„ظ…ظ†ط§ظ‚طµط©) ===== */
.product-card-premium.request-mode {
    background: var(--request-bg);
    border: 2px solid #fbbf24;
}

.product-card-premium.request-mode .card-image-premium {
    background: #fff5e0;
}

.product-card-premium.request-mode .price-order-premium,
.product-card-premium.request-mode .card-actions-premium {
    border-top-color: var(--request-border);
}

.product-card-premium.request-mode .request-banner-premium {
    background: linear-gradient(135deg, var(--request-accent), #ff5e00);
}

.product-card-premium.request-mode .badge-tender-premium {
    background: linear-gradient(135deg, var(--request-accent), #ff5e00);
}

/* ===== End Request Card Fixed Background ===== */

.card-image-premium {
    position: relative;
    width: 35%;
    min-height: 180px;
    overflow: hidden;
    background: var(--surface-container);
    flex-shrink: 0;
}

.card-image-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.product-card-premium:hover .card-image-premium img {
    transform: scale(1.05);
}

.card-badge-premium {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 5;
}

.badge-premium {
    background: rgba(201, 125, 236, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.favorite-btn-premium {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: var(--primary);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.favorite-btn-premium:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.favorite-btn-premium.active {
    background: #fff1f2;
    color: #ef4444;
}

.favorite-btn-premium.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

.card-content-premium {
    width: 65%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.card-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.category-premium {
    font-size: 10px;
    font-weight: 600;
    color: var(--on-surface-variant, #eeebf0);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.product-title-premium {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--primary, #4e0078);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.02em;
}

.rating-premium {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-container);
    padding: 0.35rem 0.65rem;
    border-radius: 0.75rem;
    color: var(--on-surface);
}

.rating-premium .material-symbols-outlined {
    font-size: 1rem;
    color: var(--secondary);
    font-variation-settings: 'FILL' 1;
}

.rating-premium span {
    font-size: 0.8rem;
    font-weight: 800;
}

.product-description-premium {
  font-size: 11px;
  line-height: 1.5;
  color: #5a2a9c;
  margin: 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-order-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--outline-variant, #d0c2d3);
    border-bottom: 1px solid var(--outline-variant, #d0c2d3);
    margin: 6px 0;
}

.label-premium {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #4b5563;
    margin-bottom: 3px;
}

.value-premium {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--primary, #4e0078);
    margin: 0;
}

.note-premium {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
}

.order-value-premium {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary, #4e0078);
    margin: 0;
}

.text-right-premium {
    text-align: right;
}

.card-actions-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.contact-btn-premium {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--primary, #4e0078), var(--primary-container, #6a1b9a));
    color: white !important;
    border: none;
    border-radius: 9999px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(78, 0, 120, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    white-space: nowrap;
}

.contact-btn-premium:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(78, 0, 120, 0.3);
}

.contact-btn-premium:active {
    transform: scale(0.98);
}

.contact-btn-premium .material-symbols-outlined {
    font-size: 14px;
}

/* Details Button */
.details-btn-premium {
    padding: 8px 12px;
    background: transparent;
    color: var(--primary, #4e0078);
    border: 2px solid var(--primary, #4e0078);
    border-radius: 9999px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.details-btn-premium:hover {
    background: var(--primary, #4e0078);
    color: white;
    transform: scale(1.02);
}

.details-btn-premium:active {
    transform: scale(0.98);
}

.details-btn-premium .material-symbols-outlined {
    font-size: 14px;
}

/* --- Submit Offer Button in Request Cards (Orange) --- */
.product-card-premium.request-mode .contact-btn-premium {
    background: linear-gradient(135deg, #ff8a00, #ff5e00) !important;
    box-shadow: 0 6px 18px rgba(255, 138, 0, 0.25) !important;
}

.product-card-premium.request-mode .contact-btn-premium:hover {
    background: linear-gradient(135deg, #ff7200, #ff4d00) !important;
    box-shadow: 0 10px 30px rgba(255, 138, 0, 0.35) !important;
}

.product-card-premium.request-mode .details-btn-premium {
    border-color: #ff8a00;
    color: #c2410c;
}

.product-card-premium.request-mode .details-btn-premium:hover {
    background: #ff8a00;
    color: white;
}

/* --- Author Info Section --- */
.author-info-premium {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.author-details-premium {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name-premium {
    font-size: 11px;
    font-weight: 600;
    color: #1a1a1a;
}

.post-time-premium {
    font-size: 9px;
    color: var(--on-surface-variant, #4d4351);
}

.author-avatar-premium {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--outline-variant, #d0c2d3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: var(--surface-container);
}

.author-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 12px;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Premium Request Layout Components --- */
.request-banner-premium {
    display: none;
}

.request-stats-grid {
    display: flex;
    gap: 12px;
    margin: 10px 0;
}

.request-stat-box {
    flex: 1;
    background: #f8f9fa;
    padding: 8px 10px;
    border-radius: 8px;
    border-left: 3px solid #ff8a00;
}

.request-stat-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 2px;
}

.request-stat-value {
    font-size: 14px;
    font-weight: 800;
    color: #5a2a9c;
}

.badge-tender-premium {
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
}

/* --- Shared image styles for Requests --- */
.full-card-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

/* --- Premium Request Card Design (V2) --- */
.request-card-v2 {
  width: 100% !important;
  min-height: 480px;
  background: linear-gradient(135deg, #e0f2f1 0%, #b2ebf2 100%) !important;
  display: flex !important;
  flex-direction: column;
  padding: 0;
  margin-bottom: 25px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.request-card-v2::after {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%) !important;
  inset: 4px;
}

.author-bubble-v2 {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.author-bubble-v2:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.user-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--clr-1);
}

.user-avatar-small.user-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--clr-1), var(--clr-2));
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.user-name-small {
  font-size: 0.85rem;
  font-weight: 700;
  color: #333;
}

.request-card-v2 .card-content {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  margin: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: transparent;
}

.request-card-v2 .image-box {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  background: var(--surface-container);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.request-card-v2 .image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 0.75rem;
}

.request-card-v2:hover .image-box img {
  transform: scale(1.05);
}

.zoom-hint {
  position: absolute;
  inset: 0;
  background: rgba(112, 0, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-size: 1.5rem;
}

.request-card-v2 .image-box:hover .zoom-hint { opacity: 1; }

.request-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.order-details-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 25px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #555;
  padding: 8px 12px;
  background: rgba(112, 0, 255, 0.03);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.detail-item:hover { background: rgba(112, 0, 255, 0.08); }

.detail-item i {
  width: 20px;
  color: var(--clr-1);
  font-size: 1rem;
  text-align: center;
}

.detail-item strong {
  margin-right: auto;
  color: #000;
  font-weight: 700;
}

/* --- Action Buttons --- */
.action-buttons-overlay-v2 {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-card {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary-card {
  background: linear-gradient(135deg, var(--clr-1), var(--clr-2));
  color: white;
  box-shadow: 0 4px 15px rgba(112, 0, 255, 0.3);
}

.btn-primary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(112, 0, 255, 0.5);
}

.btn-secondary-card {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
}

.btn-secondary-card:hover {
  background: #e8e8e8;
  transform: translateY(-3px);
}

/* --- Submit Offer (Tender) Button --- */
.submit-btn-modal,
#offerSubmitBtn,
.btn-submit-offer {
  background: linear-gradient(135deg, #ff8a00, #ff5e00) !important;
  color: #fff !important;
  border: none !important;
  padding: 15px !important;
  border-radius: 10px !important;
  font-weight: bold !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.25) !important;
  transition: all 0.25s ease !important;
  white-space: nowrap !important;
}

.submit-btn-modal:hover,
#offerSubmitBtn:hover,
.btn-submit-offer:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 30px rgba(255, 138, 0, 0.35) !important;
}

/* --- Real-time Update Animations --- */
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-new-entry {
  animation: slideInDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.card-new-entry::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
  z-index: 10;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); }
  50% { box-shadow: 0 5px 30px rgba(112, 0, 255, 0.3); }
}

.card-updating { animation: pulse 0.6s ease-in-out; }

@keyframes glow {
  0%, 100% { border-color: transparent; }
  50% { border-color: rgba(112, 0, 255, 0.5); }
}

.card-updated {
  border: 2px solid transparent;
  animation: glow 0.6s ease-in-out;
}

@keyframes slideOutUp {
  to { opacity: 0; transform: translateY(-20px) scale(0.95); }
}

.card-removing { animation: slideOutUp 0.3s ease-in-out forwards; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.card-error { animation: shake 0.5s ease-in-out; }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .request-card-v2 .image-box { height: 200px; }
  .action-buttons-overlay-v2 { flex-direction: column; gap: 8px; }
  .order-details-list { margin-bottom: 15px; }
  .card-container:hover { transform: none; }
}

/* ===================================
   Profile Post Mini-Cards (Compact)
   =================================== */

.post-mini-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
  cursor: pointer;
}

.post-mini-card:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.1);
}

.post-img {
  position: relative;
  height: 120px;
  background: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  padding: 0.25rem;
}

.post-mini-card:hover .post-img img {
  transform: scale(1.05);
}

.post-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}

.post-status.active {
  background: #22c55e;
  color: #fff;
}

.post-status.reserved {
  background: #f59e0b;
  color: #fff;
}

.post-info {
  padding: 12px;
  text-align: right;
}

.post-info h4 {
  font-size: 0.85rem;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dark);
}

.post-info p {
  font-size: 0.75rem;
  color: #7b1fa2;
  font-weight: bold;
}

.post-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}

.btn-icon-edit,
.btn-icon-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.3s;
  color: #64748b;
}

.btn-icon-edit:hover {
  background: #e0f2fe;
  color: #3b82f6;
}

.btn-icon-delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ===================================
   Add Post Card & Section Styles
   =================================== */

.add-post-card {
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  transition: 0.3s;
  min-height: 180px;
}

.add-post-card:hover {
  border-color: #7b1fa2;
  color: #7b1fa2;
  background: #fdfaff;
}

.add-post-card i {
  font-size: 2rem;
  margin-bottom: 10px;
}

.badge-count {
  background: #7b1fa2;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.posts-section {
  margin-top: 20px;
}

/* ===================================
   Dynamic Performance Bars
   =================================== */

.bar-fill-dynamic {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--primary-color, #7b1fa2);
}

/* ===================================
   Premium Rating Badge
   =================================== */

.rating-badge-premium {
    background: rgba(255, 152, 0, 0.1); 
    color: #f59e0b; 
    padding: 2px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 152, 0, 0.2);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
    margin-right: 8px;
    transition: all 0.3s ease;
}

.rating-badge-premium:hover {
    background: rgba(255, 152, 0, 0.2);
    transform: scale(1.05);
}

.rating-badge-premium i {
    font-size: 0.7rem;
}

.rating-count-small {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 400;
    margin-right: 4px;
}

/* Tooltip style */
[title] {
    cursor: help;
}

/* Layout helper for Author Bubble */
.author-info-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ensure the author bubble expands to show the rating on the same line if possible */
.author-bubble, .author-bubble-v2 {
    max-width: 90%;
    justify-content: space-between;
}

/* ===================================
   Smart Trust Alerts (Chat)
   =================================== */

.cc-trust-alert {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 10px 0 20px 0;
    animation: fadeInDown 0.5s ease-out;
}

.cc-trust-alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #065f46;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cc-trust-alert-content i {
    font-size: 1.25rem;
    color: #10b981;
}

.cc-trust-alert-content strong {
    color: #047857;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   Rating Notification Styles
   =================================== */

.has-rating-notification {
    position: relative;
}

.has-rating-notification::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #f59e0b;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    z-index: 5;
}

.notification-shake {
    animation: bell-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-10deg); }
    75% { transform: rotate(5deg); }
    85% { transform: rotate(-5deg); }
}
/* ========================================
   Horizontal Cards Design (Bento Grid Style)
   Inspired by new-cards.html
   ======================================== */

/* Masonry Grid for Horizontal Cards - HIGH PRIORITY */
.masonry-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
}

@media (min-width: 768px) {
  .masonry-grid {
    gap: 32px !important;
  }
}

/* Horizontal Card Container */
.product-card-premium {
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  min-height: 140px;
  height: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #5a2a9c;
  position: relative;
  cursor: pointer;
  max-width: 650px;
  margin: 0 auto;
}

.product-card-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(90, 42, 156, 0.12);
}

/* Request Mode - Fixed Background */
.product-card-premium.request-mode {
  background: #ffffff;
  border: 2px solid #fbbf24;
}

/* Image Column (40% width) */
.card-image-premium {
  position: relative;
  width: 40%;
  min-height: 180px;
  overflow: hidden;
  background: var(--surface-container, #edeeef);
  flex-shrink: 0;
}

.card-image-premium img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.product-card-premium:hover .card-image-premium img {
  transform: scale(1.05);
}

/* Gradient Overlay on Image - Disabled */
.card-image-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  display: none;
}

/* Badge on Image */
.card-badge-premium {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

.badge-premium,
.badge-tender-premium {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary, #4e0078);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-tender-premium {
  background: rgba(255, 152, 0, 0.9);
  color: white;
}

/* Favorite Button */
.favorite-btn-premium {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.favorite-btn-premium:hover {
  transform: scale(1.1);
  background: white;
}

.favorite-btn-premium.active {
  background: #ff4757;
  color: white;
}

.favorite-btn-premium .material-symbols-outlined {
  font-size: 20px;
}

/* Content Section - 60% width */
.card-content-premium {
  flex: 1;
  min-width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
}

/* Card Header */
.card-header-premium {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.category-premium {
  font-size: 10px;
  font-weight: 600;
  color: var(--on-surface-variant, #eeebf0);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.product-title-premium {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary, #4e0078);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Rating */
.rating-premium {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--secondary-fixed, #ffdcbe);
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.rating-premium .material-symbols-outlined {
  font-size: 16px;
  color: var(--secondary, #8b5000);
  fill: 1;
}

.rating-premium span:last-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary, #8b5000);
}

/* Description */
.product-description-premium {
  font-size: 11px;
  color: #5a2a9c;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price Section */
.price-order-premium {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--outline-variant, #d0c2d3);
  border-bottom: 1px solid var(--outline-variant, #d0c2d3);
  margin: 6px 0;
}

.label-premium {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #4b5563;
  margin-bottom: 3px;
}

.value-premium {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary, #4e0078);
  margin: 0;
}

.order-value-premium {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary, #4e0078);
  margin: 0;
}

.text-right-premium {
  text-align: right;
}

/* Request Banner */
.request-banner-premium {
  display: none;
}

/* Compact Request Stats (Side by Side) */
.request-stats-grid {
  display: flex;
  gap: 12px;
  margin: 10px 0;
}

.request-stat-box {
  flex: 1;
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid #ff8a00;
}

.request-stat-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 2px;
}

.request-stat-value {
  font-size: 14px;
  font-weight: 800;
  color: #5a2a9c;
}

/* Actions Section */
.card-actions-premium {
  display: flex;
  gap: 8px;
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
}

.contact-btn-premium {
  flex: 1;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--primary, #4e0078), var(--primary-container, #6a1b9a));
  color: white !important;
  border: none;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(78, 0, 120, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
}

.contact-btn-premium:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(78, 0, 120, 0.3);
}

.contact-btn-premium:active {
  transform: scale(0.98);
}

.contact-btn-premium .material-symbols-outlined {
  font-size: 14px;
}

/* Details Button */
.details-btn-premium {
  padding: 8px 12px;
  background: transparent;
  color: var(--primary, #4e0078);
  border: 2px solid var(--primary, #4e0078);
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.details-btn-premium:hover {
  background: var(--primary, #4e0078);
  color: white;
  transform: scale(1.02);
}

.details-btn-premium:active {
  transform: scale(0.98);
}

.details-btn-premium .material-symbols-outlined {
  font-size: 14px;
}

/* --- Submit Offer Button in Request Cards (Orange) --- */
.product-card-premium.request-mode .contact-btn-premium {
  background: linear-gradient(135deg, #ff8a00, #ff5e00) !important;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.25) !important;
}

.product-card-premium.request-mode .contact-btn-premium:hover {
  background: linear-gradient(135deg, #ff7200, #ff4d00) !important;
  box-shadow: 0 10px 30px rgba(255, 138, 0, 0.35) !important;
}

.product-card-premium.request-mode .details-btn-premium {
  border-color: #ff8a00;
  color: #c2410c;
}

.product-card-premium.request-mode .details-btn-premium:hover {
  background: #ff8a00;
  color: white;
}

/* Author Footer */
.author-info-premium {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.author-details-premium {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name-premium {
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1a;
}

.post-time-premium {
  font-size: 9px;
  color: var(--on-surface-variant, #4d4351);
}

.author-avatar-premium,
.author-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--outline-variant, #d0c2d3);
}

.author-avatar-placeholder {
  background: var(--primary-fixed, #f4d9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary, #4e0078);
  font-size: 12px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .product-card-premium {
    flex-direction: column;
    min-height: auto;
  }

  .card-image-premium {
    width: 100%;
    min-height: 160px;
  }

  .card-content-premium {
    width: 100%;
    padding: 14px;
  }

  .product-title-premium {
    font-size: 14px;
  }

  .value-premium {
    font-size: 15px;
  }
}

/* Loading Skeleton for Horizontal Cards */
.skeleton-horizontal {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 1.5rem;
  height: 180px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Pulse Animation for Request Status */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}
/* --- Interactive Layout & Global Components --- */
:root {
  --bg-color: #f5f5f7;
  --clr-4: #ffe605;
}

/* --- Modern Responsive Grid --- */
/* --- Stable 3-Column Grid --- */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1200px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .masonry-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Lightbox (Image Zoom) --- */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

.lightbox.active { opacity: 1; pointer-events: auto; }

.lightbox-content-wrapper {
  position: relative;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.lightbox-content-wrapper.grabbing { cursor: grabbing; }

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 5px;
  box-shadow: 0 0 40px rgba(112, 0, 255, 0.4);
  transition: transform 0.1s ease-out;
}

.close-lightbox {
  position: absolute;
  top: 25px; left: 25px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 35px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 3010;
}

.zoom-instruction {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 3010;
}

/* --- Specs Modal --- */
.specs-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

.specs-modal.active { opacity: 1; pointer-events: auto; }

.specs-modal-content {
  background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
  border-radius: 25px;
  padding: 30px;
  width: 95%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(123, 31, 162, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.specs-modal.active .specs-modal-content { transform: scale(1); }

.specs-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.specs-modal-title { 
  font-size: 1.4rem; 
  font-weight: 800; 
  color: white; 
  font-family: 'Cairo', sans-serif;
}

.close-specs-modal {
  background: rgba(255, 255, 255, 0.1); 
  border: none;
  color: white;
  font-size: 24px; 
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}

.close-specs-modal:hover {
  background: rgba(255, 255, 255, 0.2);
}

.specs-image-container {
  width: 100%; 
  height: 350px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 25px;
  position: relative;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.specs-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.specs-image-container:hover .specs-image {
  transform: scale(1.02);
}

/* --- Modal Specification Layouts --- */
.spec-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-section-title {
  color: var(--clr-4);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.spec-value {
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
}

.spec-full-row {
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.spec-full-row strong {
  display: block;
  color: white;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.spec-full-row p {
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Re-using Tender components inside modal */
.specs-modal .request-banner-premium {
  margin-top: 0;
  margin-bottom: 20px;
  border-radius: 15px;
}

.specs-modal .request-stats-grid {
  margin-bottom: 20px;
}

/* --- Publish/Offer Modal --- */
.publish-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.publish-modal.active { opacity: 1; pointer-events: auto; }

.publish-modal-content {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(112, 0, 255, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.form-group-modal { margin-bottom: 20px; }
.form-group-modal label { display: block; color: rgba(255, 255, 255, 0.9); margin-bottom: 8px; font-weight: 600; }
.form-group-modal input, .form-group-modal select, .form-group-modal textarea {
  width: 100%; padding: 12px 15px;
  border: 2px solid rgba(112, 0, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: white !important;
}

.submit-btn-modal {
  width: 100%;
  background: linear-gradient(135deg, #ff8a00, #ff5e00) !important;
  color: white !important;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.25);
  transition: all 0.25s ease;
}

.submit-btn-modal:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 138, 0, 0.35) !important;
}

/* تحسين التباين للقراءة السهلة */
.author-name-premium, .label-premium, .details-btn-premium {
    color: #1a1a1a !important; /* رمادي غامق جداً قريب للأسود */
}

/* ========================================
   Smart Header System - Unified Styles
   ======================================== */

.smart-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.glass-nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #4e0078, #6a1b9a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.header-nav-links {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .header-nav-links {
        display: flex;
    }
}

.nav-link {
    color: #64748b;
    font-weight: 500;
    transition: color 0.2s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: #4e0078;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.btn-link {
    background: transparent;
    border: none;
    color: #4e0078;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.btn-link:hover {
    background-color: rgba(78, 0, 120, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, #4e0078, #6a1b9a);
    border: none;
    color: white;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 0, 120, 0.2);
}

.btn-dashboard {
    background: #4e0078;
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-dashboard:hover {
    background: #6a1b9a;
    transform: translateY(-1px);
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-trigger:hover {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-name {
    display: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

@media (min-width: 1024px) {
    .user-name {
        display: inline;
    }
}

.user-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    z-index: 10001;
    padding: 0.5rem;
    overflow: hidden;
}

.user-dropdown.hidden {
    display: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: #4e0078;
}

.dropdown-item.text-red {
    color: #ef4444;
}

.dropdown-item.text-red:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

.dropdown-divider {
    margin: 0.4rem;
    border: none;
    border-top: 1px solid #f1f5f9;
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4e0078;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.smart-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: white;
    z-index: 11000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.smart-mobile-menu.active {
    transform: translateX(0);
}

.smart-mobile-menu.hidden {
    display: none;
}

.smart-mobile-menu.active.hidden {
    display: flex;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-close {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
    display: flex;
    color: #64748b;
}

.mobile-menu-links {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 0.75rem;
    font-size: 1rem;
}

.mobile-nav-link:hover {
    background-color: #f8fafc;
    color: #4e0078;
}

.mobile-nav-link.primary {
    background-color: #4e0078;
    color: white;
    margin-top: 0.5rem;
    justify-content: center;
}

.mobile-nav-link.text-red {
    color: #ef4444;
}

.mobile-user-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.mobile-user-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.mobile-divider {
    margin: 0.75rem 0;
    border: none;
    border-top: 1px solid #f1f5f9;
}

body {
    padding-top: 72px;
}
