/* Base storefront styles (SSR catalogue pages) — works with JPRO header/footer */
:root {
  --sf-bg: #f7f8fa;
  --sf-surface: #ffffff;
  --sf-text: #1a1a1a;
  --sf-muted: #667085;
  --sf-border: #e4e7ec;
  --sf-accent: #0b5fff;
  --sf-accent-dark: #0847c7;
  --sf-radius: 12px;
  --sf-container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--sf-text);
  background: var(--sf-bg);
  line-height: 1.5;
  /* clip keeps horizontal bleed out without breaking position:sticky */
  overflow-x: clip;
}

html {
  overflow-x: clip;
}

.site-main {
  overflow-x: clip;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sf-container {
  width: min(100% - 2rem, var(--sf-container));
  margin-inline: auto;
}

.sf-subhero,
.sf-hero {
  position: relative;
  background: #0a2540;
  color: #fff;
  overflow: hidden;
}

.sf-hero {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.sf-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.sf-hero__content,
.sf-subhero .sf-container {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0;
}

.sf-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  opacity: 0.85;
  margin: 0 0 0.75rem;
}

.sf-hero h1,
.sf-subhero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
}

.sf-crumb {
  font-size: 0.875rem;
  opacity: 0.85;
  margin: 0 0 1rem;
}

.sf-crumb a:hover {
  text-decoration: underline;
}

.sf-hero__actions,
.sf-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
}

.sf-btn--primary {
  background: var(--sf-accent);
  color: #fff;
}

.sf-btn--primary:hover {
  background: var(--sf-accent-dark);
}

.sf-btn--ghost {
  border-color: currentColor;
  background: transparent;
}

.sf-section {
  padding: 2.5rem 0;
}

.sf-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.sf-section__head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.sf-section__head a {
  color: var(--sf-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.sf-grid {
  display: grid;
  gap: 1rem;
}

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

.sf-grid--cats {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.sf-cat-card {
  background: var(--sf-surface);
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  padding: 1rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.sf-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.sf-cat-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: #eef2f6;
}

.sf-cat-card span {
  font-weight: 600;
}

.sf-cat-card p {
  margin: 0.35rem 0 0;
  color: var(--sf-muted);
  font-size: 0.85rem;
}

.sf-catalogue {
  padding-top: 1.5rem;
}

.sf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sf-filters input,
.sf-filters select {
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--sf-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.sf-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.sf-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--sf-border);
  background: #fff;
  font-size: 0.85rem;
}

.sf-pill.is-active {
  background: #0a2540;
  border-color: #0a2540;
  color: #fff;
}

.sf-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.sf-pagination a {
  color: var(--sf-accent);
  font-weight: 600;
}

.sf-pagination .is-disabled {
  opacity: 0.4;
}

.sf-empty {
  text-align: center;
  color: var(--sf-muted);
  padding: 2rem 1rem;
}

.sf-product__layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding-top: 2rem;
}

@media (min-width: 860px) {
  .sf-product__layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.sf-product__img {
  width: 100%;
  border-radius: var(--sf-radius);
  background: #fff;
  border: 1px solid var(--sf-border);
}

.sf-product__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.sf-product__thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--sf-border);
}

.sf-product__price {
  font-size: 1.25rem;
  margin: 0.75rem 0;
}

.sf-product__price s {
  color: var(--sf-muted);
  margin-right: 0.5rem;
}

.sf-muted {
  color: var(--sf-muted);
}

.sf-product__description {
  margin-top: 1rem;
  color: #344054;
}

.sf-basket__list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
}

.sf-basket__item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--sf-border);
}

.sf-basket__item:last-child {
  border-bottom: 0;
}

.sf-basket__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Product cards from shared partial */
.t1-pl-item,
.product-card {
  background: #fff;
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  overflow: hidden;
  height: 100%;
}

.t1-pl-img,
.product-image-wrap {
  aspect-ratio: 1;
  background: #eef2f6;
  overflow: hidden;
}

.t1-pl-img img,
.product-img-primary {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t1-pl-info,
.product-details {
  padding: 0.85rem 1rem 1rem;
}

.t1-pl-name,
.product-name {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.t1-pl-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.t1-pl-btn {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--sf-border);
}

.t1-pl-btn-view {
  background: #0a2540;
  color: #fff;
  border-color: #0a2540;
}

.sf-basket__list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.sf-basket__item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
}

.sf-basket__item-main,
.sf-basket__item-side {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sf-basket__summary {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
}

.sf-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  background: #111827;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.sf-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sf-product__variants {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0 1.25rem;
  max-width: 22rem;
}

.sf-product__variants label {
  font-weight: 600;
  font-size: 0.9rem;
}

.sf-product__variants select {
  min-height: 44px;
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  background: #fff;
}
