/* ==========================================
   ARABI COMPANY — OUTLET CATALOGUE
   Airbnb-inspired UX
   ========================================== */

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

:root {
  --blue: #1A3C5E;
  --green-brand: #096D11;
  --green-whatsapp: #25D366;
  --red-sale: #E11D48;
  --red-light: #FFF1F2;
  --bg: #FFFFFF;
  --bg-soft: #F7F7F7;
  --white: #FFFFFF;
  --card-border: #EBEBEB;
  --text: #222222;
  --text-secondary: #717171;
  --text-muted: #B0B0B0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* ================================================
   HEADER — Search pill + Filters + Actions
   ================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  gap: 12px;
}

/* Row 1: Logo + Contact + Sale badge */
.header-row-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  padding-left: 8px;
}

.header-row-1-right {
  display: flex;
  align-items: center;
  gap: 8px;
}


.logo-img {
  height: 64px;
  width: auto;
  display: block;
}

/* Row 2: Search pill */
.header-row-2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search Pill */
.header-search-pill {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 40px;
  padding: 6px 6px 6px 20px;
  margin-left: 8px;
  gap: 6px;
  transition: all var(--transition);
}

.header-search-pill:hover { border-color: #ccc; }
.header-search-pill:focus-within {
  border-color: var(--text);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}

.pill-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text);
  flex-shrink: 0;
}

.header-search-pill input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  padding: 6px 4px;
  min-width: 0;
}

.header-search-pill input::placeholder { color: var(--text-muted); }

.pill-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-search-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.pill-search-btn svg { width: 16px; height: 16px; stroke: var(--text-muted); }

/* (header-actions removed — split into row-1 and row-2) */

/* (header-filter-btn removed — replaced by 3 filter pills) */

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 24px;
  transition: background var(--transition);
}

.nav-link:hover { background: var(--bg-soft); }
.nav-link svg { width: 16px; height: 16px; }

.sale-badge {
  display: inline-block;
  background: var(--red-sale);
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 24px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ================================================
   FILTER PILLS — 3 compact pills
   ================================================ */
.filter-pills-bar {
  background: var(--white);
  border-bottom: 1px solid var(--card-border);
  padding: 10px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fpill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 24px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}

.fpill:hover { border-color: var(--text); }

.fpill.active {
  background: var(--text);
  border-color: var(--text);
  color: white;
}

.fpill-arrow {
  font-size: 10px;
  opacity: 0.5;
}

.fpill.active .fpill-arrow { opacity: 0.7; }

/* ================================================
   PRODUCTS TOOLBAR — Count + Filter Tags
   ================================================ */
.products-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 12px;
  flex-wrap: wrap;
}

.product-count-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.active-filter-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
}

.filter-tag-remove {
  cursor: pointer;
  opacity: 0.5;
  font-size: 14px;
  line-height: 1;
}

.filter-tag-remove:hover { opacity: 1; }

.btn-clear-all {
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  padding: 4px;
  white-space: nowrap;
}

.btn-clear-all:hover { color: var(--text-secondary); }

/* ================================================
   FILTER MODAL (Airbnb-style) — unchanged
   ================================================ */
.filter-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.filter-modal-overlay.open { display: flex; }

.filter-modal {
  background: var(--white);
  border-radius: 20px;
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
}

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

.filter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.filter-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.filter-modal-close:hover { background: var(--bg-soft); }

.filter-modal-title { font-size: 16px; font-weight: 700; color: var(--text); }

.filter-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.filter-modal-section { margin-bottom: 8px; }
.filter-modal-section-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 16px; }

.filter-modal-options { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-modal-divider { height: 1px; background: var(--card-border); margin: 24px 0; }

.filter-chip {
  background: var(--white);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 24px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--text); }
.filter-chip.active { background: var(--text); border-color: var(--text); color: white; }
.filter-chip .chip-count { font-size: 12px; opacity: 0.5; margin-left: 4px; }

.filter-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
  flex-shrink: 0;
}

.filter-modal-clear {
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  padding: 8px 4px;
}

.filter-modal-apply {
  background: var(--text);
  color: white;
  border: none;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.filter-modal-apply:hover { background: #444; transform: translateY(-1px); }

/* ================================================
   PRODUCT CARDS
   ================================================ */
.products-section { padding: 0 0 60px; min-height: 200px; }
.product-list { display: flex; flex-direction: column; gap: 10px; }

.subcategory-header {
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  margin-top: 20px;
  margin-bottom: 4px;
  border-left: 4px solid var(--blue);
}

.subcategory-header:first-child { margin-top: 0; }

.product-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.product-card:hover { box-shadow: var(--shadow-md); }

.product-card-main {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
}

.product-image-placeholder {
  width: 72px;
  height: 72px;
  min-width: 72px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  overflow: hidden;
  padding: 8px;
}
.product-image-placeholder .brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.product-image-placeholder .brand-initial-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 30px;
  font-weight: 800;
  color: #9aa4af;
  letter-spacing: 0.5px;
  user-select: none;
}

.product-info { flex: 1; min-width: 0; }
.product-id { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }

.product-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.35; }
.product-name .brand { color: var(--green-brand); font-weight: 700; }

