/*
 Theme Name:   fFashion Child - Saintcore
 Description:  Saintcore.top apparel showcase child theme. Extends fFashion with a homepage showcase template and minimal grayscale styling.
 Template:     ffashion
 Version:      1.0.0
 Author:       WorkBuddy
 Text Domain:  ffashion-child
*/

:root {
  --sc-bg: #fafafa;
  --sc-surface: #ffffff;
  --sc-ink: #1c1c1c;
  --sc-ink-soft: #6b6b6b;
  --sc-line: #e6e6e6;
  --sc-accent: #2b2b2b;
  --sc-radius: 10px;
  --sc-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
  --sc-maxw: 1180px;
}

/* ===== Global ===== */
body {
  background: var(--sc-bg);
  color: var(--sc-ink);
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  padding-top: 70px; /* compensate fixed header */
}
a { color: inherit; }

/* ===== Header / Navigation ===== */
#header-main-fixed {
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--sc-line);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}
#header-content-wrapper {
  max-width: var(--sc-maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  position: relative;
}
#header-logo .site-title,
#header-logo a {
  font-size: 38px;
  letter-spacing: .12em;
  font-weight: 600;
  color: var(--sc-ink);
  text-decoration: none;
  text-transform: uppercase;
}
#navmain ul {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
#navmain li { position: relative; }
#navmain ul a {
  color: var(--sc-ink);
  text-decoration: none;
  font-size: 16px !important;
  letter-spacing: .04em;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
#navmain a:hover,
#navmain .current-menu-item > a {
  border-bottom-color: var(--sc-ink);
}
#navmain .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 160px;
  box-shadow: var(--sc-shadow);
  display: none;
}
#navmain li:hover > .sub-menu { display: block; }
#navmain .sub-menu a { padding: 8px 16px; display: block; }

/* The Edit is a mobile-only menu item; keep it out of the desktop header. */
#navmain li.sc-mobile-only { display: none; }

/* ===== Homepage Container ===== */
.sc-home { display: block; }
.sc-wrap { max-width: var(--sc-maxw); margin: 0 auto; padding: 0 24px; }

/* ===== HERO CAROUSEL ===== */
.sc-hero {
  position: relative;
  overflow: hidden;
}
.sc-hero__slides {
  position: absolute; inset: 0;
}
.sc-hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}
.sc-hero__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.sc-hero__slide--active {
  opacity: 1;
}
/* Dots indicator */
.sc-hero__dots {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 3;
}
.sc-hero__dot {
  width: 10px; height: 10px;
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7);
  background: transparent; cursor: pointer;
  padding: 0; transition: all .35s ease;
}
.sc-hero__dot--active,
.sc-hero__dot:hover {
  background: #fff; border-color: #fff;
}

/* ===== HERO ===== */
.sc-hero {
  position: relative;
  min-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
.sc-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55));
}
.sc-hero__inner {
  position: relative; z-index: 1;
  text-align: center; color: #fff;
  max-width: 760px; padding: 0 24px;
}
.sc-hero__eyebrow {
  margin: 0 0 80px;
  color: #fff; font-size: 20px; font-weight: 700;
  letter-spacing: .35em; text-transform: uppercase;
}
.sc-btn {
  display: inline-block;
  background: #fff; color: #1c1c1c;
  padding: 5px 11px; border-radius: 40px;
  text-decoration: none; font-size: 14px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 600;
  margin-top: 170px;
  transition: .25s;
}
.sc-btn:hover { background: #1c1c1c; color: #fff; }

/* ===== Section (common) ===== */
.sc-section { padding: 76px 0; }
.sc-section--alt { background: #f1f1f1; }
.sc-section__title {
  text-align: center; font-size: 28px; font-weight: 600;
  letter-spacing: .06em; margin: 0 0 40px;
}
.sc-section__desc {
  text-align: center; color: var(--sc-ink-soft);
  margin: 0 0 44px; font-size: 15px;
}

/* ===== Category Grid ===== */
.sc-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 100px;
  row-gap: 18px;
}

/* Graphics is intentionally excluded from the homepage Categories grid. */
#sc-cats .sc-cat--graphics { display: none !important; }

/* Fixed category order — Desktop: Tops Dresses Skirts / Sets Bottoms Jumpsuits */
.sc-cat--tops { order: 1; }
.sc-cat--dresses { order: 2; }
.sc-cat--skirts { order: 3; }
.sc-cat--sets { order: 4; }
.sc-cat--bottoms { order: 5; }
.sc-cat--jumpsuits { order: 6; }
.sc-cat {
  position: relative; display: block;
  aspect-ratio: 3 / 4; border-radius: var(--sc-radius);
  overflow: hidden; box-shadow: var(--sc-shadow);
  text-decoration: none;
}
.sc-cat__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform .5s ease;
}
.sc-cat:hover .sc-cat__img { transform: scale(1.06); }
.sc-cat__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  color: #fff; display: flex; justify-content: space-between;
  align-items: baseline;
}
.sc-cat__name { font-size: 16px; letter-spacing: .03em; }
.sc-cat__count { font-size: 13px; opacity: .85; }

