/* ============================================================
   UI/UX IMPROVEMENTS v2.0 — June 2026
   Comprehensive mobile-first improvements for PharmaWeb
   ============================================================ */

/* ===== GLOBAL FONT & TYPOGRAPHY ===== */
html[lang="fa"] body,
html[dir="rtl"] body,
body[dir="rtl"] {
  font-family: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif !important;
}

html[lang="en"] body,
html[dir="ltr"] body,
body[dir="ltr"] {
  font-family: 'Inter', 'Vazirmatn', system-ui, -apple-system, sans-serif !important;
}

/* Font Awesome icons must NOT inherit text fonts (fixes empty icon boxes site-wide) */
.fa, .fas, .far, .fal, .fab,
.fa-solid, .fa-regular, .fa-brands, .fa-classic,
.fa-sharp, .fa-sharp-solid,
i[class*="fa-"] {
  font-family: "Font Awesome 6 Free" !important;
  font-style: normal !important;
  font-variant: normal !important;
  font-weight: 900 !important;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  line-height: 1;
  speak: never;
}
.fab, .fa-brands, i[class*="fa-brands"] {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}
.fas, .fa-solid, i[class*="fa-solid"] {
  font-weight: 900 !important;
}
.far, .fa-regular {
  font-weight: 400 !important;
}
/* SVG pharma icons — never use icon font */
.pharma-icon, .pw-icon, svg.pharma-icon {
  font-family: inherit !important;
  font-weight: inherit !important;
}

/* Better Persian text rendering */
:lang(fa) {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  line-height: 1.8;
}

/* ===== GLOBAL TRANSITIONS & SMOOTHING ===== */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Smooth page transitions */
main {
  animation: pageIn 0.35s ease-out;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== FIX: Search Suggestions Overlay Bug ===== */
/* The search-wrapper and its ancestors clip the dropdown with overflow:hidden.
   We must remove overflow:hidden from the search wrapper AND hero containers
   so the absolute-positioned suggestions can actually appear below the input. */
.hero-pharmacy {
  z-index: 100 !important;
}
.hero-pharmacy .main-content-card {
  overflow: visible !important;
}
.hero-pharmacy .hero-section {
  overflow: visible !important;
}
.hero-pharmacy .hero-content {
  overflow: visible !important;
}
.hero-pharmacy .hero-search {
  position: relative;
  z-index: 9999 !important;
}
.hero-pharmacy .search-wrapper {
  position: relative;
  z-index: 9999 !important;
  overflow: visible !important;
}
/* Bubbles layer needs its own clipping so they don't leak out */
.hero-pharmacy .bubble-layer {
  overflow: hidden !important;
}
.hero-pharmacy .search-suggestions {
  z-index: 99999 !important;
  position: absolute;
  top: calc(100% + 8px);
  left: -5%;
  right: -5%;
  width: 110%;
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.04);
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.hero-pharmacy .search-suggestions .sg-item {
  padding: 14px 18px;
  gap: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}
.hero-pharmacy .search-suggestions .sg-item:hover,
.hero-pharmacy .search-suggestions .sg-item.sg-selected {
  background: rgba(0, 140, 105, 0.06);
}
.hero-pharmacy .search-suggestions .sg-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 4px;
  background: #f8fafb;
}
.hero-pharmacy .search-suggestions .sg-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a202c;
}
.hero-pharmacy .search-suggestions .sg-price {
  font-size: 14px;
  font-weight: 700;
  color: #008c69;
  background: rgba(0, 140, 105, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  margin-inline-start: auto;
}

/* The categories section must NOT overlap search */
.categories-section {
  position: relative;
  z-index: 1 !important;
}

/* ===== IMPROVED CATEGORY CARDS (Home) ===== */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.8rem 1.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: white;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.category-card:hover::before {
  opacity: 1;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}
.category-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
  border-radius: 18px;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}
.category-card:hover .category-icon {
  transform: scale(1.1);
}
.category-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.category-count {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ===== IMPROVED PRODUCT CARDS ===== */
.product-card {
  position: relative;
  border-radius: 20px !important;
  overflow: hidden;
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0, 140, 105, 0.12) !important;
    border-color: rgba(0, 140, 105, 0.15) !important;
  }
}

.product-image-container {
  position: relative;
  background: linear-gradient(135deg, #f8fafb, #eef2f7) !important;
  overflow: hidden;
}

.product-price-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #008c69, #00a67e) !important;
  color: white;
  padding: 6px 14px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  box-shadow: 0 4px 12px rgba(0, 140, 105, 0.25);
  z-index: 5;
  min-width: auto !important;
  letter-spacing: -0.02em;
}

[dir="rtl"] .product-price-badge {
  right: auto;
  left: 10px;
}

.product-info {
  padding: 18px !important;
}

.product-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #1a202c !important;
  margin-bottom: 10px !important;
  line-height: 1.4 !important;
}

.product-title-link {
  color: inherit !important;
  text-decoration: none !important;
}
.product-title-link:hover {
  color: #008c69 !important;
}

/* Better expiry display */
.product-expiry {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 5px 10px !important;
  background: #f0f7ff !important;
  border-radius: 8px !important;
  border-left: 3px solid #0ea5e9 !important;
  margin-bottom: 10px !important;
  font-size: 0.78rem !important;
}

