.category-page {
  padding-block: clamp(1.25rem, 2vw, 2rem) clamp(2rem, 4vw, 3rem);
}

.category-page__surface {
  position: relative;
  overflow: hidden;
  border-radius: clamp(1.25rem, 2vw, 2rem);
  min-height: min(72vh, 860px);
  background: linear-gradient(135deg, rgba(181, 154, 110, 0.32), rgba(41, 33, 22, 0.78));
  box-shadow: 0 26px 60px rgba(24, 18, 10, 0.16);
}

.category-page__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-page__overlay {
  position: relative;
  z-index: 1;
  min-height: min(72vh, 860px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  padding: clamp(1.5rem, 3vw, 2.75rem);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.18));
}

.category-page__link {
  color: #fff;
  text-decoration: none;
  font-family: var(--category-page-font-family, inherit);
  font-size: clamp(28px, var(--category-page-font-size, 48px), 68px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  transition: transform 180ms ease, opacity 180ms ease;
}

.category-page__link--left {
  justify-self: start;
  text-align: left;
  transform: translateX(var(--category-page-left-inset, 0px));
}

.category-page__link--center { justify-self: center; text-align: center; }

.category-page__link--right {
  justify-self: end;
  text-align: right;
  transform: translateX(calc(0px - var(--category-page-right-inset, 0px)));
}

.category-page__link--left:hover,
.category-page__link--left:focus-visible {
  transform: translateX(var(--category-page-left-inset, 0px)) translateY(-2px);
  opacity: 0.92;
}

.category-page__link--center:hover,
.category-page__link--center:focus-visible {
  transform: translateY(-2px);
  opacity: 0.92;
}

.category-page__link--right:hover,
.category-page__link--right:focus-visible {
  transform: translateX(calc(0px - var(--category-page-right-inset, 0px))) translateY(-2px);
  opacity: 0.92;
}

@media (max-width: 920px) {
  .category-page__surface,
  .category-page__overlay {
    min-height: 56vh;
  }

  .category-page__overlay {
    grid-template-columns: 1fr;
    align-content: center;
    text-align: center;
  }

  .category-page__link,
  .category-page__link--left,
  .category-page__link--center,
  .category-page__link--right {
    justify-self: center;
    text-align: center;
    transform: none;
  }

  .category-page__link:hover,
  .category-page__link:focus-visible {
    transform: translateY(-2px);
  }
}

@media (max-width: 640px) {
  .category-page__surface,
  .category-page__overlay {
    min-height: 48vh;
  }

  .category-page__overlay {
    padding: 1.1rem;
    gap: 0.8rem;
  }

  .category-page__link {
    letter-spacing: 0.05em;
  }
}


/* v1.9.209 — category page frosted-glass title buttons.
   Applies to ERKEK / KADIN / ÇOCUK on both desktop and mobile while preserving
   the existing API labels, destinations and left/center/right placement logic. */
.category-page__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 4.8em;
  max-width: 100%;
  padding: 0.34em 0.68em;
  box-sizing: border-box;

  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 0.72em;
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.30),
      rgba(255, 255, 255, 0.13));
  box-shadow:
    0 0.45rem 1.35rem rgba(12, 10, 8, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  backdrop-filter: blur(14px) saturate(145%);

  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
  overflow: hidden;

  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.category-page__link:hover,
.category-page__link:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.38),
      rgba(255, 255, 255, 0.18));
  box-shadow:
    0 0.65rem 1.6rem rgba(12, 10, 8, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  opacity: 1;
  outline: none;
}

@media (max-width: 920px) {
  .category-page__link {
    min-width: min(68vw, 11rem);
    padding: 0.34em 0.72em;
    border-radius: 0.78em;
  }
}

@media (max-width: 640px) {
  .category-page__link {
    min-width: min(72vw, 10rem);
    padding: 0.30em 0.66em;
    border-radius: 0.72em;
  }
}


