/**
 * TVUJORIGINAL UI — CATEGORY MODULE
 * Version: 1.5.0
 * Straight edges, white space, soft photo fades, no card borders.
 */

:root {
  --to-cat-text: #302820;
  --to-cat-muted: #756b63;
  --to-cat-beige: #b6a99a;
  --to-cat-beige-dark: #806c5a;
  --to-cat-green: #84ab09;
  --to-cat-white: #ffffff;
  --to-cat-soft: #f8f5f2;
  --to-cat-line: rgba(88, 68, 52, .12);
}

body.type-category .to-category-ui,
body.type-category .to-category-ui *,
body.type-category .to-category-ui *::before,
body.type-category .to-category-ui *::after {
  box-sizing: border-box;
}

body.type-category .to-category-ui {
  color: var(--to-cat-text);
  font-family: inherit;
  background: #fff;
}

.to-category-ui {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

/* HERO — first content after breadcrumbs */
.to-category-hero {
  position: relative;
  width: 100%;
  background:
    radial-gradient(circle at 78% 36%, rgba(214, 201, 190, .18), transparent 34%),
    linear-gradient(108deg, #ffffff 0%, #fcfaf8 44%, #f7f2ed 77%, #ffffff 100%);
}

.to-category-hero__inner {
  width: min(1260px, calc(100% - 56px));
  min-height: 340px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr);
  align-items: center;
  gap: clamp(30px, 4.5vw, 68px);
  padding: clamp(30px, 4vw, 52px) 0;
}

.to-category-hero__copy {
  position: relative;
  z-index: 3;
}

.to-category-kicker {
  margin: 0 0 13px;
  color: var(--to-cat-beige-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.to-category-title {
  max-width: 700px;
  margin: 0;
  color: var(--to-cat-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.035em;
}

.to-category-lead {
  max-width: 610px;
  margin: 16px 0 0;
  color: var(--to-cat-muted);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.58;
}

.to-category-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 25px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.to-category-benefits li {
  position: relative;
  padding-left: 18px;
  color: var(--to-cat-text);
  font-size: 14px;
  font-weight: 650;
}

.to-category-benefits li::before {
  position: absolute;
  top: .46em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--to-cat-green);
  content: "";
}

/* Hero photo composition */
.to-category-hero__photos {
  position: relative;
  min-height: 280px;
}

.to-category-hero__photo {
  position: absolute;
  display: block;
  overflow: hidden;
  background: transparent;
  text-decoration: none;
}

.to-category-hero__photo::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.to-category-hero__photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .45s ease;
}

.to-category-hero__photo:hover img {
  transform: scale(1.025);
}

.to-category-hero__photo--main {
  top: 0;
  right: 1%;
  width: 66%;
  height: 88%;
  z-index: 1;
}

.to-category-hero__photo--main::after {
  background:
    linear-gradient(90deg, rgba(250,248,246,.84) 0%, rgba(248,245,242,.18) 24%, transparent 43%),
    linear-gradient(0deg, rgba(255,255,255,.72) 0%, transparent 24%);
}

.to-category-hero__photo--small-a {
  left: 0;
  bottom: 2%;
  width: 39%;
  height: 51%;
  z-index: 2;
}

.to-category-hero__photo--small-a::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,.82) 0%, transparent 24%),
    linear-gradient(0deg, rgba(255,255,255,.74) 0%, transparent 25%),
    linear-gradient(180deg, rgba(255,255,255,.45) 0%, transparent 20%);
}

.to-category-hero__photo--small-b {
  top: 7%;
  left: 12%;
  width: 31%;
  height: 39%;
  z-index: 3;
}

.to-category-hero__photo--small-b::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,.72) 0%, transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.65) 0%, transparent 26%);
}

/* Trust line */
.to-category-trust {
  width: min(1260px, calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 24px 0;
  background: #fff;
  border-top: 1px solid var(--to-cat-line);
  border-bottom: 1px solid var(--to-cat-line);
}

.to-category-trust__item {
  padding: 3px 24px;
  text-align: center;
}

.to-category-trust__item + .to-category-trust__item {
  border-left: 1px solid var(--to-cat-line);
}

.to-category-trust__value {
  display: block;
  color: var(--to-cat-text);
  font-size: 17px;
  font-weight: 700;
}

.to-category-trust__label {
  display: block;
  margin-top: 4px;
  color: var(--to-cat-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Inspiration / Story engine */
.to-category-story {
  width: min(1260px, calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 7vw, 105px);
  align-items: center;
  padding: clamp(48px, 6vw, 82px) 0;
  background: #fff;
}

.to-category-story__copy p:not(.to-category-kicker) {
  max-width: 460px;
  margin: 17px 0 0;
  color: var(--to-cat-muted);
  font-size: 16px;
  line-height: 1.66;
}

.to-category-section-title {
  margin: 0;
  color: var(--to-cat-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 3.5vw, 47px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.025em;
}


.to-category-story__heading-link {
  color: inherit !important;
  text-decoration: none !important;
}

.to-category-story__heading-link:hover .to-category-section-title {
  color: var(--to-cat-beige-dark);
}

.to-category-story__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
  padding: 0 0 5px;
  color: var(--to-cat-text) !important;
  border-bottom: 1px solid var(--to-cat-beige);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}

.to-category-story__link::after {
  content: "→";
  transition: transform .2s ease;
}

.to-category-story__link:hover::after {
  transform: translateX(4px);
}

/* Polaroid-like cluster inspired by product detail, but no frames */
.to-category-story__cluster {
  position: relative;
  min-height: 320px;
}

.to-category-story__photo {
  position: absolute;
  display: block;
  overflow: visible;
  text-decoration: none;
  background: #fff;
  transition: transform .25s ease;
}

.to-category-story__photo::before {
  position: absolute;
  inset: -10px -10px -30px;
  z-index: -1;
  background: rgba(255,255,255,.98);
  box-shadow: 0 16px 30px rgba(62,45,33,.10);
  content: "";
}

.to-category-story__photo::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.35) 0%, transparent 16%),
    linear-gradient(0deg, rgba(255,255,255,.36) 0%, transparent 17%);
  pointer-events: none;
  content: "";
}

