/**
 * Mobile Beauty Layer — attractive UI, fixes clutter & tap targets
 * Loads last · overrides conflicts with higher specificity (no extra !important where possible)
 */

@media (max-width: 991px) {
  /* ── Cleaner mobile header (cart lives in bottom nav) ── */
  body.pd-layout .pd-header-actions .pd-cart-pill {
    display: none;
  }

  body.pd-layout .pd-header-main {
    grid-template-columns: auto 1fr auto;
    gap: 6px;
    padding: 10px 0;
  }

  body.pd-layout .pd-header-logo img {
    height: 44px;
    width: auto;
  }

  body.pd-layout .pd-header-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  body.pd-layout .pd-mobile-toggle,
  body.pd-layout .pd-header-actions .pd-header-pill:not(.pd-cart-pill) {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #dce8d0;
    background: linear-gradient(180deg, #fafdf7 0%, #f0f7ea 100%);
    box-shadow: 0 2px 8px rgba(61, 107, 30, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.pd-layout .pd-mobile-toggle i,
  body.pd-layout .pd-header-actions .pd-header-pill i {
    font-size: 1.05rem;
    color: var(--ds-forest, #3D6B1E);
    margin: 0;
  }

  body.pd-layout .pd-site-header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 #eef3e8, 0 4px 20px rgba(17, 24, 39, 0.04);
  }

  body.pd-layout .pd-savings-bar {
    background: linear-gradient(90deg, #2D5016, #3D6B1E 50%, #2D5016);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 9px 14px;
  }

  body.pd-layout .pd-savings-bar strong {
    color: #c5f052;
  }

  /* ── Category chips — bigger, prettier ── */
  body.pd-layout .hp-cat-chip {
    min-height: 44px;
    padding: 10px 16px 10px 10px;
    font-size: 0.8125rem;
    border: 1px solid #dce8d0;
    background: linear-gradient(180deg, #fff 0%, #f8fbf4 100%);
    box-shadow: 0 2px 10px rgba(61, 107, 30, 0.07);
    gap: 10px;
  }

  body.pd-layout .hp-cat-chip i {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #ecfccb, #d9f99d);
    color: var(--ds-forest, #3D6B1E);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  body.pd-layout .pd-mobile-cat-strip {
    padding: 10px 14px 12px;
    background: linear-gradient(180deg, #fff 0%, #f8fbf4 100%);
    border-bottom: 1px solid #e8f0df;
  }

  /* ── Bottom nav — readable labels ── */
  body.pd-layout .sanju-bottom-nav .bottom-nav-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  body.pd-layout .sanju-bottom-nav .bottom-nav-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  body.pd-layout .sanju-bottom-nav.bottom-nav {
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e8f0df;
    box-shadow: 0 -8px 32px rgba(17, 24, 39, 0.07);
  }

  body.pd-layout .sanju-bottom-nav .bottom-nav-item.active .bottom-nav-icon-wrap {
    background: linear-gradient(145deg, rgba(197, 240, 82, 0.35), rgba(61, 107, 30, 0.12));
    box-shadow: inset 0 0 0 1.5px rgba(154, 205, 50, 0.5);
  }

  body.pd-layout .sanju-bottom-nav .bottom-nav-shop .bottom-nav-icon-shop {
    background: linear-gradient(145deg, #b8e04a 0%, #3D6B1E 100%);
    box-shadow:
      0 10px 24px rgba(61, 107, 30, 0.35),
      0 0 0 4px #fff;
  }

  /* Product grid without !important (specificity win) ── */
  body.pd-layout .product-grid,
  body.pd-layout .products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  body.pd-layout .sp-premium-card {
    border-radius: 18px;
    border-color: #e8f0df;
    overflow: hidden;
  }

  body.pd-layout .sp-premium-card-media {
    background: linear-gradient(180deg, #f8fbf4 0%, #fff 100%);
  }

  body.pd-layout .sp-premium-add {
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.65rem;
  }
}

/* ── Homepage beauty ── */
@media (max-width: 991px) {
  body.page-home .hero-swiper {
    border-radius: 0 0 24px 24px;
    box-shadow: 0 16px 40px rgba(45, 80, 22, 0.15);
  }

  body.page-home .slide-tag {
    background: rgba(197, 240, 82, 0.2);
    border-color: rgba(197, 240, 82, 0.35);
    color: #ecfccb;
    font-size: 0.65rem;
  }

  body.page-home .slide-buttons .btn-primary {
    background: linear-gradient(135deg, #b8e04a 0%, #3D6B1E 100%);
    box-shadow: 0 8px 28px rgba(61, 107, 30, 0.4);
    font-size: 0.9375rem;
    border-radius: 14px;
  }

  body.page-home .slide-buttons .btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.45);
    border-radius: 14px;
  }

  /* Trust bar — card strip */
  body.page-home .hp-trust-bar {
    margin: 16px 14px 8px;
    padding: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f4faeb 100%);
    border: 1px solid #dce8d0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(61, 107, 30, 0.08);
    gap: 10px;
  }

  body.page-home .hp-trust-pill {
    min-height: 44px;
    padding: 8px 14px 8px 8px;
    font-size: 0.8125rem;
    border-color: #e8f0df;
    background: #fff;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.04);
    gap: 10px;
  }

  body.page-home .hp-trust-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(145deg, #ecfccb, #bbf7d0);
    color: var(--ds-forest, #3D6B1E);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
  }

  /* Quick tiles */
  body.page-home .sp-hero-tiles {
    margin: 12px 0 24px;
    padding: 0 14px 6px;
  }

  body.page-home .sp-hero-tile {
    border-radius: 18px;
    border-color: #e8f0df;
    background: linear-gradient(180deg, #fff 0%, #f8fbf4 100%);
    box-shadow: 0 4px 16px rgba(61, 107, 30, 0.08);
    min-height: 108px;
    padding: 14px 10px;
  }

  body.page-home .sp-hero-tile i {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ecfccb, #d9f99d);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.15rem;
    color: var(--ds-forest, #3D6B1E);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  body.page-home .sp-hero-tile strong {
    font-size: 0.78rem;
    color: var(--ds-ink, #111827);
  }

  /* Section headers */
  body.page-home .sp-section-eyebrow {
    color: var(--ds-forest, #3D6B1E);
    background: linear-gradient(135deg, #ecfccb, #dcfce7);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  body.page-home .sp-section-title {
    position: relative;
    padding-bottom: 10px;
  }

  body.page-home .sp-section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #9ACD32, #3D6B1E);
  }

  body.page-home .sp-section-row .sp-section-title::after {
    left: 0;
    transform: none;
  }

  body.page-home .sp-view-all {
    background: #fff;
    border: 1px solid #dce8d0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    box-shadow: 0 2px 8px rgba(61, 107, 30, 0.06);
    border-bottom: none;
  }

  /* Trust strip cards */
  body.page-home .pansari-trust-strip {
    margin: 0 14px 16px;
    padding: 14px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e8f0df;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.05);
  }

  body.page-home .pansari-trust-item {
    background: linear-gradient(180deg, #f8fbf4, #fff);
    border-radius: 14px;
    border: 1px solid #eef3e8;
  }

  body.page-home .pansari-trust-icon {
    background: linear-gradient(145deg, #ecfccb, #bbf7d0);
    color: var(--ds-forest, #3D6B1E);
    border-radius: 12px;
  }

  /* CTA block */
  body.page-home .cta-section {
    margin: 0 14px 28px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(45, 80, 22, 0.25);
  }

  body.page-home .cta-button {
    border-radius: 14px;
    min-height: 48px;
    padding: 14px 28px;
  }

  /* Floating controls stack */
  body.page-home .wa-float {
    width: 50px;
    height: 50px;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  }

  body.page-home .sp-theme-toggle {
    background: linear-gradient(180deg, #fff, #f4faeb);
    border-color: #dce8d0;
  }
}

@media (max-width: 380px) {
  body.page-home .hp-trust-pill {
    font-size: 0.75rem;
    padding: 8px 12px 8px 8px;
  }

  body.page-home .slide-title {
    font-size: 1.45rem;
  }
}