/* v1.9.209 — canonical two-category layout.
   ÇOCUK is removed. ERKEK stays left, KADIN stays right.
   Both buttons remain side-by-side on desktop and mobile with a smaller default type scale. */
.category-page__overlay {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: center !important;
}

.category-page__link {
  font-size: clamp(20px, var(--category-page-font-size, 34px), 48px) !important;
  min-width: 0 !important;
  width: max-content !important;
  max-width: 100% !important;
  padding: 0.30em 0.58em !important;
}

.category-page__link--center {
  display: none !important;
}

.category-page__link--left {
  justify-self: start !important;
  text-align: left !important;
  transform: translateX(var(--category-page-left-inset, 0px)) !important;
}

.category-page__link--right {
  justify-self: end !important;
  text-align: right !important;
  transform: translateX(calc(0px - var(--category-page-right-inset, 0px))) !important;
}

.category-page__link--left:hover,
.category-page__link--left:focus-visible {
  transform: translateX(var(--category-page-left-inset, 0px)) translateY(-2px) !important;
}

.category-page__link--right:hover,
.category-page__link--right:focus-visible {
  transform: translateX(calc(0px - var(--category-page-right-inset, 0px))) translateY(-2px) !important;
}

@media (max-width: 920px) {
  .category-page__overlay {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-content: center !important;
    text-align: initial !important;
    gap: clamp(0.55rem, 2vw, 1rem) !important;
  }

  .category-page__link {
    font-size: clamp(18px, calc(var(--category-page-font-size, 34px) * 0.74), 28px) !important;
    min-width: 0 !important;
    padding: 0.28em 0.50em !important;
  }
}

@media (max-width: 640px) {
  .category-page__overlay {
    padding: 1rem !important;
    gap: 0.55rem !important;
  }

  .category-page__link {
    font-size: clamp(16px, calc(var(--category-page-font-size, 34px) * 0.66), 24px) !important;
    padding: 0.26em 0.46em !important;
    letter-spacing: 0.04em !important;
  }
}


/* v1.9.209 — category positioning v2.
   Desktop and mobile are independent. Position values are signed:
   negative = left, positive = right. */
@media (min-width: 921px) {
  .category-page__link--left {
    transform: translateX(var(--category-page-desktop-left-x, 0px)) !important;
  }

  .category-page__link--right {
    transform: translateX(var(--category-page-desktop-right-x, 0px)) !important;
  }

  .category-page__link--left:hover,
  .category-page__link--left:focus-visible {
    transform: translateX(var(--category-page-desktop-left-x, 0px)) translateY(-2px) !important;
  }

  .category-page__link--right:hover,
  .category-page__link--right:focus-visible {
    transform: translateX(var(--category-page-desktop-right-x, 0px)) translateY(-2px) !important;
  }
}

@media (max-width: 920px) {
  .category-page__overlay {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    align-content: center !important;
  }

  .category-page__link {
    font-size: var(--category-page-mobile-font-size, 18px) !important;
    min-width: 0 !important;
    width: max-content !important;
    max-width: 100% !important;
    padding: 0.26em 0.46em !important;
    letter-spacing: 0.04em !important;
  }

  .category-page__link--left {
    justify-self: start !important;
    text-align: left !important;
    transform: translateX(var(--category-page-mobile-left-x, 0px)) !important;
  }

  .category-page__link--right {
    justify-self: end !important;
    text-align: right !important;
    transform: translateX(var(--category-page-mobile-right-x, 0px)) !important;
  }

  .category-page__link--left:hover,
  .category-page__link--left:focus-visible {
    transform: translateX(var(--category-page-mobile-left-x, 0px)) translateY(-2px) !important;
  }

  .category-page__link--right:hover,
  .category-page__link--right:focus-visible {
    transform: translateX(var(--category-page-mobile-right-x, 0px)) translateY(-2px) !important;
  }

  /* Hazır mobil grid tipleri */
  .category-page[data-category-mobile-grid="edges"] .category-page__overlay {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 0.5rem !important;
    padding-inline: 1rem !important;
  }

  .category-page[data-category-mobile-grid="balanced"] .category-page__overlay {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 0.65rem !important;
    padding-inline: clamp(1.5rem, 7vw, 3rem) !important;
  }

  .category-page[data-category-mobile-grid="centered"] .category-page__overlay {
    grid-template-columns: max-content max-content !important;
    justify-content: center !important;
    column-gap: clamp(1.25rem, 7vw, 2.75rem) !important;
    padding-inline: 1rem !important;
  }

  .category-page[data-category-mobile-grid="compact"] .category-page__overlay {
    grid-template-columns: max-content max-content !important;
    justify-content: center !important;
    column-gap: 0.65rem !important;
    padding-inline: 0.75rem !important;
  }

  .category-page[data-category-mobile-grid="centered"] .category-page__link--left,
  .category-page[data-category-mobile-grid="compact"] .category-page__link--left {
    justify-self: end !important;
  }

  .category-page[data-category-mobile-grid="centered"] .category-page__link--right,
  .category-page[data-category-mobile-grid="compact"] .category-page__link--right {
    justify-self: start !important;
  }
}