/* ===== Product Grid ===== */
.sc-prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.sc-prod { display: block; text-decoration: none; color: inherit; }
.sc-prod__img {
  display: block; aspect-ratio: 3 / 4;
  width: 100%; height: auto;
  object-fit: cover; object-position: center;
  border-radius: var(--sc-radius); box-shadow: var(--sc-shadow);
  transition: transform .35s ease, box-shadow .35s ease;
}
.sc-prod:hover .sc-prod__img {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
}
.sc-prod__name {
  display: block; margin-top: 12px;
  font-size: 14px; color: var(--sc-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== About ===== */
.sc-about__body {
  font-size: 16px; color: var(--sc-ink-soft); text-align: left;
  line-height: 1.75; max-width: 600px; margin: 0 auto;
}
#sc-about .sc-section__desc {
  text-align: left;
}
#sc-about .sc-section__title {
  text-align: center !important;
}

/* ===== Category Archive (child theme archive.php) ===== */
#main-content-wrapper { max-width: var(--sc-maxw); margin: 0 auto; padding: 56px 24px; }
#info-title.sc-archive__title {
  font-size: 26px; font-weight: 600; letter-spacing: .06em;
  margin: 0 0 32px; text-align: center;
}
.sc-arc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}


.sc-arc-card:hover 


/* ===== Single Product ===== */
.single #main-content-wrapper { max-width: 880px; }
.single .entry-title {
  font-size: 38px; font-weight: 600; letter-spacing: .03em;
  margin: 0 0 16px;
}
.single .before-content, .single .after-content {
  color: var(--sc-ink-soft); font-size: 14px;
}
.single .content img { border-radius: var(--sc-radius); max-width: 100%; height: auto; }

/* ===== Footer (brand layout) ===== */
#footer-main {
  background: #111111;
  border-top: none;
  padding: 18px 0;
  margin-top: 0;
  color: #ffffff;
}
#footer-content-wrapper,
.footer-content-wrapper {
  max-width: var(--sc-maxw); margin: 0 auto; padding: 0 24px;
}
/* Logo (left) + company/HOME (right) on one row, aligned to logo height */
.sc-footer-row {
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
}
.sc-footer-logo { display: inline-flex; align-items: center; }
.sc-footer-logo .sc-site-logo { height: 50px; width: auto; }

/* Hide the scroll-up arrow */
.scrollup { display: none !important; }

/* Meta group: company name + HOME, vertically centered with the logo */
.sc-footer-meta {
  display: flex; align-items: center; gap: 28px;
}
.sc-footer-company {
  font-size: 13px; font-weight: 500;
  letter-spacing: .04em; color: #ffffff;
}
#footer-main .sc-footer-home {
  font-size: 12px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: #ffffff; text-decoration: none;
  padding: 8px 20px; border: 1px solid #ffffff; border-radius: 2px;
  transition: background .25s ease, color .25s ease;
}
#footer-main .sc-footer-home:hover { background: #ffffff; color: #111111; }

/* ===== NUCLEAR FIX v2: You May Also Like / More From — equal columns + aspect ratio ===== */
/* v1 had aspect-ratio but used repeat(4, 1fr) which is minmax(auto,1fr) */
/* Problem: a wide card (long title / content) stretches its column, breaking alignment */
/* Fix: minmax(0, 1fr) forces equal columns; min-width:0 lets flex items shrink */

.sc-also-grid,
.sc-more-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: start !important;
}

.sc-arc-card {
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none !important;
  color: inherit !important;
  min-width: 0 !important;          /* allow shrink below content size */
  width: 100% !important;
}

.sc-arc-card__img {
  /* --- ASPECT RATIO LOCK (native, engine-guaranteed) --- */
  aspect-ratio: 3 / 4 !important;
  width: 100% !important;
  height: auto !important;

  /* --- CONTAINMENT --- */
  overflow: hidden !important;
  flex-shrink: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;

  /* --- Visual --- */
  display: block !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border-radius: var(--sc-radius) !important;
  box-shadow: var(--sc-shadow) !important;
  transition: transform .35s ease !important;
}

.sc-arc-card:hover .sc-arc-card__img {
  transform: translateY(-5px) !important;
}

.sc-arc-card__name {
  display: block !important;
  margin-top: 12px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;          /* allow ellipsis to work inside flex column */
}

/* ===== Responsive =====
   Use 799px to match the parent theme's mobile-nav breakpoint so the
   hamburger menu and our collapsed layout activate together. */
