/* ============================================================
   Style Ink Co — Shop / Product Archive
   ============================================================ */

:root {
  --shop-bg: #FFFFFF;
  --shop-surface: #F7F7FA;
  --shop-surface-soft: #F0F0F5;
  --shop-surface-muted: #F0F0F5;
  --shop-text: #14141F;
  --shop-heading: #14141F;
  --shop-muted: #5C5C72;
  --shop-soft-text: #5C5C72;
  --shop-border: #E4E4EC;
  --shop-accent: #FF2E9A;
  --shop-accent-dark: #0C8A9E;
  --shop-blush: #1A9E5C;
  --shop-sale: #E0114F;
  --shop-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shop-heading-font: 'Manrope', 'Inter', system-ui, sans-serif;
  --shop-container: 1280px;
  --shop-pad: 16px;
  --shop-shadow-sm: 0 10px 28px rgba(20, 20, 31, 0.06);
  --shop-shadow-md: 0 20px 44px rgba(20, 20, 31, 0.1);
}

.shop-page {
  min-height: 100vh;
  background: var(--shop-bg);
  color: var(--shop-text);
  font-family: var(--shop-font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.shop-container {
  width: min(100%, var(--shop-container));
  margin: 0 auto;
  padding: clamp(20px, 2.2vw, 30px) clamp(16px, 3vw, 28px) 56px;
}

@media (min-width: 1024px) {
  .shop-container {
    padding-bottom: 72px;
  }
}

.shop-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 20px;
  color: var(--shop-soft-text);
  font-size: 0.8125rem;
  font-weight: 700;
}

.shop-breadcrumb a {
  color: var(--shop-soft-text);
  text-decoration: none;
  transition: color 180ms ease;
}

.shop-breadcrumb a:hover {
  color: var(--shop-accent);
}

.shop-breadcrumb span[aria-hidden="true"] {
  color: var(--shop-border);
}

/* ── Header: plain typographic block, no card chrome ───────── */
.shop-header {
  position: relative;
  margin: 0 0 24px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--shop-border);
}

.shop-header__content {
  max-width: 860px;
}

.shop-header__eyebrow {
  margin: 0 0 10px;
  color: var(--shop-accent-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shop-header__title {
  margin: 0;
  color: var(--shop-heading);
  font-family: var(--shop-heading-font);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

.shop-header__description {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--shop-muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  font-weight: 500;
  line-height: 1.7;
}

.shop-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.shop-header__meta span {
  color: var(--shop-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.shop-header__meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--shop-accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(12, 138, 158, 0.3);
  text-underline-offset: 3px;
  transition: color 180ms ease;
}

.shop-header__meta a:hover {
  color: var(--shop-accent);
}

/* ── Category chip nav ──────────────────────────────────────── */
.shop-category-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 2px 0 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.shop-category-nav a {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: var(--shop-bg);
  color: var(--shop-heading);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.shop-category-nav a:hover {
  border-color: var(--shop-accent);
  color: var(--shop-accent);
}

.shop-category-nav a.is-current {
  border-color: var(--shop-accent);
  background: var(--shop-accent);
  color: #FFFFFF;
}

.shop-category-nav .count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--shop-surface);
  color: var(--shop-soft-text);
  font-size: 0.72rem;
  font-weight: 900;
}

.shop-category-nav a.is-current .count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* ── Toolbar: count + filter toggle + sort ──────────────────── */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 28px;
  padding: 14px 0;
  border-top: 1px solid var(--shop-border);
  border-bottom: 1px solid var(--shop-border);
}

.shop-toolbar__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shop-toolbar__count {
  color: var(--shop-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.shop-filter-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: var(--shop-bg);
  color: var(--shop-heading);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  transition: border-color 180ms ease, color 180ms ease;
}

.shop-filter-btn:hover,
.shop-filter-btn:focus-visible {
  border-color: var(--shop-accent);
  color: var(--shop-accent);
}

@media (min-width: 1024px) {
  .shop-filter-btn {
    display: none;
  }
}

.woocommerce-ordering {
  float: none;
  margin: 0;
}

.woocommerce-ordering select,
.shop-sort select {
  min-height: 42px;
  max-width: 100%;
  width: min(100%, 220px);
  padding: 0 36px 0 14px;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background-color: var(--shop-bg);
  color: var(--shop-heading);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.woocommerce-ordering select:focus,
.shop-sort select:focus {
  border-color: var(--shop-accent);
  box-shadow: 0 0 0 3px rgba(255, 46, 154, 0.14);
}

/* ── Layout: sidebar + grid ─────────────────────────────────── */
.shop-layout {
  display: grid;
  gap: clamp(18px, 2.6vw, 32px);
  align-items: start;
}

@media (min-width: 1024px) {
  .shop-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

.shop-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  visibility: hidden;
  background: rgba(20, 20, 31, 0.44);
  opacity: 0;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.shop-sidebar-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.shop-sidebar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  max-height: 86vh;
  padding: 18px 18px 28px;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  background: var(--shop-bg);
  box-shadow: 0 -20px 50px rgba(20, 20, 31, 0.18);
  transform: translateY(100%);
  transition: transform 240ms ease;
}

.shop-sidebar.is-open {
  transform: translateY(0);
}

.shop-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--shop-border);
}

.shop-sidebar__mobile-title {
  margin: 0;
  color: var(--shop-heading);
  font-size: 1rem;
  font-weight: 800;
}

.shop-sidebar__close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: var(--shop-bg);
  color: var(--shop-heading);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}

.shop-sidebar__close:hover {
  border-color: var(--shop-accent);
  color: var(--shop-accent);
}

@media (min-width: 1024px) {
  .shop-sidebar-overlay {
    display: none;
  }

  .shop-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    padding: 0 24px 0 0;
    border-right: 1px solid var(--shop-border);
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .shop-sidebar__header {
    display: none;
  }
}

.shop-sidebar__widget,
.widget_product_categories,
.widget_price_filter,
.woocommerce-widget-layered-nav {
  margin: 0 0 28px;
}

.shop-sidebar__widget:last-child,
.shop-sidebar .widget:last-child {
  margin-bottom: 0;
}

.shop-sidebar__title,
.shop-sidebar .widgettitle {
  margin: 0 0 12px;
  color: var(--shop-heading);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop-sidebar__categories,
.widget_product_categories ul,
.woocommerce-widget-layered-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--shop-border);
}

