/**
 * K9 storefront responsive overrides
 * Loaded after style.css + inner-pages.css
 * Breakpoints: 1200 / 992 / 900 / 768 / 640 / 480
 */

/* ---------- Global overflow guards ---------- */
/* overflow-x:hidden on html+body breaks position:sticky — use clip instead */
html {
  overflow-x: clip;
  max-width: 100vw;
}

body {
  overflow-x: clip;
  max-width: 100vw;
}

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

/* Performance: skip offscreen work without changing layout */
img {
  decoding: async;
}

#site-footer,
.home-marketing,
.section-how,
.section-why,
.trust-strip,
.newsletter {
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Do NOT set height:auto on all images — it breaks .img-placeholder absolute fills */

.wrap {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Utility form grids used across Contact / Checkout / Account */
.form-grid-2,
.form-grid-3,
.resp-grid-2,
.resp-grid-3 {
  display: grid;
  gap: 16px;
}

.form-grid-2,
.resp-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid-3,
.resp-grid-3 {
  grid-template-columns: 1.2fr 1fr 1fr;
}

@media (max-width: 640px) {
  .form-grid-2,
  .form-grid-3,
  .resp-grid-2,
  .resp-grid-3 {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Header / chrome ---------- */

/* Tablet ~1024: keep catnav usable, prevent RFQ / items clipping — do NOT restyle desktop chrome */
@media (max-width: 1200px) and (min-width: 901px) {
  .catnav__list {
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .catnav__item--quote {
    flex-shrink: 0;
  }

  .catnav-quote-full {
    display: none;
  }

  .catnav-quote-short {
    display: inline !important;
  }

  .header__search {
    max-width: 420px;
  }
}

@media (min-width: 1201px) {
  .catnav-quote-short {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .header__burger {
    display: flex !important;
  }

  .header__search {
    display: none !important;
  }

  .catnav {
    display: none !important;
  }

  .header__logo-img {
    height: 44px !important;
    width: auto;
  }

  .header__row {
    height: 64px;
    gap: 10px;
  }

  :root {
    --header-height: 64px;
  }
}

@media (max-width: 640px) {
  .header__logo-img {
    height: 36px !important;
  }

  .header__action-label {
    display: none !important;
  }

  .top-strip__left span {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Mobile drawer search */
.mobile-drawer-search {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.mobile-drawer-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.mobile-drawer-search button {
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .footer__brand,
  .footer__col {
    max-width: 100% !important;
  }
}

@media (max-width: 520px) {
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ---------- Home ---------- */
@media (max-width: 768px) {
  .hero__slide {
    min-height: min(420px, 70vh) !important;
  }

  .hero__content {
    padding: 28px 16px !important;
  }

  .home-loading-trust {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .home-loading-trust {
    grid-template-columns: 1fr !important;
  }

  .product-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Shop ---------- */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}

.shop-products-grid > * {
  min-width: 0;
  width: 100%;
}

.shop-filter-backdrop {
  display: none;
}

@media (max-width: 980px) {
  .shop-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .shop-sidebar,
  .filter-sidebar {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    padding: 20px 16px 40px;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: -webkit-fill-available;
    box-sizing: border-box;
  }

  .shop-sidebar.is-open,
  .filter-sidebar.is-open {
    display: block;
  }

  .shop-filter-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(15, 23, 42, 0.45);
    height: 100vh;
    height: 100dvh;
    min-height: -webkit-fill-available;
  }

  .shop-sidebar.is-open .mobile-filter-close,
  .filter-sidebar.is-open .mobile-filter-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .shop-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  }
}

.home-loading-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 400px) {
  .shop-products-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Product detail ---------- */
.pdp-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
}

@media (max-width: 900px) {
  .pdp-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .pdp-gallery {
    position: static !important;
    top: auto !important;
  }

  .pdp-section {
    padding: 24px 0 48px !important;
  }
}

@media (max-width: 600px) {
  .pdp-actions-row {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
  }

  .pdp-actions-row .btn {
    width: 100%;
    min-width: 0 !important;
  }

  .pdp-pincode-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .pdp-pincode-row input,
  .pdp-pincode-row button {
    width: 100%;
  }

  .specs-table,
  .specs-table tbody,
  .specs-table tr,
  .specs-table th,
  .specs-table td {
    display: block;
    width: 100% !important;
  }

  .specs-table tr {
    border-bottom: 1px solid var(--line, #e2e8f0);
    padding: 10px 0;
  }

  .specs-table th {
    background: transparent !important;
    padding-bottom: 4px !important;
    font-size: 12px;
    color: #64748b;
  }

  .specs-table td {
    padding-top: 0 !important;
  }

  .pdp-tab-headers {
    gap: 4px;
  }

  .pdp-tab-btn {
    padding: 10px 12px !important;
    font-size: 13px !important;
    white-space: nowrap;
  }

  .love-grid {
    grid-template-columns: 1fr !important;
  }

  .related-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  }
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ---------- Cart ---------- */
@media (max-width: 700px) {
  .cart-item {
    flex-wrap: wrap;
  }

  .cart-item__product {
    flex: 1 1 100%;
  }

  .cart-coupon-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .cart-coupon-row input,
  .cart-coupon-row button {
    width: 100%;
  }
}

/* ---------- Checkout ---------- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 960px) {
  .checkout-grid {
    grid-template-columns: 1fr !important;
  }

  .checkout-summary {
    position: static !important;
    order: -1;
  }
}

@media (max-width: 600px) {
  .checkout-steps {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .checkout-step__label {
    font-size: 11px;
  }

  .checkout-step__line {
    min-width: 24px;
  }
}

/* ---------- Reviews: L2 infinite carousel + arrows + autoplay ---------- */
.testimonials__slider {
  overflow: hidden !important;
  position: relative;
  width: 100%;
}

.testimonials__track--carousel {
  display: flex !important;
  gap: 20px !important;
  overflow: visible !important;
  width: max-content !important;
  will-change: transform;
  padding-bottom: 0 !important;
}

.testimonials__track--carousel .testimonial-card {
  flex: 0 0 auto !important;
  box-sizing: border-box;
}

.testimonials__controls {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.testimonials__arrow {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.testimonials__arrow:hover {
  border-color: var(--orange, #e36f0e) !important;
  color: var(--orange, #e36f0e) !important;
}

.testimonials__arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.testimonials__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testimonials__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  display: inline-block;
  transition: background 0.2s ease, transform 0.2s ease;
}

.testimonials__dot.is-active {
  background: var(--orange, #e36f0e);
  transform: scale(1.15);
}

.newsletter {
  background: linear-gradient(125deg, var(--orange, #e36f0e), var(--orange-deep, #c4590a)) !important;
  color: #fff !important;
}

.newsletter__inner {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.newsletter__title {
  color: #fff !important;
  margin: 0 0 6px 0;
}

.newsletter__desc {
  color: rgba(255, 255, 255, 0.85) !important;
  margin: 0;
}

.newsletter__form {
  display: flex !important;
  max-width: 440px;
  width: 100%;
}

.newsletter__input {
  flex: 1 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #ffffff !important;
  border-right: none !important;
  padding: 14px 18px !important;
  font-size: 0.875rem !important;
  border-radius: 6px 0 0 6px !important;
  outline: none !important;
  color: #111518 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.newsletter__input::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
}

.newsletter__submit {
  background: #111518 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 14px 24px !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  border-radius: 0 6px 6px 0 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background 0.15s ease-out !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.newsletter__submit:hover {
  background: #000000 !important;
}

@media (max-width: 768px) {
  .newsletter__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter__form {
    max-width: none;
    width: 100%;
  }
}

.contact-grid {
  align-items: stretch;
}

.contact-info-card--cms .cms-body-render h2,
.contact-info-card--cms .cms-body-render h3 {
  color: #fff !important;
}

.contact-info-card--cms .cms-body-render a {
  color: var(--orange, #ea580c);
}

.contact-info-card .contact-detail-row:last-child {
  margin-bottom: 0;
}

.dash-box#rfq {
  padding: 32px 28px;
  border-radius: var(--radius-xl, 16px);
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
  background: #fff;
}

@media (max-width: 640px) {
  .dash-box#rfq {
    padding: 24px 18px;
  }

  .contact-info-card {
    padding: 28px 20px !important;
  }
}

/* Ensure filter checkbox layout matches L2 when overrides apply */
.filter-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.8125rem;
  color: var(--ink, #0f172a);
  cursor: pointer;
}

.filter-option input {
  accent-color: var(--orange, #ea580c);
  margin-right: 6px;
}

.filter-option__count {
  color: var(--ink-muted, #94a3b8);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 980px) {
  .mobile-filter-btn {
    display: inline-flex;
  }
}

/* ---------- Account / dashboard ---------- */
@media (max-width: 980px) {
  .dashboard-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 20px 0 48px !important;
  }

  /* Real class is .dash-sidebar (typo previously: .dashboard-sidebar) */
  .dash-sidebar,
  .dashboard-sidebar {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .account-page {
    background: #f5f6f8;
  }

  .account-page .section {
    background: transparent;
  }

  .account-page .dash-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .account-page .dash-panel {
    background: #fff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 12px;
    padding: 16px;
    box-sizing: border-box;
  }

  .account-page .dash-panel__header {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .dashboard-layout [style*="grid-template-columns"],
  .checkout-forms [style*="grid-template-columns"],
  .contact-form-card [style*="grid-template-columns"],
  .contact-grid [style*="grid-template-columns"],
  .account-page [style*="grid-template-columns"],
  .pdp-section [style*="grid-template-columns: 1fr 1fr"],
  .form-grid-2,
  .form-grid-3,
  .resp-grid-2,
  .resp-grid-3 {
    grid-template-columns: 1fr !important;
  }

  .order-item-row {
    flex-wrap: wrap;
  }

  [style*="minmax(300px"],
  [style*="minmax(320px"],
  [style*="minmax(280px"],
  [style*="minmax(230px"],
  [style*="minmax(220px"],
  [style*="minmax(200px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Shared cards / tables ---------- */
@media (max-width: 640px) {
  .page-breadcrumb__title {
    font-size: 1.35rem !important;
    line-height: 1.25;
    word-break: break-word;
  }

  table.responsive-stack,
  table.responsive-stack thead {
    display: none;
  }
}

/* ---------- Product cards (contain huge catalog photos) ---------- */
.product-card {
  min-width: 0;
  max-width: 100%;
}

.product-card__media {
  aspect-ratio: 1 / 1 !important;
  max-height: 280px;
  width: 100%;
  overflow: hidden;
  background: #fff;
}

.product-card__media > a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  position: relative;
  overflow: hidden;
}

.product-card__media .img-placeholder,
.product-card__media .img-placeholder--product {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  overflow: hidden;
}

.product-card__media img,
.product-card .img-placeholder img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  padding: 12px;
  background: #fff;
}

.related-products-grid .product-card,
.shop-products-grid .product-card,
.product-grid .product-card {
  width: 100%;
}

.story-img-wrap {
  background: #f1f5f9;
  min-height: 240px;
  border-radius: 16px;
  overflow: hidden;
}

.story-img-wrap img {
  width: 100% !important;
  height: 420px !important;
  max-height: 420px !important;
  object-fit: cover !important;
}

.pdp-gallery__main {
  max-height: 520px;
}

.pdp-gallery__main img,
#pdp-main-img {
  max-height: 520px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

@media (max-width: 640px) {
  .story-img-wrap img {
    height: 260px !important;
    max-height: 260px !important;
  }

  .product-card__media {
    max-height: 220px;
  }

  .pdp-gallery__main {
    max-height: 360px;
  }
  .pdp-gallery__main img,
  #pdp-main-img {
    max-height: 360px !important;
  }
}

/* Touch targets */
@media (max-width: 900px) {
  .btn,
  .header__action,
  .mobile-filter-btn,
  .pdp-tab-btn {
    min-height: 44px;
  }
}

/* ---------- How It Works: connector line BETWEEN numbered steps (L2) ---------- */
.how-it-works .how-it-works__header,
#how-it-works .how-it-works__header {
  justify-content: flex-start;
  width: 100%;
}

.how-it-works .journey-grid,
#how-it-works .journey-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  position: relative !important;
  width: 100% !important;
  gap: 0 !important;
}

.how-it-works .journey-grid::before,
#how-it-works .journey-grid::before {
  content: "" !important;
  position: absolute !important;
  top: 24px !important;
  left: 12.5% !important;
  width: 75% !important;
  height: 2px !important;
  background: #E8EAEC !important;
  z-index: 0 !important;
  pointer-events: none !important;
  display: block !important;
}

.how-it-works .journey-step__number,
#how-it-works .journey-step__number {
  position: relative !important;
  z-index: 2 !important;
  background: #E36F0E !important;
  color: #fff !important;
}

@media (max-width: 820px) {
  .how-it-works .journey-grid,
  #how-it-works .journey-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .how-it-works .journey-grid::before,
  #how-it-works .journey-grid::before {
    top: 24px !important;
    bottom: 24px !important;
    left: 23px !important;
    width: 2px !important;
    height: auto !important;
  }
}

/* ---------- Brands carousel: hide native scrollbar (arrows only) ---------- */
.partner-carousel {
  overflow: visible !important;
  width: 100% !important;
  padding: 4px 0 20px !important;
}

.partner-track--scroll {
  display: flex !important;
  gap: 16px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scroll-behavior: smooth;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 6px 2px 18px !important;
  width: 100% !important;
}

.partner-track--scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.partner-track--scroll .partner-card {
  flex: 0 0 auto !important;
  text-decoration: none !important;
  color: inherit;
}

.partner-card {
  box-sizing: border-box !important;
}

.partner-card__name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #334155;
  text-align: center;
}

/* ============================================================
   FULL-SITE MOBILE RESPONSIVE HARDENING (all viewports)
   ============================================================ */

/* App shell — footer fills remaining viewport (no overflow clip — that cuts hero/nav on desktop) */
.site-shell {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 900px) {
  .site-shell {
    overflow-x: clip;
  }
}

.site-shell > main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.site-shell > .footer,
.site-shell > #site-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
}

/* Mobile hamburger drawer — full viewport height on iOS */
@keyframes mobileDrawerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mobileDrawerSlideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  width: 100%;
  max-width: 100vw;
  animation: mobileDrawerFadeIn 0.22s ease-out;
}

.mobile-drawer-panel {
  width: min(88vw, 360px);
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  background: #ffffff;
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  animation: mobileDrawerSlideIn 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
  padding: 0;
}

/* Header */
.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mobile-drawer-logo {
  height: 34px;
  width: auto;
  display: block;
}

.mobile-drawer-tagline {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-drawer-city-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.mobile-drawer-motto {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.mobile-drawer-close-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mobile-drawer-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* User Greeting Bar */
.mobile-drawer-user-bar {
  background: #f8fafc;
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.mobile-drawer-user-info,
.mobile-drawer-guest-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-drawer-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-drawer-user-text,
.mobile-drawer-guest-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.mobile-drawer-user-greeting,
.mobile-drawer-guest-sub {
  font-size: 11px;
  color: #64748b;
}

.mobile-drawer-user-name,
.mobile-drawer-guest-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-drawer-user-link {
  font-size: 12px;
  font-weight: 700;
  color: #ea580c;
  text-decoration: none;
  white-space: nowrap;
}

.mobile-drawer-login-pill {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: #ea580c;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.mobile-drawer-login-pill:hover {
  background: #c2410c;
}

/* Search bar */
.mobile-drawer-search-wrap {
  padding: 12px 18px 8px;
  background: #ffffff;
  flex-shrink: 0;
}

/* RFQ Wholesale Card */
.mobile-drawer-rfq-card {
  margin: 8px 18px 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
}

.mobile-drawer-rfq-icon {
  font-size: 18px;
}

.mobile-drawer-rfq-title {
  font-size: 13px;
  font-weight: 800;
  color: #9a3412;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-drawer-rfq-sub {
  font-size: 11px;
  color: #7c2d12;
  line-height: 1.4;
}

.mobile-drawer-rfq-action {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
  transition: transform 0.15s ease;
}

.mobile-drawer-rfq-action:hover {
  transform: translateY(-1px);
}

/* Navigation Tabs */
.mobile-drawer-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0 12px;
  gap: 4px;
  flex-shrink: 0;
}

.mobile-drawer-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.mobile-drawer-tab-btn.active {
  color: #ea580c;
  font-weight: 700;
  border-bottom-color: #ea580c;
  background: #ffffff;
}

.mobile-drawer-tab-count {
  font-size: 10px;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.mobile-drawer-tab-btn.active .mobile-drawer-tab-count {
  background: #ffedd5;
  color: #c2410c;
}

/* Content Scrollable Body */
.mobile-drawer-content-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px 24px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.mobile-drawer-content-scroll::-webkit-scrollbar {
  width: 4px;
}

.mobile-drawer-content-scroll::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

/* All Categories Visual Banner */
.mobile-drawer-all-cats-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 14px;
  transition: background 0.15s ease;
}

.mobile-drawer-all-cats-banner:hover {
  background: #1e293b;
  color: #ffffff;
}

.mobile-drawer-all-cats-icon {
  font-size: 16px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-drawer-all-cats-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mobile-drawer-all-cats-text strong {
  font-size: 13px;
  font-weight: 700;
}

.mobile-drawer-all-cats-text span {
  font-size: 11px;
  color: #94a3b8;
}

.mobile-drawer-all-cats-arrow {
  font-size: 16px;
  color: #ea580c;
  font-weight: 700;
}

/* Category Accordion Nodes */
.mobile-drawer-category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-drawer-cat-node {
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  transition: all 0.15s ease;
}

.mobile-drawer-cat-node.expanded {
  border-color: #fdba74;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08);
}

.mobile-drawer-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 4px 6px;
}

.mobile-drawer-cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  text-decoration: none;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 8px;
}

.mobile-drawer-cat-link:hover {
  color: #ea580c;
}

.mobile-drawer-cat-icon {
  font-size: 17px;
  width: 30px;
  height: 30px;
  background: #f8fafc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-drawer-cat-name {
  flex: 1;
}

.mobile-drawer-cat-toggle {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  height: 32px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s ease;
}

.mobile-drawer-cat-toggle:hover {
  background: #ffedd5;
  color: #ea580c;
  border-color: #fdba74;
}

.mobile-drawer-cat-child-count {
  font-size: 11px;
  font-weight: 700;
}

.mobile-drawer-chevron {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer-chevron.open {
  transform: rotate(180deg);
}

.mobile-drawer-cat-direct {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  text-decoration: none;
}

/* Subcategories Drawer Indent */
.mobile-drawer-subcats {
  background: #fcfcfd;
  border-top: 1px dashed #e2e8f0;
  padding: 8px 12px 10px 42px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 3px solid #ea580c;
  margin: 0 4px 4px;
  border-radius: 0 0 6px 6px;
}

.mobile-drawer-subcat-all-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: #ea580c;
  text-decoration: none;
  padding: 6px 8px;
  background: #fff7ed;
  border-radius: 4px;
  margin-bottom: 4px;
}

.mobile-drawer-subcat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.mobile-drawer-subcat-link:hover {
  background: #f1f5f9;
  color: #ea580c;
  padding-left: 12px;
}

.mobile-drawer-subcat-bullet {
  color: #cbd5e1;
  font-size: 14px;
}

/* Nav groups & Items */
.mobile-drawer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer-group-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
  padding: 0 4px;
}

.mobile-drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  transition: all 0.15s ease;
}

.mobile-drawer-nav-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #ea580c;
}

.mobile-drawer-nav-item--highlight {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fed7aa;
  color: #9a3412;
  cursor: pointer;
  border: 1px solid #fed7aa;
  width: 100%;
  font-family: inherit;
  text-align: left;
}

.mobile-drawer-nav-icon {
  font-size: 16px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-nav-text {
  flex: 1;
}

.mobile-drawer-nav-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #ea580c;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
}

.mobile-drawer-nav-arrow {
  font-size: 16px;
  color: #cbd5e1;
}

/* Contact Help Card */
.mobile-drawer-contact-card {
  margin-top: 18px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-drawer-contact-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-contact-icon {
  font-size: 20px;
}

.mobile-drawer-contact-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.mobile-drawer-contact-sub {
  font-size: 11px;
  color: #64748b;
}

.mobile-drawer-call-btn {
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  display: block;
}

/* Footer Bottom Actions */
.mobile-drawer-footer {
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-drawer-footer-actions {
  display: flex;
  gap: 8px;
}

.mobile-drawer-footer-btn {
  flex: 1;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-footer-btn--rfq {
  background: #ea580c;
  color: #ffffff;
  flex: 2;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.2);
}

.mobile-drawer-footer-btn--call {
  background: #f1f5f9;
  color: #0f172a;
  flex: 1;
}

.mobile-drawer-footer-meta {
  text-align: center;
  font-size: 10.5px;
  color: #94a3b8;
}

/* CMS / policy pages — use full mobile width */
.cms-page-wrap.wrap {
  width: 100% !important;
  max-width: min(960px, 100%) !important;
  box-sizing: border-box !important;
}

.cms-body-render {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.cms-body-render img,
.cms-body-render video,
.cms-body-render iframe,
.cms-body-render table,
.cms-body-render pre,
.cms-body-render .wp-block-table {
  max-width: 100% !important;
  height: auto !important;
}

.cms-body-render table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cms-body-render * {
  max-width: 100%;
  box-sizing: border-box;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 24px;
  width: 100%;
}

@media (max-width: 980px) {
  .cms-page-wrap.wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .page-breadcrumb .wrap,
  .section > .wrap,
  .cart-section .wrap,
  .checkout-section .wrap,
  .shop-section .wrap,
  .pdp-section .wrap,
  .account-page .wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer .wrap,
  .header .wrap,
  .header__inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 16px;
    padding-right: 16px;
  }

  .categories-grid,
  .cat-grid,
  .home-cat-grid,
  .shop-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)) !important;
  }

  /* Header icons — prevent horizontal overflow */
  .header__actions,
  .header__icons,
  .header-actions {
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
  }

  /* Cart / checkout tables */
  .cart-table,
  .cart-header-row,
  .cart-item {
    min-width: 0;
    max-width: 100%;
  }

  .cart-layout {
    grid-template-columns: 1fr !important;
  }

  /* PDP */
  .pdp-layout,
  .product-layout,
  .product-detail-grid {
    grid-template-columns: 1fr !important;
  }

  /* Inline wide grids used across account/support */
  .dash-main [style*="minmax(220px"],
  .dash-main [style*="minmax(240px"],
  .dash-main [style*="minmax(280px"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .page-breadcrumb__title {
    font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
    word-break: break-word;
  }

  .btn--lg {
    width: 100%;
    justify-content: center;
  }

  .header__search {
    display: none; /* search lives in mobile drawer */
  }

  .footer__grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .categories-grid,
  .cat-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
}

@media (max-width: 400px) {
  .categories-grid,
  .cat-grid,
  .shop-products-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Safe areas for notched phones */
@supports (padding: max(0px)) {
  .mobile-drawer-panel {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .footer {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}