@media (max-width: 799px) {
  /* Mobile Categories is intentionally limited to the six core product
     groups shown in the mobile navigation. The Edit remains its own section. */
  #sc-cats .sc-cat--optional { display: none !important; }
  /* Remove the parent theme's blue/gray hover blocks around the hamburger.
     Keep only the icon and the intentional keyboard focus outline. */
  #navmain > div,
  #navmain,
  #navmain > div:hover,
  #navmain:hover,
  #navmain > div:active,
  #navmain:active,
  #navmain > div:focus,
  #navmain:focus,
  #navmain > div:focus:not(:focus-visible) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  }
  #navmain > div::before,
  #navmain > div:hover::before,
  #navmain > div:active::before {
    background-color: transparent !important;
    box-shadow: none !important;
  }

  /* Show the mobile-only menu item inside the hamburger menu. */
  #navmain li.sc-mobile-only { display: block; }

  /* Header: logo (left) + search icon (right) on one row, hamburger below */
  #header-content-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 10px 24px;
    position: relative;
  }
  #header-logo { margin-left: 0 !important; min-width: 0; max-width: 100% !important; width: 100% !important; display: flex !important; justify-content: center !important; }
  .sc-site-logo { height: 42px !important; }

  /* Nav: full-width row holding the hamburger toggle + dropdown */
  #navmain {
    order: 1;
    width: auto !important;
    position: relative;
    margin-top: 2px;
    margin-left: 0 !important;
  }
  #navmain ul { gap: 0; justify-content: flex-start; }

  /* Collapsible hamburger menu (parent theme has no max-height, so it
     always renders open — we collapse it by default and expand on toggle).
     !important is required because the parent theme's matching rule loads
     after this child stylesheet and sets z-index:-1. */
  #navmain div > ul {
    max-height: 0 !important;
    overflow: hidden !important;
    z-index: 9999 !important;
    transition: max-height 0.32s ease;
    position: absolute;
    width: 180px;
    left: 0;
    margin: 8px 0 0;
    padding: 0;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
    /* Two categories per row (3 rows total) */
    display: grid !important;
    grid-template-columns: 90px 90px !important;
    gap: 0 !important;
  }
  #navmain div.mobile-menu-expanded > ul {
    max-height: 75vh !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
  }

  /* Nav link styling — black bold, consistent with desktop (overrides
     parent theme's gray + bordered links) */
  #navmain ul a,
  #navmain div > ul a {
    color: #111 !important;
    font-weight: 700 !important;
    border-bottom: none !important;
    border-right: none !important;
    padding: 15px 10px !important;
    white-space: normal !important;
    font-size: 15px !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  /* Keep the first category visible: the current menu starts with Tops.
     Do not hide the first item because there is no separate Home item here. */
  /* Put one fixed divider at the center of each row. The left grid cell owns
     the divider so it stays aligned when the first category is visible. */
  #navmain div > ul > li { position: relative !important; }
  #navmain div > ul > li:nth-child(odd) > a { text-align: left !important; padding-left: 8px !important; }
  #navmain div > ul > li:nth-child(even) > a { text-align: left !important; padding-left: 8px !important; padding-right: 10px !important; }
  #navmain div > ul > li:nth-child(odd)::after { content: ""; position: absolute; top: 16px; bottom: 16px; right: 8px; width: 1px; background: #000 !important; }
  #navmain div > ul > li:nth-child(even)::after { display: none !important; }
  #navmain div > ul > li:nth-child(odd)::after { z-index: 5 !important; pointer-events: none; }
  #navmain div > ul > li:nth-child(odd) > a:hover,
  #navmain div > ul > li:nth-child(odd) > a:focus,
  #navmain div > ul > li:nth-child(odd) > a:active {
    background: linear-gradient(to right, #f5f5f5 0, #f5f5f5 calc(100% - 8px), transparent calc(100% - 8px), transparent 100%) !important;
    box-shadow: none !important;
  }
  #navmain div > ul > li:nth-child(even) > a:hover,
  #navmain div > ul > li:nth-child(even) > a:focus,
  #navmain div > ul > li:nth-child(even) > a:active {
    background: #f5f5f5 !important;
    margin-left: -8px !important;
    width: calc(100% + 8px) !important;
    padding-left: 16px !important;
    box-shadow: none !important;
  }
  /* No bottom border on the last row (items 5 & 6) */
  #navmain div > ul > li:nth-last-child(-n+2) > a { border-bottom: none !important; }
  #navmain ul a:hover { background: #f5f5f5 !important; color: #000 !important; }

  /* Grids / sections */
  .sc-section { padding: 52px 0; }
  .sc-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* Mobile category order — Tops Dresses / Sets Skirts / Bottoms Jumpsuits */
  .sc-cat--tops { order: 1; }
  .sc-cat--dresses { order: 2; }
  .sc-cat--sets { order: 3; }
  .sc-cat--skirts { order: 4; }
  .sc-cat--bottoms { order: 5; }
  .sc-cat--jumpsuits { order: 6; }
  .sc-prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sc-arc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sc-hero { min-height: 56vh; }
  /* Hide the "Browse Categories" hero button on phones — the category grid
     sits right below the hero, so the jump link is redundant on small screens. */
  .sc-hero .sc-btn { display: none !important; }
  /* On phones, drop the redundant "SAINTCORE ·" prefix and shrink the eyebrow
     by 3px (20px -> 17px). We zero the original text node and re-inject the
     shorter string via ::before so the desktop copy stays untouched. */
  .sc-hero__eyebrow { font-size: 0; margin-bottom: 60px; }
  .sc-hero__eyebrow::before {
    content: "WOMEN'S APPAREL SUPPLY";
    font-size: min(16px, 4vw);
    letter-spacing: .3em;
    white-space: nowrap;
    position: relative;
    top: -28px;
  }
  .sc-footer-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  #footer-main { padding: 14px 0; }
  /* Use transform (not margin) so the shift is exact and not absorbed by flex centering */
  .sc-footer-logo { transform: translateY(3px); }
  .sc-footer-meta { gap: 20px; }
  #footer-main .sc-footer-home { transform: translateY(0); }
}

/* ===== Site Logo (inline SVG in header) ===== */
#header-logo { display: flex !important; align-items: center; flex-shrink: 0; min-width: 220px; margin-left: -90px; }
.sc-site-logo { height: 55px !important; width: auto !important; display: block; }

/* Remove header vertical padding so logo fills the bar tightly */
#header-content-wrapper { padding-top: 0 !important; padding-bottom: 0 !important; }

/* Remove current menu item highlight (background/border/underline) */
#navmain a,
#navmain > div > ul > li.current-menu-item > a,
#navmain > div > ul > li.current_page_item > a,
#navmain .current-menu-item > a {
  background-color: transparent !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: #000 !important;
  font-weight: 700 !important;
}
.sc-logo-link { display: inline-flex; align-items: center; text-decoration: none; }

/* Hide default search form from header (logo takes priority) */
#header-main-fixed .search-wrapper { display: none !important; }

