/* Recce NI Storefront 2.2.0-beta.6 — desktop/tablet shell and archive cleanup */

/* Global containment: the canonical shell must never widen the page. */
body.rni-canonical-public-shell,
body.recce-ni-storefront { overflow-x: clip; }
.rni-storefront-header,
.rni-storefront-header * { box-sizing: border-box; }
.rni-storefront-primary-nav .rni-storefront-container { max-width: var(--rni-container); }
.rni-storefront-menu { max-width: 100%; }
.rni-storefront-menu > li { min-width: 0; }
.rni-storefront-menu > li > a { white-space: nowrap; }

/* Large desktop: full single-row navigation. */
@media (min-width: 1321px) {
  .rni-storefront-menu { flex-wrap: nowrap; justify-content: flex-start; }
}

/* Standard desktop/laptop: retain desktop navigation but allow a deliberate
   second row instead of letting links spill onto the page background. */
@media (min-width: 1181px) and (max-width: 1320px) {
  .rni-storefront-main-inner {
    grid-template-columns: minmax(140px,190px) minmax(260px,1fr) auto;
    gap: 1.25rem;
  }
  .rni-storefront-logo img { max-width: 180px; }
  .rni-storefront-menu {
    flex-wrap: wrap !important;
    justify-content: center;
    align-items: stretch;
    width: 100%;
  }
  .rni-storefront-menu > li > a {
    min-height: 44px;
    padding: .58rem .72rem;
    font-size: .88rem;
    line-height: 1.2;
  }
}

/* Tablet and constrained laptop widths: intentional compact shell. Search
   remains directly available; all navigation destinations move to the drawer. */
@media (max-width: 1180px) {
  .rni-storefront-utility { display: none !important; }
  .rni-storefront-main-inner {
    min-height: 70px !important;
    grid-template-columns: 48px minmax(140px,1fr) auto !important;
    gap: .8rem !important;
  }
  .rni-storefront-menu-toggle {
    display: inline-grid !important;
    place-items: center;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border: 1px solid #dfe3dc !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #20251e !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
  }
  .rni-storefront-logo { justify-content: center !important; min-width: 0; }
  .rni-storefront-logo img {
    max-width: min(190px,42vw) !important;
    max-height: 52px !important;
  }
  .rni-storefront-main .rni-storefront-search { display: none !important; }
  .rni-storefront-primary-nav { display: none !important; }
  .rni-storefront-mobile-search {
    display: block !important;
    padding: .65rem clamp(12px,2.4vw,24px) !important;
    border-top: 1px solid var(--rni-colour-border,#e1e5df);
    background: #fff;
  }
  .rni-storefront-mobile-search .rni-storefront-search { display: flex !important; }
  .rni-storefront-actions { gap: .75rem !important; white-space: nowrap; }
  .rni-storefront-actions a { font-size: .9rem; }
  .rni-storefront-mobile-drawer { width: min(92vw,420px); }
}

@media (max-width: 767px) {
  .rni-storefront-main-inner {
    grid-template-columns: 48px minmax(0,1fr) auto !important;
    padding-inline: 12px !important;
  }
  .rni-storefront-actions a:first-child { display: none !important; }
  .rni-storefront-actions { gap: .35rem !important; }
  .rni-storefront-actions > a:last-child { font-size: 0 !important; }
  .rni-storefront-actions > a:last-child::before {
    content: "Basket";
    font-size: .82rem;
  }
  .rni-storefront-cart-count { font-size: .72rem !important; }
}

/* Product archive tablet controls: avoid compressed sort/filter rows. */
@media (max-width: 900px) {
  body.rni-premium-archive ul.products {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 14px !important;
  }
  .rni-archive-controls__top {
    grid-template-columns: auto 1fr !important;
    gap: 10px 14px !important;
    align-items: center !important;
  }
  .rni-filter-button { display: inline-flex !important; min-height: 44px; }
  .rni-archive-result-count { justify-self: end; text-align: right; }
  .rni-archive-ordering {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .rni-archive-ordering .woocommerce-ordering,
  .rni-archive-ordering select,
  .rni-archive-ordering .orderby { width: 100% !important; max-width: none !important; }
  .rni-category-hero__content { padding-left: clamp(18px,3vw,32px); padding-right: clamp(18px,3vw,32px); }
}

@media (max-width: 430px) {
  body.rni-premium-archive ul.products { gap: 10px !important; }
  .rni-category-hero { min-height: 260px; }
  .rni-category-hero h1 { font-size: clamp(2rem,10vw,2.5rem); }
}

/* A missing-image tile must remain a deliberate white retail surface. */
.woocommerce img.rni-product-placeholder,
.rni-product-image-placeholder,
.rni-coming-soon-image {
  background: #fff !important;
  object-fit: contain !important;
}