.product-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.product-specs {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-soft);
  padding: 3px 10px;
  border-radius: 6px;
}

.product-specs strong { color: var(--text); font-weight: 600; }
.product-qty { font-size: 12px; font-weight: 600; color: var(--blue); }

.product-out-of-stock {
  font-size: 12px;
  font-weight: 600;
  color: #B91C1C;
  background: #FEE2E2;
  padding: 3px 10px;
  border-radius: 6px;
}

.product-expand-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition);
  align-self: center;
}

.product-card.expanded .product-expand-icon { transform: rotate(180deg); }

.product-details {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--card-border);
  margin: 0 20px;
}

.product-card.expanded .product-details { display: block; }
.product-card.expanded .product-desc { -webkit-line-clamp: unset; }

.detail-row { padding: 12px 0; }

.detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-value { font-size: 14px; color: var(--text); line-height: 1.5; }

.inquiry-buttons { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-whatsapp);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-whatsapp:hover { background: #1fb855; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-whatsapp svg { width: 18px; height: 18px; }

.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-email:hover { background: #444; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-email svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--text);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover { background: #444; }

.no-results { text-align: center; padding: 60px 20px; }
.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results h3 { font-size: 20px; color: var(--text); margin-bottom: 8px; }
.no-results p { color: var(--text-secondary); margin-bottom: 20px; }

/* ================================================
   BACK TO TOP + FLOATING WHATSAPP
   ================================================ */
.back-to-top {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 80;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--bg-soft); }
.back-to-top svg { width: 18px; height: 18px; }

.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  background: var(--green-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37,211,102,0.35);
  z-index: 80;
  transition: all 0.3s ease;
}

.floating-whatsapp:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(37,211,102,0.45); }
.floating-whatsapp svg { width: 26px; height: 26px; }

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--card-border);
  padding: 40px 0 24px;
  color: var(--text-secondary);
}

.footer-top { display: flex; justify-content: space-between; gap: 48px; margin-bottom: 32px; flex-wrap: wrap; }
.footer-brand { max-width: 280px; }

.footer-logo { height: 64px; width: auto; display: block; margin-bottom: 12px; }
.footer-tagline { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.footer-links { display: flex; gap: 64px; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--text); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
  .container { padding: 0 16px; }

  /* Mobile header */
  .header-inner { gap: 8px; padding: 8px 0; }
  .logo-img { height: 48px; }

  .header-search-pill { padding: 6px 8px 6px 16px; max-width: none; margin-left: 0; margin: 0 4px; }
  .header-search-pill input { font-size: 13px; padding: 4px 4px; }
  .pill-search-btn { width: 28px; height: 28px; }
  .pill-search-btn svg { width: 12px; height: 12px; }

  /* Hide Contact text on mobile, keep icon */
  .nav-link span { display: none; }
  .nav-link { padding: 8px 8px; }
  .sale-badge { font-size: 10px; padding: 5px 10px; }
  .fpill { font-size: 12px; padding: 7px 12px; white-space: normal; }

  .category-tab { padding: 6px 10px 8px; font-size: 11px; }
  .category-tab-emoji { font-size: 18px; }

  /* Products */
  .product-card-main { gap: 12px; padding: 12px 14px; }
  .product-image-placeholder { width: 52px; height: 52px; min-width: 52px; font-size: 20px; }
  .product-name { font-size: 14px; }
  .product-desc { font-size: 12px; }
  .inquiry-buttons { flex-direction: column; }
  .btn-whatsapp, .btn-email { justify-content: center; }

  /* Modal full screen */
  .filter-modal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }

  /* Footer */
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-links { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; }

  .floating-whatsapp { width: 46px; height: 46px; bottom: 16px; right: 16px; }
  .floating-whatsapp svg { width: 22px; height: 22px; }
  .back-to-top { bottom: 72px; right: 16px; }
}

@media (max-width: 480px) {
  .category-tab { padding: 4px 8px 6px; font-size: 10px; }
  .category-tab-emoji { font-size: 16px; }
  .subcategory-header { font-size: 13px; padding: 8px 14px; }
  .product-count-text { font-size: 14px; }
}

/* ================================================
   UTILITIES
   ================================================ */
.skeleton {
  background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

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

.skeleton-card { height: 100px; margin-bottom: 10px; border-radius: var(--radius); }