/* Pin "About" to far right, keep nav on a single line (desktop/tablet) */
@media (min-width: 769px) {
  #navmain .menu { display: flex; flex-wrap: nowrap; align-items: center; }
  #navmain .menu > li { float: none; }
  #menu-item-126 { margin-left: auto; }
}

/* Visually hide but keep for screen readers / SEO */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===== Single Product Page: Hide meta, comments, sidebar ===== */
.before-content, .entry-meta, .entry-meta * { display: none !important; }
#comments, .comments-area, #respond, .comment-respond { display: none !important; }
#sidebar, #secondary, .widget-area { display: none !important; }

/* ================================================================
   PREMIUM SINGLE PRODUCT — E-COMMERCE THREE-COLUMN LAYOUT
   Left: thumbnail strip | Center: main image | Right: product info
   ================================================================ */

/* Full-width container, no sidebar */
.sc-single-wrapper #main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 50px;
}

/* TOP: text info (title + meta + description) sits ABOVE the gallery */
.sc-pdp-header {
  width: 100%;
  margin: 0 0 34px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--sc-line, #e6e6e6);
}

/* ---- Gallery Grid ---- */
.sc-product-gallery {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 18px;
  align-items: center;
  width: 100%;
}

/* Bottom: Thumbnail Strip (horizontal row below main image) */
.sc-gallery-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 760px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.sc-thumb {
  display: block;
  width: 72px;
  height: 72px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s ease;
}
.sc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sc-thumb:hover {
  border-color: #ccc;
}
.sc-thumb-active {
  border-color: var(--sc-ink, #111) !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

/* Center: Main Image */
.sc-gallery-main {
  width: 100%;
  max-width: 560px;
  position: relative;
}
.sc-main-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.35s ease;
}
.sc-gallery-main:hover .sc-main-photo {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.11);
}

/* Prev / Next arrows overlaid on the main image */
.sc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(calc(-50% + 5px));
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  color: #1c1c1c;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}
.sc-arrow:hover {
  background: #1c1c1c;
  color: #fff;
}
.sc-arrow-prev { left: 12px; }
.sc-arrow-next { right: 12px; }

/* (Right info panel removed — text info now sits above the gallery) */

/* Title in info panel */
.sc-pinfo-title {
  font-size: 46px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--sc-ink, #111);
  margin: 0 0 18px;
  letter-spacing: 0.5px;
}

/* Info rows */
.sc-pinfo-row {
  margin-bottom: 14px;
}
.sc-pinfo-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 5px;
}
.sc-pinfo-value {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}
.sc-pinfo-value a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}
.sc-pinfo-value a:hover {
  color: var(--sc-ink, #111);
}

/* Category links as subtle pills */
.sc-pinfo-category .sc-pinfo-value a {
  display: inline-block;
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 4px 12px;
  border-radius: 14px;
  margin-right: 4px;
  margin-bottom: 4px;
  transition: all 0.25s ease;
}
.sc-pinfo-category .sc-pinfo-value a:hover {
  background: var(--sc-ink, #111);
  color: #fff;
}

/* Description body */
.sc-pinfo-body {
  font-size: 15px;
  line-height: 1.9;
  color: #555;
  margin-top: 4px;
  padding-top: 4px;
}
.sc-pinfo-body p {
  margin-bottom: 12px;
}
.sc-pinfo-body img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

/* Tags */
.sc-pinfo-tags {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}
.sc-pinfo-tags .sc-pinfo-value a {
  color: #888;
  font-size: 12px;
}
.sc-pinfo-tags .sc-pinfo-value a:hover {
  color: var(--sc-ink, #111);
}

/* ---- Fallback layout (no images) ---- */
.sc-product-header { margin: 30px 0 20px; }
.sc-product-title {
  font-size: 38px; font-weight: 300; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--sc-ink, #111); margin: 0;
}
.sc-product-body { margin-top: 24px; }

/* ---- Related sections (below gallery) ---- */
.sc-more-from,
.sc-also-like {
  margin-top: 56px;
}
.sc-rel-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--sc-ink);
  margin: 0 0 22px;
  text-align: left;
}



/* ---- Responsive ---- */
@media (max-width: 900px) {
  .sc-pdp-header {
    margin-bottom: 24px;
    padding-bottom: 3px;
  }
  .sc-product-gallery {
    flex-direction: column;
    gap: 14px;
  }
  .sc-gallery-main {
    order: 1;
    width: 100%;
    max-width: 88%;
  }
  .sc-gallery-thumbs {
    order: 2;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    gap: 8px;
  }
  .sc-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }
  .sc-pinfo-title {
    font-size: 28px;
    margin-bottom: 12px;
  }
  .sc-pinfo-body {
    margin-top: 3px;
    padding-top: 3px;
  }
}

@media (max-width: 600px) {
  .sc-single-wrapper #main-content {
    padding: 0 14px 36px;
  }
  .sc-pinfo-title {
    font-size: 24px
  }
  .sc-also-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .sc-more-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .sc-rel-title {
    font-size: 18px;
  }
}

/* ── Force full-width content on product detail page (no sidebar) ── */
.sc-single-wrapper #main-content {
    float: none !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}
.sc-single-wrapper {
    width: 100% !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    max-width: 1200px;
    margin: 0 auto !important;
}

/* ── Nuclear override: force product page full-width at every level ── */
body.single #main-content-wrapper,
body.single .sc-single-wrapper {
    width: 100% !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
body.single #main-content {
    float: none !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    max-width: none !important;
    padding: 0 !important;
}