/* v1.9.209 — category settings reactive fix.
   Desktop font size now follows the admin value exactly (18–96px).
   Position variables are already signed and remain independent from mobile. */
@media (min-width: 921px) {
  .category-page__link {
    font-size: var(--category-page-font-size, 30px) !important;
  }
}

@media (max-width: 920px) {
  .category-page__link {
    font-size: var(--category-page-mobile-font-size, 18px) !important;
  }
}


/* v1.9.209 — Dynamic Category Page v5.
   Category content comes from the same catalog source as Products. Admin only controls
   responsive presentation; category add/remove/order is owned by Category Management. */
.category-page__overlay {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: min(72vh, 860px) !important;
  padding: clamp(1.25rem, 3vw, 2.75rem) !important;
  background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,.06), rgba(0,0,0,.22)) !important;
}

.category-page__menu {
  width: 100%;
  display: grid;
  align-items: start;
  justify-items: stretch;
  gap: var(--category-page-desktop-gap, 20px);
}

.category-page[data-category-desktop-grid="2"] .category-page__menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-page[data-category-desktop-grid="3"] .category-page__menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-page[data-category-desktop-grid="4"] .category-page__menu { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.category-page[data-category-desktop-grid="auto"] .category-page__menu { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }

.category-page__group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .55rem;
  padding: .25rem;
}

.category-page__group--all {
  grid-column: 1 / -1;
  justify-self: center;
  width: auto;
}

.category-page__link,
.category-page__link--main,
.category-page__link--all {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: .42em .78em !important;
  border: 1px solid rgba(255,255,255,.52) !important;
  border-radius: .82em !important;
  background: linear-gradient(135deg, rgba(255,255,255,.30), rgba(255,255,255,.12)) !important;
  box-shadow: 0 .5rem 1.55rem rgba(12,10,8,.20), inset 0 1px 0 rgba(255,255,255,.46) !important;
  -webkit-backdrop-filter: blur(14px) saturate(145%) !important;
  backdrop-filter: blur(14px) saturate(145%) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--category-page-font-family, inherit) !important;
  font-size: var(--category-page-desktop-font-size, 30px) !important;
  font-weight: 700 !important;
  letter-spacing: .055em !important;
  line-height: 1.05 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.42) !important;
  transform: scale(var(--category-page-desktop-scale, 1)) !important;
  transform-origin: center !important;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease !important;
}

.category-page__link--all {
  transform: scale(var(--category-page-all-desktop-scale, 1.1)) !important;
}

.category-page__link:hover,
.category-page__link:focus-visible {
  border-color: rgba(255,255,255,.82) !important;
  background: linear-gradient(135deg, rgba(255,255,255,.40), rgba(255,255,255,.18)) !important;
  box-shadow: 0 .7rem 1.8rem rgba(12,10,8,.24), inset 0 1px 0 rgba(255,255,255,.62) !important;
  outline: none !important;
}