/* Better description area */
.description-text {
  font-size: 0.82rem !important;
  line-height: 1.6 !important;
  color: #64748b !important;
}

/* Better product actions / add to cart */
.add-to-cart-form {
  display: flex;
  align-items: center;
  gap: 10px !important;
}

.quantity-selector {
  display: flex;
  align-items: center;
  background: #f1f5f9 !important;
  border-radius: 12px !important;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.qty-btn {
  width: 32px !important;
  height: 32px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}
.qty-btn:hover {
  background: #e2e8f0;
  color: #008c69;
}
.qty-btn:active {
  background: #cbd5e1;
}

.qty-input {
  width: 36px !important;
  height: 32px !important;
  text-align: center;
  border: none !important;
  background: transparent !important;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1a202c;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.add-to-cart-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #008c69, #00a67e) !important;
  color: white !important;
  border: none;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 140, 105, 0.2);
  white-space: nowrap;
}
.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #006e53, #008c69) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 140, 105, 0.3);
}
.add-to-cart-btn:active {
  transform: scale(0.97);
}

/* ===== IMPROVED STAR RATINGS ===== */
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.stars i {
  font-size: 0.82rem !important;
  color: #fbbf24;
}
.stars i.far {
  color: #d1d5db;
}
.rating-text {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  font-weight: 500;
}

/* ===== IMPROVED FOOTER ===== */
footer, .site-footer {
  background: linear-gradient(180deg, hsl(220, 30%, 12%), hsl(220, 30%, 8%)) !important;
}

footer .trust-badges-wrapper {
  gap: 0.75rem !important;
}
footer .badge-inner {
  width: 64px !important;
  height: 64px !important;
  border-radius: 14px !important;
  padding: 8px;
  background: #fff !important;
}
footer .badge-inner img {
  border-radius: 4px;
}

/* Footer links section — redesigned for mobile */
.footer-nav-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  padding: 1.5rem 0;
}
.footer-nav-section h6 {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.footer-nav-section h6::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 2px;
  background: #008c69;
  border-radius: 2px;
}
.footer-nav-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav-section li {
  margin-bottom: 0.4rem;
}
.footer-nav-section a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  padding: 2px 0;
  display: inline-block;
}
.footer-nav-section a:hover {
  color: #fff;
  transform: translateX(-3px);
}

/* ===== IMPROVED MOBILE BOTTOM NAVIGATION ===== */
.pharma-mobile-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(24px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06) !important;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)) !important;
}