/* Product meta row: Category + SPU side by side */
.sc-pinfo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 2px;
}
.sc-pinfo-meta .sc-pinfo-row {
  margin-bottom: 0;
}

/* Product meta: inline Label: Value (overrides block label inside .sc-pinfo-meta) */
.sc-pinfo-meta .sc-pinfo-label {
  display: inline;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.3px;
  text-transform: none;
  color: #555;
  margin: 0;
}
.sc-pinfo-meta .sc-pinfo-label::after {
  content: ':';
  margin: 0 6px 0 2px;
  font-weight: 400;
  color: #999;
}
.sc-pinfo-meta .sc-pinfo-value {
  display: inline;
  font-size: 14px;
  color: #555;
}

/* Category as plain text (no pill) + SPU on same line */
.sc-pinfo-meta {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px;
  align-items: baseline;
  margin-bottom: 2px;
}
.sc-pinfo-meta .sc-pinfo-category .sc-pinfo-value a {
  display: inline;
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  font-size: 14px;
  color: #555;
}
.sc-pinfo-meta .sc-pinfo-category .sc-pinfo-value a:hover {
  background: none;
  color: var(--sc-ink, #111);
}


/* ===== Search box (magnifier, in nav bar) ===== */
.sc-search {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 50px;
  margin-left: 26px;
}
.sc-search__input {
  width: 0;
  padding: 9px 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  color: var(--sc-ink);
  outline: none;
  opacity: 0;
  overflow: hidden;
  transition: width .3s ease, padding .3s ease, opacity .2s ease, border-color .2s ease, background .2s ease;
}
.sc-search__input::placeholder { color: #9a9a9a; }
.sc-search__input::-webkit-search-cancel-button,
.sc-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.sc-search.is-open .sc-search__input {
  width: 140px;
  padding: 9px 0 9px 34px;
  border: none;
  border-bottom: 2px solid #111;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  outline: none;
}
/* Keep the expanded box anchored where it was before the left-margin tweak,
   so opening search doesn't push it further off the right edge. */
.sc-search.is-open {
  width: 140px;
  margin-left: 0;
}
/* In the expanded (editorial) state the magnifier moves to the left of the
   field and shrinks; the input shows only a 2px bottom rule (no box). */
.sc-search.is-open .sc-search__btn {
  left: 0;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
}
.sc-search__btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(calc(-50% + 5px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: none;
  background: transparent;
  color: #111;
  cursor: pointer;
  border-radius: 50%;
}
.sc-search__btn:hover { color: #000; }
.sc-search__btn:focus,
.sc-search__btn:active,
.sc-search__close:focus,
.sc-search__close:active {
  outline: none;
  background: transparent;
  box-shadow: none;
}
.sc-search__btn,
.sc-search__close { -webkit-tap-highlight-color: transparent; appearance: none; }
.sc-search__close {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  transform: translateY(-50%);
}
.sc-search__close-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}
.sc-search__icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.sc-search-empty {
  color: #777;
  font-size: 15px;
  padding: 8px 0 24px;
}

/* ===== Search empty state ===== */
.sc-search-empty-state {
  max-width: 680px;
  min-height: 430px;
  padding: clamp(84px, 12vh, 142px) 0 120px;
  margin: 0 auto;
  text-align: center;
}
.sc-search-empty-kicker {
  margin: 0 0 22px;
  color: #777;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  line-height: 1;
  text-transform: uppercase;
}
.sc-search-empty-title {
  margin: 0;
  color: #111;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 300;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.sc-search-empty-copy {
  max-width: 460px;
  margin: 22px auto 0;
  color: #777;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1.7;
}
.sc-search-empty-form {
  display: flex;
  align-items: center;
  max-width: 460px;
  margin: 42px auto 0;
  border-bottom: 1px solid #111;
}
.sc-search-empty-form input[type="search"] {
  min-width: 0;
  flex: 1;
  padding: 13px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111;
  font: 300 14px/1.4 "Lato", "Helvetica Neue", Arial, sans-serif;
}
.sc-search-empty-form input[type="search"]::placeholder { color: #999; }
.sc-search-empty-form button {
  flex-shrink: 0;
  padding: 13px 0 13px 18px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: 500 11px/1.4 "Lato", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.sc-search-empty-form button:hover { color: #777; }
.sc-search-empty-home {
  display: inline-block;
  margin-top: 32px;
  color: #777;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}
.sc-search-empty-home:hover { color: #111; }

@media (max-width: 600px) {
  body.search #info-title.sc-archive__title {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    font-size: 22px;
    line-height: 1.25;
  }
  .sc-search-empty-state {
    min-height: 400px;
    padding: 78px 16px 100px;
  }
  .sc-search-empty-kicker { margin-bottom: 18px; font-size: 10px; }
  .sc-search-empty-title { font-size: 36px; }
  .sc-search-empty-copy { margin-top: 18px; font-size: 13px; }
  .sc-search-empty-form { margin-top: 34px; }
  .sc-search-empty-form input[type="search"] { font-size: 13px; }
  .sc-search-empty-form button { padding-left: 12px; font-size: 10px; }
  .sc-search-empty-home { margin-top: 28px; font-size: 10px; }
  .sc-single-wrapper #main-content { padding-bottom: 30px; }
  .sc-pdp-header { margin-bottom: 18px; }
  .sc-product-gallery { gap: 10px; }
  .sc-gallery-main { max-width: 92%; }
  .sc-thumb { width: 52px; height: 52px; }
}

/* ===== Desktop editorial header refinement =====
   Preserve the existing header geometry while reducing visual weight and
   giving the navigation a quieter, luxury-fashion rhythm. */
@media (min-width: 800px) {
  #navmain ul { gap: 30px; }
  #navmain > div > ul > li > a {
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 5px 0;
  }
  .sc-search { width: 44px; margin-left: 28px; }
  .sc-search__btn { width: 44px; height: 44px; }
  .sc-search__icon { width: 20px; height: 20px; }
  /* Remove the CTA visually while preserving the hero's composition and height. */
  .sc-hero .sc-btn { visibility: hidden; pointer-events: none; }
}

@media (max-width: 799px) {
  /* Closed search icon: positioned at the bottom-right of the header bar,
     aligned horizontally with the hamburger/nav row. right:41px matches the
     wrapper's symmetric left padding (hamburger left gap = 41px).
     Placed here (after base rules) so it overrides desktop positioning. */
  .sc-search {
    position: absolute;
    bottom: -5px;
    right: 1px;
    transform: none;
    width: 38px;
    margin-left: 0;
    z-index: 100 !important;
  }
  .sc-search__btn { width: 48px; height: 48px; right: 0; left: auto; top: 50%; transform: translateY(-50%); }
  /* Keep a generous 48px touch target, but use a restrained 24px visual icon. */
  .sc-search__icon { width: 24px; height: 24px; }

  /* Mobile hit areas: keep the visual icons in place while making the full
     left/right header zones comfortably tappable. */
  #navmain > div:first-of-type {
    width: 130px !important;
    margin-left: -24px !important;
    padding-left: 24px !important;
    box-sizing: border-box !important;
  }
  #navmain > div:first-of-type > ul { left: 0 !important; }
  .sc-search:not(.is-open) { width: 140px; }
  .sc-search:not(.is-open) .sc-search__btn {
    width: 140px;
    justify-content: flex-end;
    padding-right: 14px;
  }

  /* On mobile: search expands in-place near the magnifier icon position
     (right side of header bar), not a full-width overlay. */
  .sc-search.is-open {
    position: absolute;
    bottom: 3px;
    right: 17px;
    width: 150px;
    height: auto;
    margin: 0;
    padding: 4px 6px 4px 34px;
    background: transparent;
    z-index: 10000;
    box-shadow: none;
    transform: none;
  }
  .sc-search.is-open .sc-search__input {
    width: 115px;
    padding: 6px 0 6px 10px;
    opacity: 1;
  }
  .sc-search.is-open .sc-search__btn {
    left: 4px;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
  }
  .sc-search.is-open .sc-search__icon {
    width: 22px;
    height: 22px;
  }
  .sc-search.is-open .sc-search__btn {
    pointer-events: none;
    background: transparent !important;
    border-radius: 0 !important;
  }
  .sc-search.is-open .sc-search__close {
    display: inline-flex;
    z-index: 2;
  }
  .sc-search.is-open .sc-search__input {
    padding-right: 30px;
    transition-duration: .18s;
  }
  .sc-search:not(.is-open),
  .sc-search:not(.is-open) .sc-search__btn {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Match the hamburger and magnifier: 24px black line icons with 48px touch areas.
     Draw the hamburger locally so it does not depend on Font Awesome. */
  #navmain div:first-of-type:before,
  #navmain div.mobile-menu-expanded:before {
    content: "" !important;
    display: inline-block !important;
    vertical-align: middle;
    width: 48px;
    height: 48px;
    margin: 0;
    transform: translate(-23px, 11px);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    color: transparent !important;
    text-shadow: none !important;
  }
  #navmain div:first-of-type:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M3 4.5h18'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M3 19.5h18'/%3E%3C/g%3E%3C/svg%3E");
  }
  #navmain div.mobile-menu-expanded:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14'/%3E%3Cpath d='M19 5L5 19'/%3E%3C/g%3E%3C/svg%3E");
  }

}

/* ===== Hide titles in single-product related sections =====
   "More from [category]" (.sc-more-row) and "You May Also Like" (.sc-also-grid)
   show image only on both desktop and mobile.
   Category archive + search results keep titles (.sc-arc-grid). */
.sc-more-row .sc-arc-card__name,
.sc-also-grid .sc-arc-card__name {
  display: none !important;
}
/* ===== 404 页面：提示文字对齐商详页产品标题 + 隐藏搜索框 ===== */
.error404 #main-content article p {
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(20px, 6vw, 46px);
  font-weight: 600;
  line-height: 1.5;
  color: var(--sc-ink, #111);
  letter-spacing: 0.5px;
  margin: 0 0 18px;
  white-space: nowrap;
}

/* 隐藏 404 页面下方的搜索框（带 Search 文字那个） */
.error404 .search-wrapper {
  display: none !important;
}

/* 404 副标题：Search the site, or return to the homepage.（比主标题小一号、不加粗，仅上方留空行） */
.error404 #main-content article p.sc-404-sub {
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(16px, 4.5vw, 28px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.5px;
  white-space: nowrap;
  color: #111;
  margin: 66px 0 18px;
}

/* 404 行动按钮：Search site + Back home */
.error404 #main-content article .sc-404-actions {
  display: flex;
  gap: 16px;
  margin-top: 66px;
  flex-wrap: wrap;
}
.error404 #main-content article .sc-404-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1.5px solid #111;
  border-radius: 4px;
  color: #111;
  text-decoration: none;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background .15s ease, color .15s ease;
}
.error404 #main-content article .sc-404-btn:hover {
  background: #111;
  color: #fff;
}
.error404 #main-content article .sc-404-btn__icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 600px) {
  .error404 #main-content article .sc-404-actions {
    margin-top: 50px;
    gap: 12px;
  }
  .error404 #main-content article .sc-404-btn {
    padding: 10px 18px;
    font-size: 15px;
  }
}

