:root {
  --layout-width: 1216px;
  --layout-gutter: 30px;
  --layout-title: clamp(34px, 4.2vw, 64px);
  --layout-category-media-height: clamp(280px, 31vw, 450px);
}

body .utility > .container,
body .header > .container,
body .subasi-search-strip:not(.home-search-dock) > .container,
body main .container {
  width: min(var(--layout-width), calc(100% - 2 * var(--layout-gutter)));
  max-width: var(--layout-width);
  margin-inline: auto;
}

main .catalog-bread {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-block: 0 24px;
}

main h1 {
  overflow-wrap: anywhere;
}

main .v17-category-hero-inner {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}

main .v17-category-copy h1 {
  font-size: var(--layout-title);
  text-wrap: balance;
}

main .v17-category-picture,
main .v23-hero-gallery {
  width: 100%;
  height: var(--layout-category-media-height);
  aspect-ratio: auto;
  min-width: 0;
}

main .v17-category-picture.full-product-photo {
  max-width: var(--layout-category-media-height);
  justify-self: center;
}

main .v23-hero-gallery {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}

main.v22-product .catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(22px, 3vw, 40px);
  min-height: 0 !important;
}

main.v22-product .catalog-head > div {
  min-width: 0;
}

main.v22-product .catalog-head h1 {
  font-size: var(--layout-title) !important;
  line-height: 1.12;
  margin: 10px 0 18px;
}

main.v22-product .catalog-head :is(.v17-product-cta, .v17-hero-actions) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

main.v22-product .catalog-head :is(.kiwo-product-photo, .v19-hero-media, .v28-detail-img) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1;
  padding: 0;
  background: #f7f7fa;
  border: 1px solid #e9e7ef;
  border-radius: 3px;
  overflow: hidden;
}

main.v22-product .catalog-head :is(.kiwo-product-photo, .v19-hero-media, .v28-detail-img) > img {
  display: block;
  width: 100%;
  height: 100% !important;
  max-height: none;
  object-fit: contain !important;
  box-shadow: none;
}

main :is(.featured-product-image, .catalog-card :is(.v22-thumb, .v17-card-media, .v27-card-thumb, .v28-thumb)) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
}

main :is(.featured-product-image, .catalog-card :is(.v22-thumb, .v17-card-media, .v27-card-thumb, .v28-thumb)) img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain !important;
}

main :is(.profile-hero, .cert-hero, .sss-hero, .contact-hero-v41, .search-results-head, .v22-search-hero) h1 {
  font-size: var(--layout-title);
  line-height: 1.12;
  margin-block: 12px 18px;
}

body .subasi-search-field,
body .subasi-search-field input {
  min-width: 0;
}

@media (max-width: 1000px) {
  :root { --layout-gutter: 22px; }
}

@media (max-width: 760px) {
  :root {
    --layout-gutter: 17px;
    --layout-title: clamp(30px, 7.5vw, 44px);
    --layout-category-media-height: clamp(220px, 65vw, 360px);
    --layout-hero-media-limit: clamp(240px, 60vw, 360px);
  }

  main .v17-category-hero-inner,
  main.v22-product .catalog-head {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 22px;
  }

  main .v17-category-picture.full-product-photo,
  main.v22-product .catalog-head :is(.kiwo-product-photo, .v19-hero-media, .v28-detail-img) {
    max-width: var(--layout-hero-media-limit);
    justify-self: center;
  }

  main .v17-category-picture.ragle-hero-photo {
    max-width: calc(var(--layout-hero-media-limit) * 1.2);
    justify-self: center;
  }

  main .v17-sectionbar .v17-count {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  main .catalog-bread {
    margin-bottom: 18px;
  }
}

/* Keep the clickable area fixed when the pointer enters a card or button. */
body :is(.header .navtools .cta, .subasi-search-form button, .catalog-links a,
  .catalog-card, .featured-product, .home-shortcut-card, .home-search-result):is(:hover, :focus-visible),
body .catalog-card:hover .product-thumb {
  transform: none;
}

@media (max-width: 760px) {
  .header .navlinks.open {
    align-items: stretch;
    overscroll-behavior: contain;
  }

  .header .nav-dropdown .dropdown-panel {
    box-sizing: border-box;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header .menu-caret,
  .subasi-search-form button,
  main :is(.catalog-links a, .catalog-card, .featured-product, .home-shortcut-card, .product-thumb) {
    transition: none;
  }

  .premium-hero .premium-slide .slide-photo {
    transform: none;
  }
}

body a.floating-contact.floating-whatsapp {
  position: fixed;
  right: 23px;
  bottom: 23px;
  z-index: 30;
  padding: 13px 18px;
  background: #126647;
  color: #fff;
  border-radius: 3px;
  box-shadow: 0 10px 33px #1713273d;
  font: 800 12px Manrope, Arial, sans-serif;
  text-decoration: none;
}

body a.floating-contact.floating-whatsapp:is(:hover, :focus-visible) {
  background: #0d5138;
}

@media (max-width: 760px) {
  body a.floating-contact.floating-whatsapp {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 12px;
  }
}

main .v17-category-picture.ragle-hero-photo {
  height: auto;
  aspect-ratio: 1374 / 1145;
  align-self: center;
}

.ragle-hero-photo > img {
  display: block;
  object-fit: contain;
}

.ragle-hero-photo::after {
  content: none;
}

/* Use the compact navigation before the full menu runs out of room. */
@media (min-width: 761px) and (max-width: 1050px) {
  .header .nav { position: relative; }
  .header .navtools { margin-left: auto; }
  .header .navtools > .cta { display: inline-flex; }
  .header .menu-toggle { display: block; }
  .header .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--layout-gutter));
    right: calc(-1 * var(--layout-gutter));
    max-height: calc(100dvh - 122px);
    overflow-y: auto;
    padding: 14px 17px 24px;
    background: #fff;
    box-shadow: 0 20px 24px #2221;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    white-space: normal;
    overscroll-behavior: contain;
  }
  .header .navlinks.open { display: flex; }
  .header .nav-dropdown { width: 100%; }
  .header .dropdown-trigger,
  .header .navlinks > .nav-direct {
    width: 100%;
    padding: 15px 10px;
    font-size: 14px;
    justify-content: space-between;
    border-bottom: 1px solid #f0eff3;
    border-radius: 0;
  }
  .header .nav-dropdown .dropdown-panel {
    display: none;
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    border: 0;
    border-left: 2px solid #e53291;
    border-radius: 0;
    margin: 4px 0 8px 12px;
    padding: 5px 7px;
    background: #fcfaff;
  }
  .header .nav-dropdown.is-open .dropdown-panel { display: block; }
  .header .dropdown-title { display: none; }
  .header .dropdown-panel a { padding: 10px 9px; font-size: 13px; line-height: 1.45; }
}

/* Preserve long policy URLs while allowing their text to fit small screens. */
.profile-v38 .profile-section a[href] { overflow-wrap: anywhere; }