.pharma-mobile-nav-item {
  gap: 3px !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  color: #9ca3af !important;
  transition: all 0.2s ease !important;
  padding: 6px 16px !important;
}
.pharma-mobile-nav-item i {
  font-size: 1.15rem !important;
  transition: transform 0.2s ease;
}
.pharma-mobile-nav-item.active {
  color: #008c69 !important;
}
.pharma-mobile-nav-item.active i {
  transform: scale(1.1);
}
.pharma-mobile-nav-item:hover {
  color: #008c69 !important;
}
.pharma-mobile-nav-item.active::before {
  background: linear-gradient(90deg, #008c69, #00b383) !important;
  height: 3px !important;
  border-radius: 2px;
  width: 28px !important;
}

/* ===== IMPROVED SEO CONTENT SECTION (bottom of pages) ===== */
.seo-contextual-content {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
}

/* SEO visible content at bottom - clean card design */
.seo-content-section {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px !important;
  padding: 0 !important;
  margin-top: 2.5rem !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.seo-content-inner {
  padding: 2rem;
}

.seo-main-title {
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  color: #1a202c !important;
  margin-bottom: 1.2rem !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.seo-main-title::before {
  content: '';
  width: 4px;
  height: 1.3rem;
  background: var(--pw-brand, #0d7a4a);
  border-radius: 2px;
  flex-shrink: 0;
}

.seo-text-block p {
  color: #4a5568 !important;
  font-size: 0.9rem !important;
  line-height: 1.9 !important;
  text-align: justify;
  margin-bottom: 0.8rem;
}
.seo-text-block strong {
  color: #1a202c;
}

.seo-keywords-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.seo-sub-title {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #1a202c !important;
  margin-bottom: 1rem !important;
}

.seo-drug-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
}

.seo-drug-category {
  background: #f8fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.2s ease;
}
.seo-drug-category:hover {
  border-color: var(--pw-brand, #0d7a4a);
  box-shadow: 0 2px 8px rgba(13, 122, 74, 0.08);
}

.seo-cat-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.6rem;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.seo-links a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pw-brand, #0d7a4a) !important;
  background: rgba(13, 122, 74, 0.06);
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.seo-links a:hover {
  background: var(--pw-brand, #0d7a4a);
  color: #fff !important;
}

/* FAQ Block */
.seo-faq-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.seo-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.seo-faq-item {
  background: #f8fafb !important;
  border: 1px solid #e5e7eb;
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.2s ease;
}
.seo-faq-item[open] {
  border-color: var(--pw-brand, #0d7a4a);
  background: #f0fdf4 !important;
}

.seo-faq-item summary {
  cursor: pointer;
  font-weight: 700 !important;
  font-size: 0.9rem;
  color: #1a202c !important;
  padding: 1rem 1.2rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  user-select: none;
}
.seo-faq-item summary::-webkit-details-marker { display: none; }
.seo-faq-item summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.7rem;
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.seo-faq-item[open] summary::after {
  transform: rotate(180deg);
  color: var(--pw-brand, #0d7a4a);
}

.seo-faq-item p {
  padding: 0 1.2rem 1rem;
  margin: 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.8 !important;
  color: #4a5568 !important;
}

/* ===== PAGINATION IMPROVEMENTS ===== */
.pagination-section {
  padding: 2rem 0;
  display: flex;
  justify-content: center;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.pagination-link:hover {
  background: #f0fdf4;
  border-color: #008c69;
  color: #008c69;
  transform: translateY(-1px);
}

.pagination-item.active .pagination-link {
  background: linear-gradient(135deg, #008c69, #00a67e) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(0, 140, 105, 0.25);
}

/* ===== SCROLL ANIMATIONS (compatible with pw-reveal.js) ===== */
/* pw-reveal.js adds .pw-visible class on scroll — these add smooth entrance */
.pw-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.pw-reveal.pw-visible {
  opacity: 1;
  transform: translateY(0);
}
.pw-reveal-delay-1 { transition-delay: 0.1s; }
.pw-reveal-delay-2 { transition-delay: 0.2s; }
.pw-reveal-delay-3 { transition-delay: 0.3s; }

/* ===== HOVER INTERACTIONS ===== */
.view-product-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  background: rgba(0, 140, 105, 0.06) !important;
  border-radius: 8px !important;
  color: #008c69 !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.view-product-link:hover {
  background: rgba(0, 140, 105, 0.12) !important;
  transform: translateX(-3px);
}

/* ===== MOBILE SPECIFIC IMPROVEMENTS ===== */
@media (max-width: 768px) {
  /* ── Product Grid: Clean 2-column layout ── */
  .products-grid.view-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 4px !important;
  }

  .product-card {
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  .product-image-container {
    height: 160px !important;
    background: linear-gradient(135deg, #f8fafb, #f0f4f8) !important;
  }

  .product-image {
    padding: 12px !important;
    object-fit: contain !important;
  }

  /* ── Price badge: prominent on mobile ── */
  .product-price-badge {
    padding: 5px 12px !important;
    font-size: 0.8rem !important;
    border-radius: 10px !important;
    top: 8px !important;
    right: auto !important;
    left: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 140, 105, 0.3) !important;
  }

  [dir="rtl"] .product-price-badge {
    left: auto !important;
    right: 8px !important;
  }

  /* ── Overlay: only detail button visible at top-left corner ── */
  .product-overlay {
    opacity: 1 !important;
    pointer-events: none !important;
    background: transparent !important;
    padding: 8px !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
  }

  .overlay-btn {
    transform: none !important;
    pointer-events: auto !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 0.85rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #008c69 !important;
  }

  /* Hide cart overlay button on mobile — only show detail/eye button */
  .overlay-btn.cart-btn {
    display: none !important;
  }

  .overlay-btn.detail-btn {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
  }

  [dir="rtl"] .overlay-btn.detail-btn {
    left: auto !important;
    right: 8px !important;
  }

  /* ── Product info: compact but readable ── */
  .product-info {
    padding: 10px 12px 12px !important;
  }

  .product-title {
    font-size: 0.82rem !important;
    margin-bottom: 6px !important;
    line-height: 1.35 !important;
    max-height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  /* ── Hide clutter on mobile: description text, ratings ── */
  .product-description .description-text {
    display: none !important;
  }

  .product-rating {
    display: none !important;
  }

  /* ── Expiry: compact ── */
  .product-expiry {
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
    margin-bottom: 6px !important;
    border-radius: 6px !important;
  }

  .product-expiry i {
    font-size: 0.6rem !important;
  }

  /* ── "مشاهده جزئیات" link: clean appearance ── */
  .view-product-link {
    font-size: 0.72rem !important;
    padding: 4px 8px !important;
    margin-bottom: 8px !important;
    border-radius: 6px !important;
  }

  .view-product-link .toggle-icon {
    font-size: 0.6rem !important;
  }

  /* ── Add to cart: simplified layout on mobile ── */
  .add-to-cart-form {
    flex-direction: row !important;
    gap: 6px !important;
  }

  /* Hide quantity selector on mobile for cleaner cards */
  .quantity-selector {
    display: none !important;
  }

  .add-to-cart-btn {
    width: 100% !important;
    padding: 10px 8px !important;
    font-size: 0.78rem !important;
    border-radius: 10px !important;
    gap: 5px !important;
  }

  .add-to-cart-btn i {
    font-size: 0.85rem !important;
  }

  /* ── Footer on mobile ── */
  footer .trust-badges-wrapper {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0;
    gap: 0.5rem !important;
    scrollbar-width: none;
  }
  footer .trust-badges-wrapper::-webkit-scrollbar {
    display: none;
  }
  footer .trust-badge {
    flex-shrink: 0;
  }

  /* ── Better pagination on mobile ── */
  .pagination-link {
    min-width: 36px;
    height: 36px;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  /* ── Footer nav ── */
  .footer-nav-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
  .products-grid.view-grid {
    gap: 8px !important;
  }

  .product-image-container {
    height: 145px !important;
  }

  .product-info {
    padding: 8px 10px 10px !important;
  }

  .product-title {
    font-size: 0.78rem !important;
  }

  .product-price-badge {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
  }

  .add-to-cart-btn {
    padding: 9px 6px !important;
    font-size: 0.74rem !important;
  }

  .add-to-cart-btn span {
    font-size: 0.72rem !important;
  }

  .view-product-link {
    display: none !important;
  }

  .pagination-list {
    gap: 4px;
  }

  .pagination-link {
    min-width: 32px;
    height: 32px;
    font-size: 0.75rem;
    padding: 0 8px;
  }
}

/* ── Tiny phones (≤380px): single column ── */
@media (max-width: 380px) {
  .products-grid.view-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .product-image-container {
    height: 200px !important;
  }

  .product-info {
    padding: 14px !important;
  }

  .product-title {
    font-size: 0.9rem !important;
    max-height: none;
    -webkit-line-clamp: unset;
  }

  .product-description .description-text {
    display: block !important;
    font-size: 0.8rem !important;
    -webkit-line-clamp: 2;
  }

  .product-rating {
    display: flex !important;
  }

  .quantity-selector {
    display: flex !important;
  }

  .add-to-cart-form {
    flex-direction: row !important;
    gap: 8px !important;
  }

  .add-to-cart-btn {
    flex: 1 !important;
  }
}

/* ===== CART PAGE IMPROVEMENTS ===== */
body.cart-page .cart-items-section {
  border-radius: 20px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
  overflow: hidden;
}

body.cart-page .cart-item {
  padding: 16px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease;
}
body.cart-page .cart-item:hover {
  background: rgba(0, 140, 105, 0.02);
}
body.cart-page .cart-item:last-child {
  border-bottom: none;
}

body.cart-page .receipt-card {
  border-radius: 20px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
  overflow: hidden;
  background: #fff;
}

body.cart-page .receipt-header {
  background: linear-gradient(135deg, #008c69, #006e53) !important;
  padding: 16px 20px;
}
body.cart-page .receipt-header h3 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

body.cart-page .btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #008c69, #00a67e);
  color: white;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 140, 105, 0.25);
}
body.cart-page .btn-checkout:hover {
  background: linear-gradient(135deg, #006e53, #008c69);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 140, 105, 0.35);
}

body.cart-page .trust-strip {
  display: flex;
  justify-content: space-around;
  padding: 14px;
  background: #f8fafb;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
body.cart-page .trust-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}
body.cart-page .trust-strip-item i {
  font-size: 1rem;
  color: #008c69;
}

body.cart-page .security-strip {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 16px;
  margin-top: 16px;
}
body.cart-page .security-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.8rem;
  color: #475569;
}
body.cart-page .security-item i {
  font-size: 0.9rem;
}
body.cart-page .icon-green { color: #16a34a; }
body.cart-page .icon-blue { color: #2563eb; }
body.cart-page .icon-amber { color: #d97706; }

/* Cart steps improvement */
body.cart-page .cart-steps {
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

/* ===== TRUST SIGNAL IMPROVEMENTS ===== */
/* Better certificate badges organization */
.trust-badges-section {
  text-align: center;
}
.trust-badges-section h6 {
  font-size: 0.8rem !important;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6) !important;
  margin-bottom: 1rem !important;
}

/* ===== PROMO BANNER IMPROVEMENTS ===== */
.promo-banner {
  position: relative !important;
  z-index: 1028 !important;
}

/* ===== SCROLL-TO-TOP BUTTON ===== */
.scroll-to-top {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #008c69, #00a67e);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 140, 105, 0.3);
  z-index: 998;
}
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 140, 105, 0.4);
}
.scroll-to-top:active {
  transform: scale(0.95);
}

/* ===== LOADING STATES ===== */
.product-card .skeleton-placeholder {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  background: linear-gradient(110deg, #f1f5f9 8%, #e2e8f0 18%, #f1f5f9 33%);
  background-size: 200% 100%;
  border-radius: 8px;
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== PRINT ===== */
@media print {
  .pharma-mobile-nav,
  .promo-banner,
  .scroll-to-top,
  .search-container {
    display: none !important;
  }
}

/* ===== HOME PAGE IMPROVEMENTS ===== */
/* Bottom padding for mobile nav on home */
@media (max-width: 768px) {
  .home-wrapper {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  /* Hero title cleaner on mobile */
  .hero-title {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
  }
  .hero-subtitle {
    font-size: 0.9rem !important;
    line-height: 1.5;
  }
  .hero-badge { font-size: 0.78rem !important; }

  /* Feature cards: single column on mobile */
  .features-section .col-md-4 {
    margin-bottom: 0 !important;
  }
  .feature-card {
    padding: 1.2rem !important;
  }
  .feature-icon {
    width: 56px !important;
    height: 56px !important;
  }
  .feature-title { font-size: 0.95rem !important; }
  .feature-description { font-size: 0.82rem !important; line-height: 1.6; }

  /* Categories: 2-column on mobile instead of 3 */
  .categories-section .col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  .category-card {
    padding: 1.2rem 0.8rem !important;
    border-radius: 16px !important;
  }
  .category-icon {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.3rem !important;
    margin-bottom: 0.6rem !important;
  }
  .category-title { font-size: 0.85rem !important; }
  .category-count { font-size: 0.75rem !important; }
  .category-card .text-primary {
    font-size: 0.75rem !important;
  }

  /* Popular products on home: tighter grid */
  .products-section .col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 6px !important;
  }
  .products-section .product-body {
    padding: 0.8rem !important;
  }
  .products-section .product-title { font-size: 0.82rem !important; }
  .products-section .product-description { 
    font-size: 0.75rem !important; 
    -webkit-line-clamp: 2; 
    display: -webkit-box; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
  }

  /* CTA section */
  .cta-section { 
    padding: 2rem 1.2rem !important; 
    border-radius: 16px !important; 
  }
  .cta-title { font-size: 1.3rem !important; }
  .cta-subtitle { font-size: 0.88rem !important; }

  /* SEO content on mobile */
  .seo-content-section {
    border-radius: 16px !important;
    margin-top: 1.5rem !important;
  }
  .seo-content-inner {
    padding: 1.2rem !important;
  }
  .seo-main-title { font-size: 1.05rem !important; }
  .seo-sub-title { font-size: 0.95rem !important; }
  .seo-text-block p { font-size: 0.82rem !important; }
  .seo-drug-categories { grid-template-columns: 1fr !important; gap: 0.6rem; }
  .seo-drug-category { padding: 0.8rem !important; }
  .seo-cat-label { font-size: 0.82rem !important; }
  .seo-links a { font-size: 0.72rem !important; padding: 3px 8px !important; }
  .seo-faq-item summary { font-size: 0.82rem !important; padding: 0.8rem 1rem !important; }
  .seo-faq-item p { font-size: 0.78rem !important; padding: 0 1rem 0.8rem !important; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.35rem !important; }
  .hero-subtitle { font-size: 0.82rem !important; }
  .hero-actions .hero-btn { font-size: 0.85rem !important; padding: 0.7rem 1rem !important; }
  
  .feature-card { padding: 1rem !important; }
  .feature-title { font-size: 0.88rem !important; }
  .feature-description { font-size: 0.78rem !important; }

  .category-card { padding: 1rem 0.6rem !important; }
  .category-icon { width: 44px !important; height: 44px !important; font-size: 1.1rem !important; border-radius: 12px !important; }
  .category-title { font-size: 0.78rem !important; }

  .products-section .product-description { display: none !important; }
  .products-section .product-actions { flex-direction: column !important; gap: 6px !important; }
  .products-section .product-btn { font-size: 0.75rem !important; padding: 0.5rem 0.6rem !important; }
}

/* ===== BLOG PAGE IMPROVEMENTS ===== */
/* Ensure blog page has bottom padding for mobile nav */
@media (max-width: 768px) {
  .blog-wrapper {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ===== SUPPORT PAGE IMPROVEMENTS ===== */
/* Ensure support page has bottom padding for mobile nav */
@media (max-width: 768px) {
  body .container.my-5 {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ===== GLOBAL MOBILE NAV SPACING ===== */
/* All pages need bottom padding so content isn't hidden behind sticky mobile nav */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
}

/* ===== SMOOTH MICRO-INTERACTIONS ===== */
/* Button press feedback */
.hero-btn:active,
.product-btn:active,
.add-to-cart-btn:active,
.blog-empty-cta:active,
.chat-open-btn:active {
  transform: scale(0.96) !important;
  transition: transform 0.1s ease !important;
}

/* Link hover underline animation */
.footer-nav-section a,
.view-product-link {
  position: relative;
}
.footer-nav-section a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.25s ease;
}
.footer-nav-section a:hover::after {
  width: 100%;
}

/* ===== TOAST / NOTIFICATION STYLE ===== */
.toast-notification {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a202c;
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}
.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-notification i {
  color: #00c48c;
  margin-inline-end: 8px;
}

/* ===== IMPROVED EMPTY STATES ===== */
/* Cart empty state refinements */
body.cart-page .empty-cart-card {
  text-align: center;
  padding: 3rem 2rem;
}
body.cart-page .empty-cart-icon {
  font-size: 3.5rem;
  color: #008c69;
  opacity: 0.6;
  margin-bottom: 1.5rem;
}
body.cart-page .empty-cart-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #2d3748;
  margin-bottom: 0.75rem;
}
body.cart-page .empty-cart-text {
  color: #718096;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}
body.cart-page .btn-shop-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #008c69, #00a67e);
  color: #fff;
  padding: 14px 32px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 140, 105, 0.25);
  margin-bottom: 2rem;
}
body.cart-page .btn-shop-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 140, 105, 0.35);
  color: #fff;
}

/* Cart delivery banner on mobile */
@media (max-width: 768px) {
  body.cart-page .empty-cart-card { padding: 2rem 1.2rem; }
  body.cart-page .empty-cart-title { font-size: 1.1rem; }
  body.cart-page .empty-cart-text { font-size: 0.88rem; }
  body.cart-page .btn-shop-now { padding: 12px 24px; font-size: 0.92rem; width: 100%; justify-content: center; }
  body.cart-page .delivery-banner { padding: 1rem !important; border-radius: 14px !important; }
  body.cart-page .banner-features { flex-wrap: wrap; gap: 0.5rem !important; }
  body.cart-page .banner-feature { font-size: 0.75rem !important; }
}

/* ===== IMPROVED SECTION HEADERS ===== */
.section-header {
  margin-bottom: 2rem;
}
.section-title {
  position: relative;
  display: inline-block;
}

/* ===== BREADCRUMB IMPROVEMENTS ===== */
.breadcrumb {
  font-size: 0.85rem;
  padding: 0;
  margin: 0;
}
.breadcrumb-item a {
  color: #008c69;
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb-item a:hover {
  color: #006e53;
}
.breadcrumb-item.active {
  color: #718096;
}

/* ===== FOCUS STYLES (Accessibility) ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #008c69;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== NAVBAR IMPROVEMENTS ===== */
.navbar-brand {
  font-family: 'Vazirmatn', 'Inter', sans-serif;
}

/* Better mobile navbar collapse */
@media (max-width: 992px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
  }
  .navbar-nav .nav-link {
    border-radius: 10px;
    padding: 0.6rem 1rem !important;
  }
  .navbar-nav .nav-link:hover {
    background: rgba(0, 140, 105, 0.06);
  }
}

/* ===== IMPROVED FORM INPUTS GLOBALLY ===== */
.form-control,
.form-select {
  border-radius: 10px !important;
  border: 1.5px solid hsl(35, 15%, 82%) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  font-family: 'Vazirmatn', 'Inter', sans-serif;
}
.form-control:focus,
.form-select:focus {
  border-color: #008c69 !important;
  box-shadow: 0 0 0 3px rgba(0, 140, 105, 0.12) !important;
}

/* ===== IMPROVED ALERTS ===== */
.alert {
  border-radius: 14px !important;
  border: none !important;
  padding: 1rem 1.25rem !important;
  font-weight: 500;
}
.alert-success {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border-left: 4px solid #16a34a !important;
}
.alert-danger {
  background: #fff1f2 !important;
  color: #9f1239 !important;
  border-left: 4px solid #e11d48 !important;
}
.alert-warning {
  background: #fffbeb !important;
  color: #92400e !important;
  border-left: 4px solid #f59e0b !important;
}
.alert-info {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  border-left: 4px solid #3b82f6 !important;
}

/* ===== IMPROVED BADGES ===== */
.badge {
  border-radius: 8px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

/* ===== TABLE IMPROVEMENTS ===== */
.table {
  border-radius: 12px;
  overflow: hidden;
}
.table thead th {
  background: hsl(35, 18%, 92%) !important;
  font-weight: 700;
  color: hsl(215, 28%, 14%);
  border-bottom: 2px solid hsl(35, 15%, 82%);
}
.table tbody tr:hover {
  background: rgba(0, 140, 105, 0.03) !important;
}

/* ===== HOME PAGE - SEO KEYWORD SECTION ===== */
.seo-keyword-card {
  display: block;
  padding: 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  color: #ffffff !important;
  text-decoration: none !important;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.seo-keyword-card:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-4px);
  color: #ffffff !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}
.seo-keyword-card strong {
  font-size: 1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.seo-keyword-card small {
  font-size: 0.8rem;
  opacity: 0.88;
}

/* ===== IMPROVED BACK-TO-TOP ===== */
.scroll-to-top {
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ===== PROFILE & ORDER PAGES ===== */
@media (max-width: 768px) {
  .profile-card,
  .order-card {
    border-radius: 16px !important;
    margin-bottom: 1rem;
  }
}

/* ===== CHECKBOX & RADIO CUSTOM STYLING ===== */
.form-check-input:checked {
  background-color: #008c69 !important;
  border-color: #008c69 !important;
}
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 140, 105, 0.15) !important;
  border-color: #008c69 !important;
}

/* ===== IMPROVED MOBILE SEARCH BAR (buy-medicine) ===== */
@media (max-width: 768px) {
  .breadcrumb-navigation {
    border-radius: 12px !important;
    padding: 10px 14px !important;
  }
  .search-container .input-group {
    border-radius: 20px !important;
  }
}

/* ============================================================
   v2.2 — Layout breathing room & icon containers (Jun 2026)
   ============================================================ */

/* Global section / card spacing */
main {
  padding-top: var(--pw-sp-4, 16px);
}
main > .container,
main .container.my-5,
.cart-container > .container,
.checkout-content > .container {
  padding-top: var(--pw-sp-4, 16px);
  padding-bottom: var(--pw-sp-6, 24px);
}
.row.g-2 { --bs-gutter-x: 0.875rem; --bs-gutter-y: 0.875rem; }
.row.g-3 { --bs-gutter-x: 1.125rem; --bs-gutter-y: 1.125rem; }
.row.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
.row.g-5 { --bs-gutter-x: 2rem; --bs-gutter-y: 2rem; }

.card,
.glass-card,
.product-card,
.support-card,
.checkout-card,
.payment-card,
.chat-cta-card,
.feature-card,
.category-card {
  margin-bottom: var(--pw-sp-4, 16px);
}
.card-body,
.checkout-card .card-header + .card-body,
.payment-card .card-body {
  padding: var(--pw-sp-5, 20px) var(--pw-sp-6, 24px) !important;
}
.card + .card,
.support-card + .support-card,
.checkout-card + .checkout-card {
  margin-top: var(--pw-sp-2, 8px);
}

/* Icon boxes — always render FA inside colored containers */
.contact-icon,
.step-icon,
.chat-cta-icon,
.chat-feature-icon,
.feature-icon,
.category-icon,
.pay-btn .crypto-icon {
  flex-shrink: 0;
}
.contact-icon i,
.step-icon i,
.chat-feature-icon i,
.feature-icon i,
.category-icon i {
  font-size: inherit;
  line-height: 1;
  width: 1em;
  text-align: center;
}
.contact-icon {
  min-width: 56px;
  min-height: 56px;
  font-size: 1.35rem;
}
.chat-cta-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: #fff;
}
.chat-feature-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
}

/* Support page contact cards */
.contact-item {
  padding: 1.25rem !important;
  margin-bottom: 1rem !important;
  gap: 1rem;
}
.contact-item + .contact-item {
  margin-top: 0.25rem;
}
.support-card .card-body {
  padding: 1.5rem !important;
}
.chat-features {
  gap: 1.25rem !important;
  margin-top: 1.75rem !important;
}
.chat-feature {
  padding: 1.25rem 1rem !important;
}

/* Checkout spacing */
.checkout-content {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
}
.checkout-card,
.payment-card {
  margin-bottom: 1.5rem !important;
}
.checkout-card .card-header {
  padding: 1.25rem 1.5rem !important;
}
.checkout-progress {
  gap: 1.25rem !important;
  margin-bottom: 1.75rem !important;
}
.payment-methods {
  gap: 0.875rem !important;
}

/* Cart page */
.cart-container .cart-item,
.cart-container .receipt-sidebar .receipt-card {
  margin-bottom: 1rem;
}
.cart-steps {
  margin-bottom: 1.5rem !important;
  gap: 0.5rem;
}

/* Home / product grids */
.products-section .product-card,
.feature-card,
.category-card {
  height: 100%;
}
.products-section .col-6,
.products-section .col-md-4,
.products-section .col-lg-3 {
  margin-bottom: 0.25rem;
}

/* Alert / notice boxes */
.alert-custom,
.notice-box,
.info-box {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

/* Avoid triple bottom padding on support (body rule is enough) */
@media (max-width: 768px) {
  body .container.my-5 {
    padding-bottom: var(--pw-sp-6, 24px) !important;
  }
  .checkout-hero {
    padding: 1.75rem 0 2.5rem !important;
  }
  .contact-item {
    padding: 1rem !important;
  }
  .row.g-4 {
    --bs-gutter-y: 1.25rem;
  }
}

/* ============================================================
   v2.3 — Icons, footer, categories, checkout polish (Jun 2026)
   ============================================================ */

/* Brand icons inside payment method boxes (BTC/ETH/etc.) */
.method-icon i.fab,
.method-icon .fab,
.payment-method .method-icon i[class*="fa-"],
.pay-btn .method-icon i {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
  font-style: normal !important;
}
.method-icon i.fas,
.method-icon i.fa-solid,
.payment-method .method-icon i.fas {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

/* Footer navigation — icon/text spacing (RTL & LTR) */
.footer-nav-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem !important;
  line-height: 1.5;
  padding: 0.2rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-nav-link i {
  flex-shrink: 0;
  width: 1.1em;
  font-size: 0.72rem !important;
  opacity: 0.85;
  text-align: center;
}
.footer-nav-link span {
  flex: 1;
  min-width: 0;
}
[dir="rtl"] .footer-nav-link:hover {
  transform: translateX(-3px);
}
[dir="ltr"] .footer-nav-link:hover {
  transform: translateX(3px);
}

/* Footer social buttons */
.footer-social-row {
  gap: 0.65rem !important;
}
.footer-social-link {
  width: 38px !important;
  height: 38px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}
.footer-social-link:hover {
  background: rgba(0, 140, 105, 0.35) !important;
  border-color: rgba(74, 222, 128, 0.4);
  transform: translateY(-2px);
}
.footer-social-link i {
  font-size: 0.9rem !important;
  line-height: 1;
}
.footer-social-link .fab,
.footer-social-link i.fab {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* Category horizontal scroll — wider chips, less truncation */
.categories-scroll {
  gap: 12px !important;
  padding: 12px 18px 16px !important;
}
.scroll-chip {
  min-width: 112px !important;
  max-width: 220px !important;
  padding: 12px 16px !important;
  gap: 10px !important;
  border-radius: 16px !important;
}
.chip-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  position: relative;
  z-index: 1;
}
.chip-title {
  font-size: 0.82rem !important;
  max-width: 150px;
}
.scroll-chip::before {
  border-radius: 16px 16px 0 0;
  z-index: 0;
}
.scroll-indicators .scroll-btn {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* Sidebar category list (desktop) */
.category-tile {
  border-radius: 14px !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  gap: 10px !important;
}
.categories-header {
  padding-bottom: 12px !important;
  margin-bottom: 12px !important;
}

/* Hero search — readable placeholder on gradient */
.hero-pharmacy .search-input::placeholder {
  color: rgba(255, 255, 255, 0.72) !important;
  opacity: 1 !important;
}
.hero-pharmacy .search-input {
  border-radius: 50px !important;
}
.hero-pharmacy .search-btn {
  border-radius: 50px !important;
  gap: 0.4rem;
}

/* Checkout & payment cards */
.payment-method {
  border-radius: 16px !important;
  padding: 18px !important;
  gap: 18px !important;
}
.method-icon {
  border-radius: 14px !important;
  width: 52px !important;
  height: 52px !important;
}
.payment-grid {
  gap: 14px !important;
}
.order-items {
  padding: 24px 28px !important;
}
.order-item {
  padding: 18px 20px !important;
  margin-bottom: 14px !important;
  border-radius: 16px !important;
  gap: 16px !important;
}
.order-summary {
  padding: 22px 28px !important;
}
.summary-row {
  padding: 14px 0 !important;
}

/* Cart receipt sidebar */
.receipt-items {
  gap: 12px !important;
}
.receipt-item {
  padding: 10px 0 !important;
  gap: 14px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.receipt-item:last-child {
  border-bottom: none;
}
.receipt-item-name {
  line-height: 1.5 !important;
  margin-bottom: 2px;
}

/* Toast / alert — icon spacing */
.alert,
.toast,
.cart-toast,
#cart-toast {
  gap: 0.65rem;
}
.alert .btn-close,
.toast .btn-close {
  margin-inline-start: 0.5rem !important;
}

/* Product image consistency */
.product-image-container {
  border-radius: 16px 16px 0 0 !important;
}
.product-image {
  object-fit: contain !important;
  object-position: center !important;
}

/* Success notification bar */
.cart-added-notice,
.added-to-cart-banner,
[class*="toast-success"] {
  border-radius: 14px !important;
  padding: 12px 16px !important;
  gap: 12px !important;
}

@media (max-width: 768px) {
  .scroll-chip {
    min-width: 100px !important;
    max-width: 180px !important;
    padding: 10px 12px !important;
  }
  .chip-title {
    max-width: 120px;
  }
  .payment-method {
    padding: 14px !important;
    gap: 12px !important;
  }
  .method-icon {
    width: 46px !important;
    height: 46px !important;
  }
  .order-items {
    padding: 16px !important;
  }
  .order-item {
    padding: 14px !important;
    flex-wrap: wrap;
  }
  .footer-nav-link {
    font-size: 0.78rem !important;
    padding: 0.35rem 0;
  }
}

/* ============================================================
   Marketplace info section (v2.4)
   ============================================================ */
.marketplace-info {
  margin: 2.5rem 0;
  padding: 0 0.5rem;
}
.marketplace-info-inner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 45%, #f8fafb 100%);
  border: 1px solid rgba(0, 140, 105, 0.14);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 28px rgba(0, 140, 105, 0.08);
}
.marketplace-info-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.marketplace-info-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #008c69, #00a67e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 140, 105, 0.25);
}
.marketplace-info-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a202c;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}
.marketplace-info-lead {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.75;
}
.marketplace-info-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.marketplace-info-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 140, 105, 0.08);
  border-radius: 14px;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.65;
}
.marketplace-point-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 140, 105, 0.1);
  color: #008c69;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.marketplace-info-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 140, 105, 0.12);
}
.marketplace-info-tagline {
  margin: 0;
  font-weight: 700;
  color: #008c69;
  font-size: 0.95rem;
}
.marketplace-info-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #008c69;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}
.marketplace-info-cta:hover {
  background: #006e53;
  transform: translateY(-1px);
  color: #fff !important;
}

.marketplace-info--compact {
  margin: 0.75rem 0 0;
  padding: 0;
}
.marketplace-info--compact .marketplace-info-inner {
  padding: 1rem;
  border-radius: 14px;
  box-shadow: none;
}
.marketplace-info--compact .marketplace-info-points {
  gap: 0.55rem;
}
.marketplace-info--compact .marketplace-info-points li {
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 10px;
}
.marketplace-info--compact .marketplace-point-icon {
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
  border-radius: 8px;
}
.marketplace-info--compact .marketplace-info-footer {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  justify-content: center;
}
.marketplace-info--compact .marketplace-info-tagline {
  font-size: 0.82rem;
  text-align: center;
  width: 100%;
}

.home-wrapper .marketplace-info {
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 2rem;
}
.receipt-card .marketplace-info--compact {
  margin: 0.75rem 1rem 0;
}
.checkout-card .marketplace-info--compact {
  margin: 0 1.25rem 1rem;
}

@media (max-width: 768px) {
  .marketplace-info-inner {
    padding: 1.25rem 1rem;
    border-radius: 16px;
  }
  .marketplace-info-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .marketplace-info-title {
    font-size: 1.05rem;
  }
  .marketplace-info-lead {
    font-size: 0.88rem;
  }
  .marketplace-info-points li {
    font-size: 0.84rem;
  }
  .marketplace-info-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .marketplace-info-cta {
    justify-content: center;
  }
}