/* Sticky footer：内容不足一屏时页脚仍贴底 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#body-content-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
#main-content-wrapper {
  flex: 1 0 auto;
}
#footer-main {
  flex-shrink: 0;
}

/* 404 页：页脚钉在视口底部，无需滚动即可见 */
.error404 #footer-main {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 9998;
}
.error404 #body-content-wrapper {
  padding-bottom: 90px;
}
@media (max-width: 600px) {
  .error404 #body-content-wrapper {
    padding-bottom: 84px;
  }
}

/* 404 页：紧凑布局，顶部留适当间距 */
/* 404 页：内容在顶栏与固定页脚之间垂直居中，所有设备一致 */
.error404 #main-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 70px - 90px);
  padding: 0 24px;
}
.error404 #main-content {
  width: 100%;
}

/* ===== Phase 1 + 2 premium restraint pass ===== */
.sc-section__title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.sc-cat,
.sc-prod__img,
.sc-arc-card__img {
  border-radius: 2px !important;
  box-shadow: none !important;
}
.sc-cat__meta {
  padding: 22px 18px 17px;
  background: linear-gradient(transparent, rgba(0,0,0,.58));
}
.sc-cat__name {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.sc-cat:hover .sc-cat__img,
.sc-prod:hover .sc-prod__img {
  transform: scale(1.025);
}
.sc-prod__name,
.sc-arc-card__name {
  margin-top: 11px !important;
  color: #333;
  font-size: 12px !important;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.5;
  text-transform: uppercase;
}
.sc-arc-card:hover .sc-arc-card__img { transform: scale(1.025) !important; }

/* Product information: quieter editorial hierarchy. */
.sc-pinfo-title {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: .02em;
}
.sc-pinfo-meta { gap: 24px; }
.sc-pinfo-meta .sc-pinfo-label {
  color: #999;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.sc-pinfo-meta .sc-pinfo-value { color: #333; font-size: 13px; }
.sc-pinfo-category .sc-pinfo-value a {
  color: #333;
  font-size: 13px;
  letter-spacing: .03em;
  text-decoration: underline;
  text-decoration-color: #bbb;
  text-underline-offset: 4px;
}
.sc-thumb {
  border: 1px solid transparent;
  border-radius: 2px;
  box-shadow: none;
}
.sc-thumb-active {
  border-color: #111 !important;
  box-shadow: none;
}
.sc-rel-title {
  color: #777;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Footer: retain the black brand field without a boxed/e-commerce button. */
.sc-footer-note {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: rgba(255,255,255,.58);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
}
#footer-main .sc-footer-home {
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.65);
  border-radius: 0;
  padding: 6px 0 5px;
  font-size: 11px;
  font-weight: 500;
}

/* 404: two quiet paths instead of one heavy button. */
.error404 #main-content article .sc-404-btn--quiet {
  background: transparent;
  color: #777;
  border-color: #bbb;
}
.error404 #main-content article .sc-404-btn--quiet:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Keyboard users can see the mobile menu focus state. */
@media (max-width: 799px) {
  #navmain > div[role="button"]:focus-visible {
    outline: 1px solid #111;
    outline-offset: 4px;
  }
  .sc-section__title { font-size: 21px; letter-spacing: .13em; }
  .sc-pinfo-title { font-size: 26px; line-height: 1.25; }
  .sc-pinfo-meta { gap: 16px; }
  .sc-pinfo-meta .sc-pinfo-label,
  .sc-pinfo-meta .sc-pinfo-value,
  .sc-pinfo-category .sc-pinfo-value a { font-size: 12px; }
  .sc-footer-note { display: none; }
  #footer-main .sc-footer-home { font-size: 10px; }
  body.search #info-title.sc-archive__title {
    max-width: 300px !important;
    font-size: 22px !important;
    line-height: 1.25 !important;
  }
}