.to-category-story__photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.to-category-story__photo:hover {
  z-index: 20 !important;
  transform: rotate(0deg) translateY(-5px) !important;
}

.to-category-story__photo:nth-child(1) {
  width: 34%;
  height: 49%;
  left: 3%;
  top: 17%;
  z-index: 4;
  transform: rotate(-5deg);
}

.to-category-story__photo:nth-child(2) {
  width: 32%;
  height: 44%;
  left: 31%;
  top: 3%;
  z-index: 5;
  transform: rotate(3deg);
}

.to-category-story__photo:nth-child(3) {
  width: 32%;
  height: 47%;
  right: 5%;
  top: 17%;
  z-index: 3;
  transform: rotate(5deg);
}

.to-category-story__photo:nth-child(4) {
  width: 34%;
  height: 43%;
  left: 19%;
  bottom: 1%;
  z-index: 7;
  transform: rotate(2deg);
}

.to-category-story__photo:nth-child(5) {
  width: 33%;
  height: 43%;
  right: 18%;
  bottom: 0;
  z-index: 6;
  transform: rotate(-4deg);
}

/* Hide duplicate original category heading/perex only after our hero exists */
body.type-category.to-category-ui-active .category-top > .category-title,
body.type-category.to-category-ui-active h1.category-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Keep Shoptet product area intact */
body.type-category.to-category-ui-active #content-wrapper {
  margin-top: 0;
}

body.type-category.to-category-ui-active #products {
  scroll-margin-top: 115px;
}

@media (max-width: 1050px) {
  .to-category-hero__inner {
    grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr);
  }

  .to-category-trust {
    grid-template-columns: repeat(3, 1fr);
  }

  .to-category-trust__item + .to-category-trust__item {
    border-left: 0;
  }
}

@media (max-width: 780px) {
  .to-category-hero__inner {
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 0 28px;
  }

  .to-category-hero__photos {
    order: -1;
    min-height: 245px;
  }

  .to-category-hero__copy {
    padding: 0 20px;
  }

  .to-category-title {
    font-size: clamp(34px, 10vw, 48px);
  }

  .to-category-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .to-category-hero__photo--main {
    right: 0;
    width: 73%;
    height: 91%;
  }

  .to-category-hero__photo--small-a {
    left: 0;
    width: 44%;
    height: 47%;
  }

  .to-category-hero__photo--small-b {
    left: 8%;
    width: 35%;
    height: 37%;
  }

  .to-category-trust {
    width: calc(100% - 40px);
    grid-template-columns: 1fr 1fr;
    padding: 16px 0;
  }

  .to-category-trust__item {
    padding: 11px 6px;
  }

  .to-category-story {
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 48px 0 60px;
  }

  .to-category-story__cluster {
    min-height: 360px;
  }
}

@media (max-width: 430px) {
  .to-category-benefits {
    grid-template-columns: 1fr;
  }

  .to-category-trust {
    grid-template-columns: 1fr;
  }

  .to-category-story__cluster {
    min-height: 285px;
  }

  .to-category-story__photo::before {
    inset: -6px -6px -22px;
  }
}


/* Assurance blocks inserted between products */
.to-category-assurance {
  width: 100% !important;
  max-width: none !important;
  flex: 0 0 100% !important;
  grid-column: 1 / -1 !important;
  margin: clamp(28px, 4vw, 52px) 0;
  padding: 0 !important;
  background: transparent !important;
}

.to-category-assurance__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  align-items: center;
  min-height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 44%, rgba(207, 191, 178, .16), transparent 31%),
    linear-gradient(108deg, #ffffff 0%, #fcfaf8 48%, #f7f2ed 82%, #ffffff 100%);
}

.to-category-assurance:nth-of-type(even) .to-category-assurance__inner {
  grid-template-columns: minmax(360px, 1.08fr) minmax(0, .92fr);
}

.to-category-assurance__copy {
  position: relative;
  z-index: 2;
  padding: clamp(30px, 4.2vw, 58px);
}

