/* ════════════════════════════════════════════════════════════
   Pansari Direct–inspired header & footer (professional grocery UI)
   Reference: https://pansaridirect.com/
   ════════════════════════════════════════════════════════════ */

/* ── Top strip ── */
.pd-topstrip {
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.78rem;
  color: #374151;
}
.pd-topstrip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  flex-wrap: wrap;
}
.pd-topstrip-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pd-topstrip-links a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  padding: 2px 4px;
  transition: color 0.2s;
}
.pd-topstrip-links a:hover { color: var(--sp-premium-forest, #3D6B1E); }
.pd-topstrip-dot {
  color: #9ca3af;
  user-select: none;
}
.pd-topstrip-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.pd-topstrip-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--sp-premium-forest, #3D6B1E);
  text-decoration: none;
}
.pd-topstrip-phone i { font-size: 0.85rem; }
.pd-topstrip-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #374151;
  text-decoration: none;
  font-weight: 600;
}
.pd-topstrip-action:hover { color: var(--sp-premium-forest, #3D6B1E); }
.pd-topstrip-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.pd-topstrip-auth a {
  color: #111827;
  text-decoration: none;
}
.pd-topstrip-auth a:hover { color: var(--sp-premium-forest, #3D6B1E); }
.pd-topstrip-auth .pd-auth-sep { color: #9ca3af; font-weight: 400; }

/* ── Savings ribbon ── */
.pd-savings-bar {
  background: linear-gradient(90deg, #3D6B1E, #2D5016);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pd-savings-bar strong {
  color: #B8E04A;
  margin-right: 6px;
}

/* ── Main header (Pansari Direct layout) ── */
.pd-header-main {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 560px) 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
}
.pd-header-logo {
  justify-self: start;
}
.pd-header-search {
  justify-self: center;
  width: 100%;
  max-width: 560px;
}
.pd-header-actions {
  justify-self: end;
}
.pd-header-logo img {
  height: 58px;
  width: auto;
  display: block;
}
.pd-header-search .search-box {
  max-width: 100%;
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}
.pd-header-search .search-box:focus-within {
  border-color: var(--sp-premium-gold, #9ACD32);
  box-shadow: 0 0 0 3px rgba(154, 205, 50, 0.2);
}
.pd-header-search .search-box input {
  padding: 12px 16px;
  font-size: 0.92rem;
}
.pd-header-search .search-box button {
  background: var(--sp-premium-forest, #3D6B1E) !important;
  border-radius: 0 6px 6px 0 !important;
  padding: 0 20px !important;
}
.pd-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-header-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 72px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.pd-header-pill i {
  font-size: 1.15rem;
  color: var(--sp-premium-forest, #3D6B1E);
}
.pd-header-pill:hover {
  border-color: var(--sp-premium-gold, #9ACD32);
  box-shadow: 0 4px 14px rgba(61, 107, 30, 0.1);
  color: #111827;
}
.pd-header-pill.pd-cart-pill {
  background: var(--sp-premium-forest, #3D6B1E);
  border-color: var(--sp-premium-forest, #3D6B1E);
  color: #fff;
  min-width: 88px;
}
.pd-header-pill.pd-cart-pill i { color: #fff; }
.pd-header-pill .pd-pill-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
  z-index: 2;
}
.pd-header-pill .pd-pill-text {
  white-space: nowrap;
}
.pd-header-user {
  border: none;
  background: transparent;
  cursor: pointer;
}
.pd-mobile-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 1.1rem;
}

/* ── Category ribbon (horizontal scroll) ── */
.pd-cat-ribbon-wrap {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}
.pd-cat-ribbon {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 12px 4px 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pd-cat-ribbon::-webkit-scrollbar { display: none; }
.pd-cat-ribbon-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 88px;
  text-decoration: none !important;
  color: #374151;
  transition: transform 0.2s;
}
.pd-cat-ribbon-item:hover {
  transform: translateY(-3px);
  color: var(--sp-premium-forest, #3D6B1E);
}
.pd-cat-ribbon-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #f3f4f6;
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-cat-ribbon-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-cat-ribbon-img i {
  font-size: 1.4rem;
  color: var(--sp-premium-forest, #3D6B1E);
}
.pd-cat-ribbon-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  max-width: 94px;
  color: #1f2937;
}

/* Hide legacy nav when pd layout active */
.pd-layout .header-nav { display: none !important; }
.pd-layout .sp-topbar,
.pd-layout .sp-marquee-bar,
.pd-layout .ann-bar { display: none !important; }

/* ── Footer (Pansari Direct style) ── */
.pd-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  margin-top: 48px;
}
.pd-footer-features {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 28px 0;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f9fafb, #fff);
}
.pd-footer-feature {
  text-align: center;
  padding: 8px 6px;
}
.pd-footer-feature i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #F4FAEB;
  color: var(--sp-premium-forest, #3D6B1E);
  font-size: 1.1rem;
}
.pd-footer-feature strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pd-footer-main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 40px 0 32px;
}
.pd-footer-col h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #111827;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--sp-premium-gold, #9ACD32);
  display: inline-block;
}
.pd-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pd-footer-col ul li { margin-bottom: 10px; }
.pd-footer-col ul a {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.pd-footer-col ul a:hover { color: var(--sp-premium-forest, #3D6B1E); }
.pd-footer-contact-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: #4b5563;
}
.pd-footer-contact-line i {
  color: var(--sp-premium-forest, #3D6B1E);
  margin-top: 3px;
  width: 18px;
}
.pd-footer-contact-line a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.pd-footer-app-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.pd-footer-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform 0.2s;
}
.pd-footer-app-btn:hover {
  color: #fff;
  transform: translateY(-2px);
}
.pd-footer-app-btn i { font-size: 1.4rem; }
.pd-footer-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.pd-footer-loc-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.pd-footer-bottom {
  border-top: 1px solid #e5e7eb;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6b7280;
}
.pd-footer-bottom a {
  color: #4b5563;
  text-decoration: none;
}
.pd-footer-bottom a:hover { color: var(--sp-premium-forest, #3D6B1E); }
.pd-footer-pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0 0;
}
.pd-footer-pay-row span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
}
.pd-footer-pay-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-footer-pay-icons i {
  font-size: 1.5rem;
  color: #6b7280;
}

/* Override dark jp-foot when using pd-footer */
.site-footer.jp-foot.pd-footer {
  background: #fff !important;
  color: #374151 !important;
}
.site-footer.pd-footer .jp-foot-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site-footer.pd-footer .jp-foot-glow,
.site-footer.pd-footer .jp-foot-top,
.site-footer.pd-footer .jp-foot-newsletter,
.site-footer.pd-footer .jp-foot-trust,
.site-footer.pd-footer .jp-foot-pay,
.site-footer.pd-footer .jp-foot-bottom { display: none !important; }

@media (max-width: 991px) {
  .pd-header-main {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 12px 0;
  }
  .pd-header-search { display: none !important; }
  .pd-header-pill span.pd-pill-text { display: none; }
  .pd-header-pill { min-width: 44px; padding: 10px; }
  .pd-footer-features { grid-template-columns: repeat(3, 1fr); }
  .pd-footer-main { grid-template-columns: 1fr 1fr; gap: 24px; }
  .pd-topstrip-links { display: none; }
}
@media (max-width: 575px) {
  .pd-footer-features { grid-template-columns: repeat(2, 1fr); }
  .pd-footer-main { grid-template-columns: 1fr; }
  .pd-cat-ribbon-item { width: 76px; }
  .pd-cat-ribbon-img { width: 56px; height: 56px; }
}
