/* ============================================================
   RK Keys — responsive.css
   Media Queries & WebView-specific Fixes
   ============================================================ */

/* ── Overflow safety ─────────────────────────────────────── */
/* overflow-x:hidden on body/html was removed from here — it disabled
   position:sticky for .site-header-sticky on every page except
   shop/product pages (where woocommerce.css force-overrides it back
   to visible via .woocommerce/.woocommerce-page on <body>).
   woocommerce.css already applies overflow-x:hidden to .container
   globally (it's @imported on every page via main.css), which covers
   the same horizontal-scroll safety net without touching body/html. */

/* ── Search form WordPress override ─────────────────────── */
.search-form {
  display: flex;
  align-items: center;
}

.search-form label {
  display: none !important;
}

.search-form .search-field,
.header-search .search-field {
  flex: 1;
  min-height: 44px;
  padding: 0 1rem;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: transparent;
  color: var(--clr-white);
}

.search-form .search-submit,
.header-search .search-submit {
  width: 44px;
  height: 44px;
  background: var(--clr-accent);
  color: var(--clr-dark);
  border: none;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  flex-shrink: 0;
}

/* ── WooCommerce pagination ──────────────────────────────── */
.woocommerce-pagination .page-numbers,
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-gray-200);
  margin: 2px;
  text-decoration: none;
  transition: all var(--ease);
  font-weight: 600;
}

.page-numbers.current {
  background: var(--clr-primary);
  color: var(--clr-white);
  border-color: var(--clr-primary);
}

/* ── Mobile (< 600px) ────────────────────────────────────── */
@media (max-width: 599px) {

  /* 2 cols on phone */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .product-card__body {
    padding: 0.65rem;
  }

  .product-card__title {
    font-size: 0.8rem;
  }

  .product-card__price-current {
    font-size: 0.95rem;
  }

  .product-card__add-btn {
    font-size: 0.72rem;
    min-height: 38px;
  }

  /* Brands: 3 per row */
  .brands-track .brand-card {
    flex: 0 0 calc(33.333% - 0.5rem);
    min-width: 90px;
  }

  .brand-card__logo {
    width: 60px;
    height: 60px;
  }
}

/* ── Tablet (768px – 1023px) ─────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

}

/* ── Desktop (≥ 1024px) ──────────────────────────────────── */
@media (min-width: 1024px) {

  /* Header: taller */
  .site-header__inner {
    min-height: 72px;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  /* Remove bottom nav padding on desktop */
  body {
    padding-bottom: 0;
  }
}

/* ── Large Desktop (≥ 1280px) ────────────────────────────── */
@media (min-width: 1280px) {
  .product-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ── WebView-specific ────────────────────────────────────── */
/* Prevent iOS bounce overscroll */
/* body {
  overscroll-behavior: none;
} */

/* Ensure form inputs don't zoom on iOS (must be 16px+) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="password"],
select,
textarea {
  font-size: 16px !important;
}

/* Safe area for notch phones */
.site-header {
  padding-top: env(safe-area-inset-top);
}

/* Smooth scrolling containers */
.brands-track,
.bestsellers-scroll {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}
/* ═══════════════════════════════════════════════════════════════════════════════
   CARD TINT: product cards and "Shop by" cards get a light tint of the brand colour (#42979d)
   The page and sections stay white. Cards used to be white on white, so nothing separated them; they now
   have a faint brand-tinted fill, a visible border and a soft resting shadow, while the image / logo area
   stays white so product photos and brand logos sit on a clean tile.
   This block is last in the stylesheet order so it wins. Tune the look with the variables below.
   ═══════════════════════════════════════════════════════════════════════════════ */
:root {
  --clr-card-tint: #eef6f6;        /* brand #42979d at about 9% on white */
  --clr-card-tint-hover: #e1f0f0;  /* about 14% */
  --clr-card-border: #cfe3e4;      /* about 24% */
  --shadow-card: 0 1px 2px rgba(26, 46, 48, 0.06), 0 4px 14px rgba(26, 46, 48, 0.07);
}

/* Product cards (home, shop, category, brand, search, Offers pages) and Shop by Brand / Categories cards.
   Hover rules elsewhere are more specific, so the lift and teal border still apply. */
.product-card,
.brand-card,
.sp-related__card {
  background: var(--clr-card-tint);
  border-color: var(--clr-card-border);
  box-shadow: var(--shadow-card);
}

/* Photos and logos stay on white. */
.product-card__image-wrap,
.brand-card__logo,
.sp-related__img {
  background: #fff;
}

/* Brand / category cards had a hover fill of their own; keep it a step stronger than the resting tint. */
.brand-card:hover {
  background: var(--clr-card-tint-hover);
}

/* The dark "New Arrivals" band keeps its own look (it overrides the card background and border itself). */
.new-arrivals-section .product-card {
  box-shadow: none;
}

/* Product photos run edge to edge: no padding on the top, left or right. Only the bottom keeps a gap, which
   separates the photo from the product title. (The photo used to carry 1rem of padding on every side.)
   The photo is a square, so it fills the card's full width; the gap is a white strip under it. */
.product-card__image-wrap {
  aspect-ratio: auto;
  padding-bottom: 0.75rem;
}
.product-card__image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER LOGO: a little larger, with the store name beside it ("Rajindera" over "Lock & Key Store")
   The markup is in header.php (.site-logo-text). Last in the stylesheet order so it wins.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Store name: hidden by default (small phones need the room for the search box and WhatsApp buttons). */
.site-logo-text {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  margin-left: 0.75rem;
  color: var(--clr-white);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo-text__top {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
}
.site-logo-text__bottom {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

/* Phones and tablets that have room: show it beside the (already large) mobile logo. */
@media (min-width: 480px) {
  .site-logo-text {
    display: flex;
  }
}

/* Desktop: logo a little bigger (was 58px) and the name a little larger. */
@media (min-width: 1024px) {
  .site-header .custom-logo-link img,
  .site-logo__img {
    height: 68px;
    max-height: 68px;
  }
  .site-logo-text__top {
    font-size: 1.6rem;
  }
  .site-logo-text__bottom {
    font-size: 0.85rem;
  }
}

/* Store name beside the logo in capitals. Capitals are wider, so the bottom line is a touch smaller. */
.site-logo-text {
  text-transform: uppercase;
}
.site-logo-text__bottom {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
@media (min-width: 1024px) {
  .site-logo-text__bottom {
    font-size: 0.74rem;
  }
}