.to-category-assurance:nth-of-type(even) .to-category-assurance__copy {
  order: 2;
}

.to-category-assurance__kicker {
  margin: 0 0 10px;
  color: var(--to-cat-beige-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.to-category-assurance__title {
  max-width: 620px;
  margin: 0;
  color: var(--to-cat-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.to-category-assurance__text {
  max-width: 620px;
  margin: 15px 0 0;
  color: var(--to-cat-muted);
  font-size: 15px;
  line-height: 1.65;
}

.to-category-assurance__points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 21px;
  margin: 19px 0 0;
  padding: 0;
  list-style: none;
}

.to-category-assurance__points li {
  position: relative;
  padding-left: 16px;
  color: var(--to-cat-text);
  font-size: 13px;
  font-weight: 650;
}

.to-category-assurance__points li::before {
  position: absolute;
  top: .48em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--to-cat-green);
  content: "";
}

.to-category-assurance__link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 22px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--to-cat-beige);
  color: var(--to-cat-text) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}

.to-category-assurance__link::after {
  content: "→";
  transition: transform .2s ease;
}

.to-category-assurance__link:hover::after {
  transform: translateX(4px);
}

.to-category-assurance__visual {
  position: relative;
  min-height: 260px;
  height: 100%;
  overflow: hidden;
}

.to-category-assurance:nth-of-type(even) .to-category-assurance__visual {
  order: 1;
}

.to-category-assurance__visual::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.12) 29%, transparent 48%),
    linear-gradient(0deg, rgba(255,255,255,.55) 0%, transparent 24%);
  pointer-events: none;
  content: "";
}

.to-category-assurance:nth-of-type(even) .to-category-assurance__visual::after {
  background:
    linear-gradient(270deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.12) 29%, transparent 48%),
    linear-gradient(0deg, rgba(255,255,255,.55) 0%, transparent 24%);
}

.to-category-assurance__visual a {
  display: block;
  width: 100%;
  height: 100%;
}

.to-category-assurance__visual img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: block;
  object-fit: cover;
  transition: transform .4s ease;
}

.to-category-assurance__visual a:hover img {
  transform: scale(1.025);
}

@media (max-width: 780px) {
  .to-category-assurance {
    margin: 26px 0;
  }

  .to-category-assurance__inner,
  .to-category-assurance:nth-of-type(even) .to-category-assurance__inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .to-category-assurance__copy,
  .to-category-assurance:nth-of-type(even) .to-category-assurance__copy {
    order: 2;
    padding: 27px 20px 31px;
  }

  .to-category-assurance__visual,
  .to-category-assurance:nth-of-type(even) .to-category-assurance__visual {
    order: 1;
    min-height: 215px;
  }

  .to-category-assurance__visual img {
    min-height: 215px;
  }

  .to-category-assurance__visual::after,
  .to-category-assurance:nth-of-type(even) .to-category-assurance__visual::after {
    background:
      linear-gradient(0deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.08) 35%, transparent 58%);
  }

  .to-category-assurance__points {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }
}


/* V1.5.0 — compact assurance layout aligned to complete product rows */
.to-category-assurance {
  width: 100% !important;
  max-width: none !important;
  flex: 0 0 100% !important;
  grid-column: 1 / -1 !important;
  margin: 24px 0 34px !important;
}

.to-category-assurance__inner {
  width: min(920px, calc(100% - 32px));
  min-height: 180px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, .95fr);
  background:
    radial-gradient(circle at 78% 46%, rgba(207, 191, 178, .11), transparent 32%),
    linear-gradient(108deg, #ffffff 0%, #fcfaf8 54%, #f8f4f0 86%, #ffffff 100%);
}

.to-category-assurance:nth-of-type(even) .to-category-assurance__inner {
  grid-template-columns: minmax(290px, .95fr) minmax(0, 1.05fr);
}

.to-category-assurance__copy {
  padding: 25px 30px;
}

.to-category-assurance__title {
  font-size: clamp(24px, 2.2vw, 34px);
}

.to-category-assurance__text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.to-category-assurance__points {
  margin-top: 13px;
  gap: 7px 16px;
}

.to-category-assurance__points li {
  font-size: 12px;
}

.to-category-assurance__link {
  margin-top: 15px;
  font-size: 13px;
}

.to-category-assurance__visual,
.to-category-assurance__visual img {
  min-height: 180px;
}

@media (max-width: 780px) {
  .to-category-assurance {
    margin: 18px 0 26px !important;
  }

  .to-category-assurance__inner,
  .to-category-assurance:nth-of-type(even) .to-category-assurance__inner {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
  }

  .to-category-assurance__copy,
  .to-category-assurance:nth-of-type(even) .to-category-assurance__copy {
    padding: 21px 18px 24px;
  }

  .to-category-assurance__visual,
  .to-category-assurance__visual img {
    min-height: 165px;
  }

  .to-category-assurance__title {
    font-size: clamp(23px, 7vw, 30px);
  }

  .to-category-assurance__text {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-category-ui *,
  .to-category-ui *::before,
  .to-category-ui *::after {
    transition: none !important;
  }
}
