/*
 * Ad Card — LOCKED DESIGN
 * Matches the provided design image exactly.
 * Do NOT modify layout properties.
 *
 * Structure:
 *   .ad-h-card
 *     .ad-h-logo-col   ← LEFT:  circular logo + platform name
 *     .ad-h-body       ← MIDDLE: title, desc, socials, See More button
 *     .ad-h-gallery    ← RIGHT:  animated image slider with arrows
 */

/* ── Outer wrapper ──────────────────────────────── */
.ad-h-card {
  background: #ffffff !important;
  border: 1px solid #e8e3dc !important;
  border-radius: 20px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  overflow: hidden !important;
  min-height: 240px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.04) !important;
  transition: box-shadow .2s, transform .15s !important;
  width: 100% !important;
}
.ad-h-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.09) !important;
  transform: translateY(-2px) !important;
}
.ad-h-card.vip {
  border: 1.5px solid #2E76FF !important;
  box-shadow: 0 4px 20px rgba(46,118,255,.15);
}

/* ── LEFT: Logo column ──────────────────────────── */
.ad-h-logo-col {
  width: 180px !important;
  min-width: 180px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 28px 20px !important;
  background: #F8FAFC !important;
  border-left: 1px solid #EFF6FF !important;
}
.ad-h-logo {
  width: 110px !important;
  height: 110px !important;
  border-radius: 50% !important;
  border: 2px solid #2E76FF !important;
  background: #f5ede0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  color: #8c7b6b !important;
  flex-shrink: 0 !important;
}
.ad-h-logo img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.ad-h-platform { display: none !important; }  /* FIX 3: removed "Social Mall" text */

