/**
 * Pansari Direct–style homepage sections
 */

/* ── Pincode bar ── */
.hp-pd-pincode {
  padding: 0 0 16px;
}

.hp-pd-pincode-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f7f0 0%, #e8f5e9 100%);
  border: 1px solid rgba(46, 125, 50, 0.12);
}

.hp-pd-pincode-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #2E7D32;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hp-pd-pincode-copy {
  flex: 1 1 180px;
  min-width: 0;
}

.hp-pd-pincode-copy strong {
  display: block;
  font-size: 0.875rem;
  color: #111827;
}

.hp-pd-pincode-copy span {
  font-size: 0.75rem;
  color: #6b7280;
}

.hp-pd-pincode-input-wrap {
  display: flex;
  gap: 8px;
  flex: 1 1 240px;
}

.hp-pd-pincode-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.875rem;
}

.hp-pd-pincode-btn {
  border: none;
  border-radius: 10px;
  background: #2E7D32;
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
}

.hp-pd-pincode-msg {
  width: 100%;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.hp-pd-pincode-msg.is-success { color: #15803d; }
.hp-pd-pincode-msg.is-error { color: #b91c1c; }

/* Offers service bar styles → assets/css/offers-deals.css */

/* ── Product section rows ── */
.hp-pd-section {
  padding: 8px 0 24px;
}

.hp-pd-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hp-pd-section-titles h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
}

.hp-pd-section-titles p {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.hp-pd-view-more {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #2E7D32;
  text-decoration: none;
  white-space: nowrap;
}

.hp-pd-view-more:hover {
  color: #1B5E20;
}

.hp-pd-row-wrap {
  position: relative;
}

.hp-pd-row-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hp-pd-row-track::-webkit-scrollbar {
  display: none;
}

.hp-pd-row-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #111827;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.hp-pd-row-prev { left: -8px; }
.hp-pd-row-next { right: -8px; }

/* ── Compact product card ── */
.hp-pd-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eef0ee;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hp-pd-card-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hp-pd-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f9fafb;
  overflow: hidden;
}

.hp-pd-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.hp-pd-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  background: #E53935;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
}

.hp-pd-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 2rem;
}

.hp-pd-card-body {
  padding: 10px 10px 6px;
  flex: 1;
}

.hp-pd-card-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.hp-pd-card-weight {
  margin-top: 4px;
  font-size: 0.6875rem;
  color: #6b7280;
  font-weight: 600;
}

.hp-pd-card-price {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.hp-pd-price-now {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #111827;
}

.hp-pd-price-was {
  font-size: 0.6875rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.hp-pd-card-meta {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.625rem;
  color: #6b7280;
}

.hp-pd-save {
  color: #15803d;
  font-weight: 700;
}

.hp-pd-card-cart {
  margin: 0;
  padding: 0 8px 8px;
}

.hp-pd-add-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: #2E7D32;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 9px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hp-pd-add-btn:hover {
  background: #1B5E20;
}

/* ── Trust strip ── */
.hp-pd-trust {
  padding: 24px 0 32px;
  background: linear-gradient(180deg, #f8faf8 0%, #fff 100%);
}

.hp-pd-trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hp-pd-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eef0ee;
}

.hp-pd-trust-item i {
  color: #2E7D32;
  font-size: 1.125rem;
  margin-top: 2px;
}

.hp-pd-trust-item strong {
  display: block;
  font-size: 0.8125rem;
  color: #111827;
}

.hp-pd-section-alt {
  background: linear-gradient(180deg, #fafbfa 0%, #fff 100%);
  padding-top: 16px;
  padding-bottom: 28px;
}

.sp-premium-save {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #15803d;
  margin-top: 2px;
}

.sdp-save-row {
  font-size: 0.8125rem;
  color: #15803d;
  font-weight: 600;
  margin-top: 4px;
}

.sp-mobile-search-wrap {
  position: relative;
}

/* ── Live search dropdown ── */
.pd-live-search-wrap {
  position: relative;
}

.pd-live-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12000;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.15);
  border: 1px solid #e5e7eb;
  max-height: 380px;
  overflow-y: auto;
  display: none;
}

.pd-live-search-results.is-open {
  display: block;
}

.pd-live-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f3f4f6;
}

.pd-live-search-item:hover {
  background: #f0f7f0;
}

.pd-live-search-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #f9fafb;
  flex-shrink: 0;
}

.pd-live-search-item strong {
  display: block;
  font-size: 0.8125rem;
  color: #111827;
}

.pd-live-search-item span {
  font-size: 0.75rem;
  color: #2E7D32;
  font-weight: 700;
}

.pd-live-search-empty {
  padding: 16px;
  text-align: center;
  color: #6b7280;
  font-size: 0.8125rem;
}

/* ── Desktop ── */
@media (min-width: 768px) {
  .hp-pd-card {
    flex: 0 0 200px;
  }

  .hp-pd-section-titles h2 {
    font-size: 1.375rem;
  }

  .hp-pd-trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .hp-pd-row-nav {
    display: flex;
  }

  .hp-pd-row-track {
    gap: 16px;
  }

  .hp-pd-card {
    flex: 0 0 220px;
  }

  .hp-pd-trust-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .hp-pd-trust-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 575px) {
  .hp-pd-pincode-form {
    flex-direction: column;
    align-items: stretch;
  }

  .hp-pd-pincode-input-wrap {
    width: 100%;
  }
}
