/* ==============================================================
   Amrach Marketplace Directory - Modern Premium Design System
   ============================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Primary & Slate Palette */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* Accent Blues */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;

  /* Action Accents */
  --telegram-color: #229ED9;
  --telegram-hover: #1c87bc;
  --phone-color: #10b981;
  --phone-hover: #059669;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  /* Elevations */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: var(--font-sans);
  color: var(--slate-800);
  background-color: #f8fafc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  color: var(--slate-900);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-700);
}

/* Header & Navbar */
.site-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  transition: all 0.3s ease;
}

.navbar-brand img {
  height: 44px;
  width: auto;
}

.nav-link {
  font-weight: 500;
  color: var(--slate-600) !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-600) !important;
  background-color: var(--primary-50);
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0369a1 100%);
  color: #ffffff;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--slate-300);
  max-width: 640px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Search Box Container */
.hero-search-box {
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

.search-input-field {
  border: none !important;
  box-shadow: none !important;
  font-size: 1rem;
  padding: 12px 16px;
  color: var(--slate-900);
}

.search-input-field::placeholder {
  color: var(--slate-400);
}

.hero-search-select {
  border: none;
  border-left: 1px solid var(--slate-200);
  background: transparent;
  color: var(--slate-700);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 16px;
  outline: none;
  max-width: 190px;
}

.btn-hero-search {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #ffffff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-hero-search:hover {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: #ffffff;
  transform: translateY(-1px);
}

/* Category Grid & Cards */
.category-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.category-card:hover {
  border-color: var(--primary-500);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.category-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.25s ease;
}

.category-card:hover .category-icon-wrapper {
  background: var(--primary-600);
  color: #ffffff;
}

.category-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 500;
}

/* Business / Merchant Cards */
.merchant-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.merchant-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--slate-300);
}

.merchant-cover-thumb {
  height: 120px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.merchant-badge-featured {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.merchant-card-body {
  padding: 1.25rem;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.merchant-logo-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  border: 3px solid #ffffff;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  margin-top: -42px;
  margin-bottom: 0.75rem;
  object-fit: cover;
}

.merchant-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.merchant-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-bottom: 0.75rem;
}

.merchant-desc {
  font-size: 0.875rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.merchant-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--slate-100);
  padding-top: 0.85rem;
  margin-top: auto;
}

/* Product Cards */
.product-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--slate-300);
}

.product-image-container {
  aspect-ratio: 1 / 1;
  background-color: var(--slate-100);
  position: relative;
  overflow: hidden;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image-container img {
  transform: scale(1.04);
}

.product-badge-condition {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-merchant-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-500);
  margin-bottom: 0.35rem;
}

.product-merchant-link:hover {
  color: var(--primary-600);
}

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-tag {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-700);
  margin-top: auto;
  margin-bottom: 1rem;
}

.product-price-contact {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-600);
  background: var(--slate-100);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: auto;
  margin-bottom: 1rem;
}

/* Two Essential Contact Buttons */
.btn-telegram-contact {
  background-color: var(--telegram-color);
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(34, 158, 217, 0.25);
}

.btn-telegram-contact:hover {
  background-color: var(--telegram-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(34, 158, 217, 0.35);
}

.btn-phone-call {
  background-color: var(--phone-color);
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.btn-phone-call:hover {
  background-color: var(--phone-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

/* Mobile Sticky Contact Bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--slate-200);
  padding: 10px 16px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 1030;
}

@media (max-width: 767.98px) {
  .mobile-sticky-bar {
    display: flex;
    gap: 10px;
  }
  body.has-mobile-bar {
    padding-bottom: 74px;
  }
}

/* Merchant Profile Page Layout */
.merchant-hero-banner {
  height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 992px) {
  .merchant-hero-banner {
    height: 340px;
  }
}

.merchant-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
}

.merchant-profile-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.merchant-profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-md);
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-md);
  object-fit: cover;
  background: #ffffff;
}

/* Product Detail Page */
.product-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  background: #ffffff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-item {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 2px solid var(--slate-200);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.thumb-item.active, .thumb-item:hover {
  border-color: var(--primary-600);
}

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

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th, .specs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.95rem;
}

.specs-table th {
  color: var(--slate-500);
  font-weight: 500;
  width: 35%;
}

.specs-table td {
  color: var(--slate-900);
  font-weight: 600;
}

/* Directory Filter Sidebar */
.filter-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--slate-100);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Pagination */
.pagination-nav .page-link {
  border-radius: var(--radius-md);
  margin: 0 4px;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  font-weight: 600;
  padding: 8px 16px;
}

.pagination-nav .page-item.active .page-link {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  color: #ffffff;
}

/* Footer */
.site-footer {
  background-color: var(--slate-900);
  color: var(--slate-400);
  padding: 4.5rem 0 2rem;
  border-top: 1px solid var(--slate-800);
}

.footer-heading {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--slate-400);
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--slate-800);
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  font-size: 0.875rem;
}