/* ── MIDDLE: Body column ────────────────────────── */
.ad-h-body {
  flex: 1 !important;
  padding: 28px 32px !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  border-right: 1px solid #EFF6FF !important;
}
.ad-h-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  line-height: 1.25 !important;
  margin-bottom: 5px !important;
  display: block !important;
  text-decoration: none !important;
}
.ad-h-title:hover { color: var(--primary) !important; }
.ad-h-tagline { font-size: 14px !important; color: #9c8c74 !important; margin-bottom: 12px !important; }
.ad-h-divider {
  border: none !important;
  border-top: 1px solid #e8e3dc !important;
  margin-bottom: 12px !important;
}
.ad-h-desc {
  font-size: 14px !important;
  color: #4a4a4a !important;
  line-height: 1.75 !important;
  margin-bottom: 18px !important;
  flex: 1 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.ad-h-socials {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-bottom: 16px !important;
}
.soc-circle {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 17px !important;
  border: 1.5px solid #e5e5e5 !important;
  transition: all .18s ease !important;
  text-decoration: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}
.soc-circle:hover { transform: scale(1.12) !important; }
.soc-fb  { color: #1877F2 !important; background: #f0f4ff !important; }
.soc-fb:hover  { background: #1877F2 !important; color: #fff !important; }
.soc-ig  { color: #E1306C !important; background: #fff0f5 !important; }
.soc-ig:hover  { background: #E1306C !important; color: #fff !important; }
.soc-wa  { color: #25D366 !important; background: #f0faf4 !important; }
.soc-wa:hover  { background: #25D366 !important; color: #fff !important; }
.soc-web { color: var(--primary) !important; background: var(--primary-50) !important; }
.soc-web:hover { background: var(--primary) !important; color: #fff !important; }
.ad-h-phone {
  font-size: 14px !important;
  color: #3a3a3a !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}
.ad-h-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: auto !important;
}
.ad-h-meta {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  font-size: 12px !important;
  color: #94A3B8 !important;
}
.btn-see-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #2E76FF !important;
  color: #ffffff !important;
  padding: 11px 24px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: 'Cairo', sans-serif !important;
  text-decoration: none !important;
  transition: all .18s !important;
  white-space: nowrap !important;
  border: none !important;
  cursor: pointer !important;
}
.btn-see-more:hover { background: #333322 !important; transform: translateX(-3px) !important; }

/* ── RIGHT: Gallery column ──────────────────────── */
.ad-h-gallery {
  width: 360px !important;
  min-width: 360px !important;
  flex-shrink: 0 !important;
  background: #EFF6FF !important;
  position: relative !important;
  overflow: hidden !important;
}
.ad-h-img-wrap {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 240px !important;
}
.ad-slide {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: opacity .4s ease !important;
}
.ad-h-img-placeholder {
  width: 100% !important;
  height: 100% !important;
  min-height: 240px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 56px !important;
  color: #c5bbb0 !important;
}
.gallery-prev, .gallery-next {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 40px !important;
  height: 40px !important;
  background: rgba(255,255,255,.92) !important;
  border: none !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 13px !important;
  color: #333 !important;
  z-index: 5 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.18) !important;
  transition: all .15s !important;
}
.gallery-prev:hover, .gallery-next:hover {
  background: #fff !important;
  transform: translateY(-50%) scale(1.08) !important;
}
.gallery-prev { right: 12px !important; }
.gallery-next { left: 12px !important; }
.gallery-counter {
  position: absolute !important;
  bottom: 14px !important;
  left: 14px !important;
  background: rgba(30,30,30,.78) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 5px 14px !important;
  border-radius: 22px !important;
  z-index: 5 !important;
  white-space: nowrap !important;
}
.gallery-dots {
  position: absolute !important;
  bottom: 48px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  gap: 5px !important;
  z-index: 5 !important;
}
.gallery-dot {
  width: 6px !important; height: 6px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.5) !important;
  cursor: pointer !important;
  transition: all .2s !important;
}
.gallery-dot.active { background: #fff !important; width: 18px !important; border-radius: 3px !important; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .ad-h-gallery { width: 280px !important; min-width: 280px !important; }
  .ad-h-logo-col { width: 150px !important; min-width: 150px !important; }
}

/* ═══════════════════════════════════════════════════════
   MOBILE — Vertical card — CLEAN FLOW, NO OVERLAP
   ──────────────────────────────────────────────────────
   Structure:
   [Gallery 240px]
   [Logo centered — pulls up with negative margin]
   [Store Name — centered, full width]
   [Category badge]
   [Tagline]
   [Divider]
   [Description 3 lines]
   [Social icons]
   [View Button]
   [Rating footer]
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  .ad-cards-list { gap: 20px !important; }

  /* ── Card: simple column, clipped ── */
  .ad-h-card {
    flex-direction: column !important;
    min-height: unset !important;
    max-height: unset !important;
    border-radius: 20px !important;
    overflow: hidden !important;       /* clip everything inside */
    width: 100% !important;
    box-shadow: 0 4px 20px rgba(46,118,255,.10), 0 1px 6px rgba(0,0,0,.06) !important;
    border: 1px solid #E2E8F0 !important;
    position: static !important;       /* NO relative — no absolute children */
  }
  .ad-h-card::before { display: none !important; }

  /* ── Gallery: top full-width image ── */
  .ad-h-gallery {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 220px !important;
    order: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
    margin-bottom: 0 !important;
  }
  .ad-h-img-wrap {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
  }
  .ad-slide {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    object-fit: cover !important;
  }
  .ad-h-img-placeholder {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    font-size: 48px !important;
    background: #EEF4FF !important;
    color: #93BBFD !important;
  }

  /* Arrows */
  .gallery-prev, .gallery-next {
    display: flex !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
    background: rgba(255,255,255,.9) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
    z-index: 5 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  .gallery-prev { right: 10px !important; left: auto !important; }
  .gallery-next { left: 10px !important; right: auto !important; }
  .gallery-dots { display: flex !important; bottom: 10px !important; }
  .gallery-counter { display: none !important; }

  /* ── Logo column: IN FLOW, centered, negative margin pulls it up ── */
  .ad-h-logo-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: static !important;       /* back in normal flow */
    float: none !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: -40px 0 8px 0 !important;  /* pull up 40px into gallery */
    order: 1 !important;
    z-index: 10 !important;
    background: transparent !important;
    border: none !important;
    gap: 0 !important;
  }
  .ad-h-logo {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    border: 4px solid #fff !important;
    background: #EEF4FF !important;
    color: #2E76FF !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.18) !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .ad-h-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
  }
  .ad-h-platform { display: none !important; }
  .vip-badge-sm  { display: none !important; }

  /* ── Body: all text content below logo ── */
  .ad-h-body {
    flex: unset !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 16px 16px !important;
    border-right: none !important;
    border-left: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;     /* center all children */
    overflow: visible !important;
    box-sizing: border-box !important;
    background: #fff !important;
    order: 2 !important;
  }

  /* Store name — centered, full width, NO padding-right */
  .ad-h-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1E293B !important;
    margin-bottom: 6px !important;
    line-height: 1.35 !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    padding: 0 !important;             /* NO side padding — logo is above, not beside */
    white-space: normal !important;
    overflow: visible !important;
    word-break: break-word !important;
  }

  /* Category badge — centered */
  .ad-h-cats {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }
  .ad-cat-badge {
    font-size: 12px !important;
    padding: 3px 12px !important;
    white-space: nowrap !important;
  }

  /* Tagline — centered, full width, NO side padding */
  .ad-h-tagline {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    text-align: center !important;
    margin-bottom: 8px !important;
    white-space: normal !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    width: 100% !important;
  }

  /* Divider */
  .ad-h-divider {
    margin: 8px 0 !important;
    width: 100% !important;
  }

  /* Description — 3 lines, centered */
  .ad-h-desc {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 12px !important;
    color: #475569 !important;
    line-height: 1.65 !important;
    text-align: center !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Social icons — centered row */
  .ad-h-socials {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 14px !important;
    align-items: center !important;
    width: 100% !important;
  }
  .soc-circle {
    width: 48px !important;
    height: 48px !important;
    font-size: 18px !important;
    border-radius: 50% !important;
    min-height: unset !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 7px rgba(0,0,0,.1) !important;
  }
  .ad-h-phone {
    font-size: 13px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    width: 100% !important;
  }

  /* View Store button — full width blue */
  .btn-see-more {
    width: 100% !important;
    justify-content: center !important;
    background: #2E76FF !important;
    color: #fff !important;
    padding: 13px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 13px !important;
    box-shadow: 0 4px 14px rgba(46,118,255,.3) !important;
    margin-bottom: 12px !important;
    gap: 8px !important;
    display: flex !important;
  }
  .btn-see-more:hover { background: #1F5FE0 !important; }

  /* Footer: rating + views + city — centered */
  .ad-h-footer {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 0 !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }
  .ad-h-meta {
    font-size: 12px !important;
    gap: 10px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    color: #64748B !important;
  }
  .ad-h-stars { font-size: 15px !important; color: #F59E0B !important; }
}

/* ── iPhone SE & very small (≤390px) ─────────────────── */
@media (max-width: 390px) {
  .ad-h-gallery, .ad-h-img-wrap { height: 190px !important; min-height: 190px !important; }
  .ad-slide { height: 190px !important; min-height: 190px !important; }
  .ad-h-logo { width: 70px !important; height: 70px !important; }
  .ad-h-logo-col { margin: -35px 0 6px 0 !important; }
  .ad-h-title { font-size: 16px !important; }
  .soc-circle { width: 42px !important; height: 42px !important; font-size: 16px !important; }
  .btn-see-more { font-size: 14px !important; }
}

/* ── 320px (iPhone 3G) ───────────────────────────────── */
@media (max-width: 320px) {
  .ad-h-gallery, .ad-h-img-wrap { height: 170px !important; min-height: 170px !important; }
  .ad-slide { height: 170px !important; }
  .ad-h-logo { width: 62px !important; height: 62px !important; }
  .ad-h-logo-col { margin: -31px 0 6px 0 !important; }
  .ad-h-title { font-size: 15px !important; }
  .soc-circle { width: 38px !important; height: 38px !important; font-size: 15px !important; }
  .ad-h-body { padding: 0 12px 12px !important; }
}

/* ── Snapchat & YouTube circles ───────────────────────── */
.soc-snap { color: #FF0066 !important; background: #fff0f5 !important; border-color: #ffd0e0 !important; }
.soc-snap:hover { background: #FF0066 !important; color: #fff !important; border-color: #FF0066 !important; }
.soc-yt   { color: #FF0000 !important; background: #fff0f0 !important; border-color: #ffd0d0 !important; }
.soc-yt:hover   { background: #FF0000 !important; color: #fff !important; border-color: #FF0000 !important; }
