/* Retailer Pakistani — Static Site Responsive & Component Overrides */

html, body {
  overflow-x: clip;
  max-width: 100%;
}

img, iframe, video, embed, object {
  max-width: 100%;
}

/* ---- Header & Navigation Responsiveness ---- */
#main_header .logo_image img {
  height: auto;
  max-height: 76px;
  width: auto;
}

#main_header .top_menu ul.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

#main_header .top_menu ul.menu > li > a {
  white-space: nowrap;
}

/* Mobile header bar (<= 1024px) */
@media (max-width: 1024px) {
  #main_header .logo_section_wrap.hideontablet {
    display: none !important;
  }
  #main_header nav.top_menu {
    display: none !important;
  }
  #main_header .responsive_nav_wrap.rh_mobile_menu {
    display: block !important;
    padding: 10px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
  }
  #main_header .dl-menuwrapper {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }
  #main_header .rp-mobile-logo {
    display: inline-flex;
    align-items: center;
    margin-right: auto;
    margin-left: 8px;
  }
  #main_header .rp-mobile-logo img {
    max-height: 40px;
    width: auto;
  }
  #main_header #dl-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    padding: 8px;
  }
  #main_header #dl-trigger svg {
    width: 24px;
    height: 24px;
    stroke: #111827;
    stroke-width: 2.4;
  }
  #main_header #mobile-menu-icons .icon-search-onclick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
  }
}

@media (min-width: 1025px) {
  #main_header .rp-mobile-logo {
    display: none !important;
  }
}

/* Mobile Slide-in Navigation Drawer */
.rp-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.rp-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.rp-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(310px, 84vw);
  background: #111827;
  color: #ffffff;
  z-index: 99991;
  transform: translateX(-100%);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}
.rp-drawer.is-open {
  transform: translateX(0);
}
.rp-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.rp-drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}
.rp-drawer-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.rp-drawer-nav {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}
.rp-drawer-nav li {
  margin: 0;
}
.rp-drawer-nav a {
  display: block;
  padding: 13px 20px;
  color: #f3f4f6;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rp-drawer-nav a:hover,
.rp-drawer-nav a[aria-current="page"] {
  background: #8035be;
  color: #ffffff;
}

/* Mobile Search Bar Overlay */
.rp-mobile-search {
  display: none;
  padding: 10px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.rp-mobile-search.is-open {
  display: block;
}
.rp-mobile-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

/* Live Search Results Dropdown */
.re-aj-search-wrap.is-open,
.rp-search-results {
  display: block !important;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  z-index: 9999;
  max-height: 360px;
  overflow-y: auto;
}
.rp-search-item {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  color: #111827;
}
.rp-search-item:hover {
  background: #f5f3ff;
  color: #8035be;
}
.rp-search-item-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.rp-search-item-meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* ---- Responsive Footer ---- */
.footer-bottom.dark_style {
  background: #111111 !important;
  color: #e5e7eb;
  padding: 44px 0 0;
  margin-top: 36px;
}
.rp-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 0 15px 36px;
}
@media (max-width: 960px) {
  .rp-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}
@media (max-width: 580px) {
  .rp-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.rp-footer-col h3 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #8035be;
  display: inline-block;
}
.rp-footer-col p {
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 10px;
}
.rp-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rp-footer-links li {
  margin: 0 0 8px;
}
.rp-footer-links a {
  color: #d1d5db !important;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}
.rp-footer-links a:hover {
  color: #c084fc !important;
}
.rp-footer-bar {
  background: #080808;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 15px;
  font-size: 13px;
  color: #9ca3af;
}
.rp-footer-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rp-footer-bar a {
  color: #d1d5db;
  text-decoration: none;
}
.rp-footer-bar a:hover {
  color: #ffffff;
}

/* ---- Homepage News & Magazine Grids ---- */
.rp-news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0 24px;
}
.rp-news-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.rp-news-card:hover {
  border-color: #c084fc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.rp-news-thumb {
  width: 96px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
}
.rp-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rp-news-body {
  min-width: 0;
  flex: 1;
}
.rp-news-body h4 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}
.rp-news-body h4 a {
  color: #111827;
  text-decoration: none;
}
.rp-news-body h4 a:hover {
  color: #8035be;
}
.rp-news-date {
  font-size: 12px;
  color: #6b7280;
}

/* Magazine Grid */
.rp-mag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin: 20px 0 28px;
}
.rp-mag-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.rp-mag-cover {
  display: block;
  aspect-ratio: 3 / 4;
  background: #f3f4f6;
  overflow: hidden;
}
.rp-mag-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rp-mag-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.rp-mag-info h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #111827;
}
.rp-mag-meta {
  font-size: 13px;
  color: #6b7280;
}
.rp-mag-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}
.rp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  border: 0;
  transition: background 0.15s ease;
}
.rp-btn-primary {
  background: #8035be;
  color: #ffffff !important;
}
.rp-btn-primary:hover {
  background: #6b21a8;
}
.rp-btn-secondary {
  background: #111827;
  color: #ffffff !important;
}
.rp-btn-secondary:hover {
  background: #374151;
}

/* PDF Viewer Box on Magazine Detail Pages */
.rp-pdf-viewer {
  margin: 18px 0 28px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f9fafb;
}
.rp-pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #111827;
  color: #ffffff;
}
.rp-pdf-frame {
  width: 100%;
  height: 760px;
  border: 0;
  display: block;
}
@media (max-width: 768px) {
  .rp-pdf-frame {
    height: 480px;
  }
}

/* Directory Cards & Categories */
.rp-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0 28px;
}
.rp-dir-card {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}
.rp-dir-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #111827;
}
.rp-dir-card p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}
.rp-callout {
  padding: 20px;
  border-radius: 10px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  margin: 20px 0;
}

/* Forms (Contact Us & Add Listing) */
.rp-form {
  max-width: 680px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 22px;
  margin: 16px 0 28px;
}
.rp-form-row {
  margin-bottom: 14px;
}
.rp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 640px) {
  .rp-form-grid {
    grid-template-columns: 1fr;
  }
}
.rp-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}
.rp-form input[type="text"],
.rp-form input[type="email"],
.rp-form input[type="tel"],
.rp-form input[type="url"],
.rp-form input[type="number"],
.rp-form select,
.rp-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background: #ffffff;
  color: #111827;
}
.rp-form input:focus,
.rp-form select:focus,
.rp-form textarea:focus {
  outline: none;
  border-color: #8035be;
  box-shadow: 0 0 0 3px rgba(128, 53, 190, 0.15);
}
.rp-captcha-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.rp-captcha-box input {
  width: 110px !important;
}
.rp-form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}
.rp-form-status.is-success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.rp-form-status.is-error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ---- Full-width boxed page body (sidebar removed) ---- */
.sidebar,
aside.sidebar {
  display: none !important;
}
.rh-content-wrap .main-side,
.main-side {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
.vc_row,
.vc_column_container,
.vc_column-inner,
.wpb_wrapper {
  box-sizing: border-box !important;
  min-width: 0;
}
.vc_column_container img,
.wpb_single_image img,
.wpb_wrapper img {
  max-width: 100% !important;
  height: auto !important;
}
.wpb_single_image .vc_single_image-wrapper {
  max-width: 100% !important;
  display: block;
}

/* Mobile Layout Adjustments for Visual Composer & ReHub Content */
@media (max-width: 768px) {
  .rh-content-wrap,
  .rh-container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }
  .vc_col-sm-8,
  .vc_col-sm-4,
  .vc_col-sm-6,
  .main-side,
  .sidebar {
    width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