.category-page__link--main:hover,
.category-page__link--main:focus-visible {
  transform: scale(var(--category-page-desktop-scale, 1)) translateY(-2px) !important;
}

.category-page__link--all:hover,
.category-page__link--all:focus-visible {
  transform: scale(var(--category-page-all-desktop-scale, 1.1)) translateY(-2px) !important;
}

.category-page__subcategories {
  width: min(100%, 22rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  transform: scale(var(--category-page-sub-scale, .72));
  transform-origin: top center;
}

.category-page__sublink {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .34rem .62rem;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  background: rgba(15,15,15,.22);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
  color: #fff;
  text-decoration: none;
  font-family: var(--category-page-font-family, inherit);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0,0,0,.40);
}

.category-page__sublink:hover,
.category-page__sublink:focus-visible {
  background: rgba(255,255,255,.22);
  outline: none;
}

.category-page__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.76);
  color: #181818;
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

@media (max-width: 920px) {
  .category-page__surface,
  .category-page__overlay { min-height: 54vh !important; }

  .category-page__overlay { padding: 1rem !important; }
  .category-page__menu { gap: var(--category-page-mobile-gap, 10px) !important; }

  .category-page[data-category-mobile-grid="1"] .category-page__menu { grid-template-columns: 1fr !important; }
  .category-page[data-category-mobile-grid="2"] .category-page__menu { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .category-page[data-category-mobile-grid="compact"] .category-page__menu { grid-template-columns: repeat(2, max-content) !important; justify-content: center !important; }
  .category-page[data-category-mobile-grid="auto"] .category-page__menu { grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)) !important; }

  .category-page__group { gap: .35rem; padding: .16rem; }
  .category-page__link,
  .category-page__link--main,
  .category-page__link--all {
    font-size: var(--category-page-mobile-font-size, 18px) !important;
    padding: .38em .62em !important;
    transform: scale(var(--category-page-mobile-scale, 1)) !important;
  }
  .category-page__link--all { transform: scale(var(--category-page-all-mobile-scale, 1.1)) !important; }
  .category-page__link--main:hover,
  .category-page__link--main:focus-visible { transform: scale(var(--category-page-mobile-scale, 1)) translateY(-1px) !important; }
  .category-page__link--all:hover,
  .category-page__link--all:focus-visible { transform: scale(var(--category-page-all-mobile-scale, 1.1)) translateY(-1px) !important; }

  .category-page__subcategories { width: 100%; gap: .28rem; }
  .category-page__sublink { min-height: 1.8rem; padding: .28rem .5rem; font-size: .78rem; }
}

@media (max-width: 640px) {
  .category-page { padding-block: .9rem 1.5rem !important; }
  .category-page__surface,
  .category-page__overlay { min-height: 48vh !important; }
  .category-page__overlay { padding: .8rem !important; }
}

/* v1.9.209 — auto category centering fix.
   In AUTO mode, active categories are treated as equal-width items and each wrapped
   row is centered. Fixed 2/3/4-column presets remain unchanged. */
@media (min-width: 921px) {
  .category-page[data-category-desktop-grid="auto"] .category-page__menu {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: var(--category-page-desktop-gap, 20px) !important;
  }

  .category-page[data-category-desktop-grid="auto"] .category-page__group--all {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: none !important;
  }

  .category-page[data-category-desktop-grid="auto"] .category-page__group:not(.category-page__group--all) {
    flex: 1 1 220px !important;
    width: auto !important;
    max-width: 340px !important;
  }
}

@media (max-width: 920px) {
  .category-page[data-category-mobile-grid="auto"] .category-page__menu {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: var(--category-page-mobile-gap, 10px) !important;
  }

  .category-page[data-category-mobile-grid="auto"] .category-page__group--all {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: none !important;
  }

  .category-page[data-category-mobile-grid="auto"] .category-page__group:not(.category-page__group--all) {
    flex: 1 1 42% !important;
    width: auto !important;
    max-width: 48% !important;
  }
}