/* ============================================================
   Product gallery — fullscreen / swipe / keyboard  (P0-6)
   Added 2026-09-10.
   The main image is now wrapped in an <a> so it can be opened in
   PhotoSwipe; this block styles that wrapper, the magnifier hint,
   the position counter and the scrollable thumbnail strip.
   ============================================================ */

.sc-main-photo-link {
  position: relative;
  display: block;
  width: 100%;
  cursor: zoom-in;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.sc-main-photo-link:focus-visible {
  outline: 2px solid #1c1c1c;
  outline-offset: 3px;
}

/* Magnifier hint — fades in on hover for mouse users */
.sc-zoom-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.sc-gallery-main:hover .sc-zoom-badge,
.sc-main-photo-link:focus-visible .sc-zoom-badge {
  opacity: 1;
}
/* Touch devices have no hover — keep the affordance visible */
@media (hover: none) {
  .sc-zoom-badge { opacity: 1; background: rgba(0, 0, 0, 0.34); }
}

/* Position counter, doubles as a fullscreen button */
.sc-gallery-count {
  display: inline-block;
  margin: 12px auto 0;
  padding: 5px 15px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: transparent;
  color: var(--sc-ink-soft, #666);
  font-size: 12px;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.sc-gallery-count:hover {
  border-color: rgba(0, 0, 0, 0.38);
  color: #111;
}
.sc-gallery-count:focus-visible {
  outline: 2px solid #1c1c1c;
  outline-offset: 2px;
}

/* Thumbnail strip — scroll horizontally when a style has many shots */
.sc-gallery-thumbs {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.sc-gallery-thumbs::-webkit-scrollbar { height: 5px; }
.sc-gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.sc-gallery-thumbs::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 3px;
}
.sc-thumb { flex: 0 0 auto; }

/* Let the browser keep vertical scrolling while we handle horizontal swipes */
.sc-gallery-main { touch-action: pan-y; }

@media (max-width: 799px) {
  .sc-zoom-badge {
    width: 30px;
    height: 30px;
    right: 9px;
    bottom: 9px;
  }
  .sc-gallery-count { margin-top: 10px; }
}

/* Fix (2026-09-10): `justify-content: center` combined with `overflow-x: auto`
   is a known flexbox trap — once the strip overflows, the leading thumbnails
   are pushed into unreachable negative space and cannot be scrolled to.
   `safe center` keeps the strip centred when it fits, and behaves like
   flex-start once it overflows. Browsers without `safe` fall back to the
   flex-start line above it. */
.sc-gallery-thumbs {
  justify-content: flex-start;
  justify-content: safe center;
}

/* ==========================================================================
   P1-7 : paginated search results + live search suggestions
   ========================================================================== */

/* --- Search results: meta line ("473 styles found · page 1 of 10") --- */
.sc-archive__meta {
  margin: 10px 0 26px;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #777;
}

/* --- Search results: pagination --- */
.sc-pagination {
  margin: 54px 0 10px;
  display: flex;
  justify-content: center;
}
.sc-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sc-pagination .page-numbers a,
.sc-pagination .page-numbers span {
  display: inline-block;
  min-width: 40px;
  padding: 9px 14px;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.sc-pagination .page-numbers a:hover {
  border-color: #111;
}
.sc-pagination .page-numbers .current {
  background: #111;
  border-color: #111;
  color: #fff;
}
.sc-pagination .page-numbers .dots {
  border-color: transparent;
  background: transparent;
  min-width: 20px;
  padding: 9px 2px;
}

/* --- Live search suggestion dropdown --- */
.sc-suggest {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 9999;
  width: min(340px, 82vw);
  max-height: 60vh;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .14);
  -webkit-overflow-scrolling: touch;
}
.sc-suggest[hidden] { display: none !important; }

.sc-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
}
.sc-suggest__item:hover,
.sc-suggest__item.is-active {
  background: #f4f4f4;
}

.sc-suggest__thumb {
  flex: 0 0 46px;
  width: 46px;
  height: 60px;
  overflow: hidden;
  border-radius: 8px;
  background: #f1f1f1;
}
.sc-suggest__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sc-suggest__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.sc-suggest__title {
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-suggest__sku {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #999;
}

.sc-suggest__empty {
  padding: 14px 10px;
  font-size: 13px;
  color: #888;
}

.sc-suggest__all {
  display: block;
  margin-top: 4px;
  padding: 11px 10px;
  border-top: 1px solid #f0f0f0;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #111;
}
.sc-suggest__all:hover { text-decoration: underline; }

/* --- Search / archive cards: real <img> so lazy loading + srcset work --- */
.sc-arc-card__img { position: relative !important; }
.sc-arc-card__img > img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: var(--sc-radius) !important;
  background: #f4f4f4 !important;
}

@media (max-width: 799px) {
  .sc-suggest {
    width: min(340px, calc(100vw - 32px));
  }
  .sc-pagination .page-numbers a,
  .sc-pagination .page-numbers span {
    min-width: 36px;
    padding: 8px 11px;
  }
}

/* ==========================================================================
   P0-5 : category archive filter chips + sort bar
   ========================================================================== */

.sc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 18px;
}
.sc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 12.5px;
  line-height: 1;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.sc-chip:hover { border-color: #111; }
.sc-chip.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
}
.sc-chip__n {
  font-size: 11px;
  letter-spacing: .04em;
  color: #9a9a9a;
}
.sc-chip.is-active .sc-chip__n { color: rgba(255, 255, 255, .7); }

.sc-sortbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid #efefef;
}
.sc-sortbar__label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9a9a9a;
}
.sc-sortbar__item {
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #777;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.sc-sortbar__item:hover { color: #111; }
.sc-sortbar__item.is-active {
  color: #111;
  border-bottom-color: #111;
}

@media (max-width: 799px) {
  .sc-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 2px 0 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sc-filter::-webkit-scrollbar { display: none; }
  .sc-chip { flex: 0 0 auto; }
  .sc-sortbar { gap: 12px; margin-bottom: 22px; }
  .sc-sortbar__label { display: none; }
}

/* ==========================================================================
   WebP <picture> wrapper — keep layout identical to the bare <img> it wraps.
   The picture element becomes the positioned box, the img fills it.
   ========================================================================== */

/* Archive / search cards (img is absolutely positioned inside a 3:4 box). */
.sc-arc-card__img > picture {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: var(--sc-radius) !important;
  background: #f4f4f4 !important;
}
.sc-arc-card__img > picture > img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border-radius: var(--sc-radius) !important;
  background: #f4f4f4 !important;
}

/* Home category cards (img is absolutely positioned, hover scales it). */
.sc-cat > picture {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}
.sc-cat > picture > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transition: transform .5s ease !important;
}
.sc-cat:hover > picture > img { transform: scale(1.06) !important; }

/* Home product cards (img is a normal-flow block with aspect-ratio). */
.sc-prod > picture {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 3 / 4 !important;
  overflow: hidden !important;
  border-radius: var(--sc-radius) !important;
}
.sc-prod > picture > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}