.shop-sidebar__categories li,
.widget_product_categories li,
.woocommerce-widget-layered-nav-list__item {
  margin: 0;
}

.shop-sidebar__categories a,
.widget_product_categories a,
.woocommerce-widget-layered-nav-list__item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--shop-border);
  color: var(--shop-muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.shop-sidebar__categories a:hover,
.shop-sidebar__categories a[aria-current="page"],
.widget_product_categories a:hover,
.woocommerce-widget-layered-nav-list__item a:hover,
.woocommerce-widget-layered-nav-list__item--chosen a {
  color: var(--shop-accent);
}

.shop-sidebar__categories .count,
.widget_product_categories .count,
.woocommerce-widget-layered-nav-list__item .count {
  color: var(--shop-soft-text);
  font-size: 0.78rem;
  font-weight: 800;
}

.widget_price_filter .price_slider_wrapper {
  padding-top: 8px;
}

.widget_price_filter .ui-slider-horizontal {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--shop-border);
}

.widget_price_filter .ui-slider-range,
.widget_price_filter .ui-slider-handle {
  background: var(--shop-accent);
}

.widget_price_filter .ui-slider-handle {
  top: -6px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--shop-bg);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(20, 20, 31, 0.2);
}

.widget_price_filter .price_label {
  margin-top: 12px;
  color: var(--shop-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.widget_price_filter .button,
.shop-sidebar .button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--shop-heading);
  color: #FFFFFF;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms ease;
}

.widget_price_filter .button:hover,
.shop-sidebar .button:hover {
  background: var(--shop-accent);
}

/* ── Product grid ───────────────────────────────────────────── */
.shop-main {
  min-width: 0;
  width: 100%;
}

.shop-main ul.products,
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .shop-main ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .shop-main ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.woocommerce ul.products li.product,
ul.products li.product,
.product-card {
  float: none;
  width: auto;
  margin: 0;
}

.product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--shop-bg);
  transition: transform 220ms ease;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-card__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.product-card__shell,
.product-card__inner {
  position: relative;
  overflow: hidden;
}

.product-card__shell {
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  background: var(--shop-surface);
}

.product-card__inner,
.product-card__img-wrap {
  width: 100%;
  height: 100%;
}

.product-card__img,
.woocommerce ul.products li.product a img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 420ms ease;
}

.product-card:hover .product-card__img {
  transform: scale(1.04);
}

.product-card__badge,
.onsale {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--shop-accent);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-card__cta {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--shop-heading);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.product-card:hover .product-card__cta {
  opacity: 1;
  transform: translateY(0);
}

.product-card__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px 2px;
}

.product-card__info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.product-card__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--shop-heading);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.product-card__cat {
  color: var(--shop-soft-text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin-top: auto;
  color: var(--shop-heading);
  font-size: 1rem;
  font-weight: 900;
}

.product-card__price ins {
  color: var(--shop-sale);
  text-decoration: none;
}

.product-card__price del {
  color: var(--shop-soft-text);
  font-size: 0.86rem;
  font-weight: 700;
}

.product-card__price .woocommerce-Price-amount {
  color: inherit;
  font-weight: inherit;
}

.product-card__rating .star-rating,
.star-rating {
  color: var(--shop-accent);
}

.woocommerce ul.products li.product .button,
.add_to_cart_button {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 16px;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: var(--shop-bg);
  color: var(--shop-heading);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.woocommerce ul.products li.product .button:hover,
.add_to_cart_button:hover {
  border-color: var(--shop-accent);
  background: var(--shop-accent);
  color: #FFFFFF;
}

/* ── Pagination ─────────────────────────────────────────────── */
.shop-pagination {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--shop-border);
}

.woocommerce-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--shop-muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.woocommerce-pagination .page-numbers li a:hover {
  background: var(--shop-surface);
  color: var(--shop-heading);
}

.woocommerce-pagination .page-numbers li span.current {
  background: var(--shop-accent);
  color: #FFFFFF;
}

.shop-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 80px 18px;
  border: 1px dashed var(--shop-border);
  border-radius: 20px;
  text-align: center;
}

.shop-empty p {
  margin: 0;
  color: var(--shop-muted);
  font-size: 1rem;
  font-weight: 700;
}

.shop-empty a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--shop-accent);
  color: #FFFFFF;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms ease;
}

.shop-empty a:hover {
  background: var(--shop-heading);
}

@media (max-width: 480px) {
  .shop-toolbar {
    align-items: stretch;
  }

  .woocommerce-ordering,
  .woocommerce-ordering select {
    width: 100%;
  }

  .product-card__cta {
    display: none;
  }

  .shop-header__meta,
  .shop-toolbar,
  .shop-toolbar__left {
    align-items: stretch;
  }

  .shop-filter-btn,
  .woocommerce-ordering,
  .woocommerce-ordering select {
    width: 100%;
  }

  .shop-category-nav {
    margin-inline: -16px;
    padding-inline: 16px;
  }
}
