/* All viewport and reduced-motion adaptations. */

/* Responsive audit fixes are repeated at the end to follow the established cascade. */

@media(min-width:1600px) {
  .hero {
    min-height: 760px;
  }

  .product-photo {
    height: 390px;
  }
}

@media(max-width:1100px) {
  .header nav {
    gap: 16px;
    font-size: 13px;
  }

  .header {
    padding: 0 4%;
  }

  .header-actions {
    gap: 12px;
  }

  .hero-copy {
    padding-left: 9%;
    padding-top: 50px;
  }

  .hero {
    min-height: 600px;
  }

  .hero-intro {
    font-size: 16px;
  }

  .hero-note {
    margin-top: 35px;
  }

  .product-grid {
    gap: 16px;
  }

  .product-photo {
    height: 270px;
  }

  .product-card h3 {
    font-size: 22px;
  }

  .philosophy {
    gap: 6%;
  }

  .philosophy-image {
    height: 620px;
  }

  .gallery button {
    height: 330px;
  }

  .locale {
    display: none;
  }
}

@media(max-width:800px) {
  .announcement {
    font-size: 11px;
    padding: 9px 10px;
  }

  .announcement button {
    display: none;
  }

  .header {
    height: 80px;
    padding: 0 6%;
  }

  .brand img {
    width: 96px;
  }

  .header nav {
    display: none;
  }

  .menu-btn {
    display: block;
    font-size: 13px;
  }

  .header-actions {
    gap: 18px;
  }

  .bag {
    border-left: 0;
    padding-left: 0;
    font-size: 13px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding: 48px 6% 40px;
  }

  .hero h1 {
    font-size: 62px;
  }

  .hero-intro {
    max-width: 440px;
    margin: 23px 0;
  }

  .hero-buttons {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  .hero-note {
    display: none;
  }

  .hero-visual {
    height: 440px;
  }

  .hero-visual>img {
    object-position: center;
  }

  .benefit-strip {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 23px 5%;
    font-size: 12px;
  }

  .benefit-strip>*+* {
    border: 0;
  }

  .benefit-strip button {
    font-size: 12px;
  }

  .section {
    padding: 60px 6%;
  }

  .section-head {
    display: block;
    margin-bottom: 28px;
  }

  .section-head>p {
    margin-top: 20px;
  }

  .section-head>.text-link {
    display: inline-block;
    margin-top: 20px;
  }

  h2 {
    font-size: 39px;
  }

  .eyebrow {
    font-size: 11px;
    margin-bottom: 18px;
  }

  .product-grid {
    grid-template-columns: repeat(2,1fr);
    gap: 35px 16px;
  }

  .product-photo {
    height: 300px;
  }

  .product-card h3 {
    min-height: 56px;
    font-size: 23px;
  }

  .filters {
    gap: 7px;
  }

  .filters button {
    font-size: 12px;
    padding: 8px 13px;
  }

  .product-under {
    align-items: center;
    flex-direction: column;
    gap: 8px;
  }

  section.selection {
    margin: 0;
    grid-template-columns: 1fr 1fr;
    min-height: 470px;
  }

  section.selection>div:first-child {
    padding: 50px 10% 45px 12%;
  }

  section.selection h2 {
    font-size: 37px;
  }

  section.selection p:not(.eyebrow) {
    font-size: 14px;
  }

  section.selection .btn {
    font-size: 12px;
    padding: 14px 16px;
    gap: 15px;
  }

  .selection-image {
    min-height: 470px;
  }

  .selection-number {
    display: none;
  }

  .philosophy {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .philosophy-image {
    height: 480px;
  }

  .philosophy-copy>p:not(.eyebrow) {
    max-width: none;
  }

  .principle p {
    max-width: none;
  }

  .ritual-grid {
    gap: 22px;
    margin-top: 35px;
  }

  .ritual-grid article+article {
    padding-left: 20px;
  }

  .ritual h3 {
    font-size: 24px;
  }

  .ritual-grid p {
    font-size: 14px;
  }

  .step {
    font-size: 10px;
  }

  .review-section {
    padding: 60px 6%;
  }

  .gallery {
    grid-auto-columns: 100%;
  }

  .gallery button {
    height: 380px;
  }

  .faq {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .newsletter {
    padding: 50px 6%;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .newsletter h2 {
    font-size: 38px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer-top>.brand {
    grid-column: 1;
  }

  .footer-top>p {
    grid-column: 2/4;
  }

  .footer-bottom {
    flex-wrap: wrap;
  }

  .modal-product {
    grid-template-columns: 1fr;
  }

  .modal-product-image>img {
    height: 260px;
  }

  dialog {
    padding: 60px 25px 30px;
  }

  .cart-dialog {
    padding: 65px 25px 30px;
  }
}

@media(max-width:480px) {
  .hero h1 {
    font-size: 56px;
  }

  .hero-visual {
    height: 350px;
  }

  .hero-buttons {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .image-caption {
    padding: 18px 20px;
    font-size: 11px;
  }

  .product-photo {
    height: 230px;
  }

  .product-photo img {
    padding: 10px;
  }

  .product-label {
    font-size: 9px;
    left: 10px;
    top: 10px;
  }

  .product-card h3 {
    font-size: 21px;
    min-height: 55px;
  }

  .product-meta {
    font-size: 12px;
    min-height: 42px;
  }

  .product-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .product-card .product-type {
    font-size: 10px;
    letter-spacing: 1px;
  }

  section.selection {
    grid-template-columns: 1fr;
  }

  section.selection>div:first-child {
    padding: 45px 7%;
  }

  .selection-image {
    height: 340px;
    min-height: 0;
  }

  section.selection h2 {
    font-size: 40px;
  }

  section.selection small {
    font-size: 11px;
  }

  .philosophy-image {
    height: 390px;
  }

  .ritual-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .ritual-grid article+article {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 26px 0 0;
  }

  .ritual h3 {
    margin-top: 15px;
    font-size: 27px;
  }

  .gallery {
    grid-auto-columns: 100%;
  }

  .gallery button {
    height: 330px;
  }

  .faq-list summary {
    font-size: 16px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-top>p {
    grid-column: 2;
  }

  .footer-top>div:last-child {
    grid-column: 1/3;
  }

  .footer-bottom {
    font-size: 10px;
  }

  .choices {
    grid-template-columns: 1fr;
  }

  .modal-product h2,
  dialog h2 {
    font-size: 31px;
  }

  .brand {
    font-size: 32px;
  }

  .header-actions {
    gap: 10px;
  }

  .bag span {
    width: 22px;
    height: 22px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *:before,
  *:after {
    transition: none!important;
    animation: none!important;
  }
}

@media(max-width:600px) {
  .gallery-shell {
    grid-template-columns: 40px minmax(0,1fr) 40px;
    gap: 7px;
  }

  .gallery-control {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .gallery-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media(max-width:800px) {
  .modal-product-image img {
    height: 260px;
  }

  .product-thumbnail {
    min-width: 0;
  }
}

@media (max-width: 800px) {
  .header > .brand {
    width: 100px;
    height: 72px;
  }

  .header > .brand img {
    width: 100px !important;
    transform: scale(3.4);
  }
}

@media (max-width: 1400px) {
  .header nav {
    gap: 14px;
    font-size: .875rem;
  }

  .header-actions {
    gap: 12px;
    font-size: .875rem;
  }
}

@media (max-width: 1100px) {
  .header nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
  }

  .mobile-nav {
    position: fixed;
    top: 115px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 25;
    padding: 24px;
    background: var(--cream);
  }

  .mobile-nav a,
  .mobile-nav button {
    display: block;
    padding: 12px;
    text-align: left;
  }

  .checkout-layout {
    gap: 32px;
  }
}

@media (max-width: 800px) {
  .product-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .product-copy {
    padding-top: 0;
  }

  .product-page {
    padding-bottom: 110px;
  }

  body:has(.mobile-purchase) footer {
    padding-bottom: max(110px, 8rem);
  }

  .mobile-purchase {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
  }

  .mobile-purchase .btn {
    min-height: 48px;
    padding: 12px 18px;
    font-size: .875rem;
  }

  .checkout-summary {
    position: static;
  }

  .related-products .product-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .catalog-tools {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .breadcrumbs {
    margin-bottom: 28px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px 16px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .header > .brand {
    width: 86px;
    flex: 0 0 86px;
  }

  .header-actions {
    margin-left: auto;
    gap: 8px;
    font-size: .875rem;
  }

  .header-actions .locale,
  .header-actions .search-button {
    display: none;
  }

  .mobile-nav {
    top: 130px;
  }

  .field-grid,
  .related-products .product-grid {
    grid-template-columns: 1fr;
  }

  .product-information dl {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    padding: 24px 18px;
  }

  .search-result {
    grid-template-columns: 48px 1fr;
    gap: 12px;
  }

  .search-result strong {
    grid-column: 2;
  }

  .purchase-controls .btn {
    flex: 1;
    padding: 16px;
  }

  .announcement {
    flex-wrap: wrap;
    padding: 6px 12px;
    gap: 4px 12px;
  }

  .announcement a {
    font-size: .75rem;
  }
}

@media (max-width: 1100px) {
  .comparison-table { display: none; }
  .comparison-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .header .locale { display: inline-flex; }
  .mobile-nav { max-height: calc(100dvh - 80px); }
}
@media (max-width: 800px) {
  .announcement, .announcement a, .benefit-strip, .benefit-strip a, .eyebrow, .filters button, .product-meta, .product-card .product-type, .product-label, .step, .footer-bottom { font-size: .875rem; }
  .hero h1 { font-size: clamp(42px, 10vw, 62px); }
  section.selection p:not(.eyebrow), .ritual-grid p { font-size: 1rem; }
  .catalog-tools { grid-template-columns: 1fr; gap: 16px; }
  .compare-link { justify-self: start; }
  .product-page > .product-layout { display: flex; flex-direction: column; gap: 28px; }
  .product-copy { display: contents; }
  .product-summary { order: -3; }
  .product-buy { order: -1; }
  .product-copy h1 { font-size: clamp(34px, 7vw, 48px); }
  .product-copy .page-intro { margin: 16px 0; }
  .purchase-controls { margin: 16px 0; }
  .product-information { scroll-margin-top: 100px; }
  .product-page .product-gallery { order: -2; max-width: 450px; width: 100%; align-self: center; }
  .product-main-image img { height: 260px; aspect-ratio: auto; object-fit: contain; }
  .section.product-page { padding-top: 24px; }
  .product-page .breadcrumbs { margin-bottom: 20px; }
  .product-jumps { gap: 4px 16px; }
  .checkout-summary { order: -1; }
  .checkout-layout { display: flex; flex-direction: column; }
  .checkout-layout > * { width: 100%; }
  .mobile-purchase { padding-inline: 16px; }
  .mobile-purchase .btn { font-size: .875rem; }
  .gallery-control { min-width: 44px; min-height: 44px; }
  .gallery-shell { grid-template-columns: 44px minmax(0,1fr) 44px; }
  .source-note, .stock-note { overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-photo, .catalog-page .product-photo { height: 290px; }
  .product-card h3 { min-height: 0; font-size: 26px; }
  .product-meta { min-height: 0; }
  .product-bottom { flex-direction: row; align-items: center; }
  .product-label { top: 12px; left: 12px; max-width: calc(100% - 24px); }
  .comparison-cards { grid-template-columns: 1fr; }
  .header-actions .locale { display: none; }
  .hero-copy { padding-top: 32px; }
  .section.catalog-page { padding-top: 24px; }
  .mobile-purchase .btn { flex: 1; justify-content: center; }
}

@media (max-width: 600px) {
  .product-value div { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
  .checkout-item { grid-template-columns: 48px minmax(0, 1fr); gap: 10px 12px; }
  .checkout-item > strong { grid-column: 2; }
  .checkout-item > a { grid-row: span 2; }
  .checkout-item img { width: 48px; height: 64px; }
  .checkout-summary { padding: 24px; }
  #checkout-submit, #checkout-pay { width: 100%; justify-content: center; }
  .checkout-steps { font-size: .875rem; gap: 12px 20px; }
}

/* =========================================================
   FINAL RESPONSIVE OVERFLOW HARDENING
   Keeps the existing INEX design while preventing intrinsic
   image/grid widths from expanding the document viewport.
   ========================================================= */

/* Generic safeguards used at every viewport width. */
.gallery-shell {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.gallery-shell .gallery {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.philosophy {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

.philosophy > * {
  min-width: 0;
}

.philosophy-image {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.philosophy-image picture {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
}

.philosophy-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The footer grid must be allowed to shrink below intrinsic
   content widths. The logo must not use its 1584px source width. */
.footer-top {
  grid-template-columns:
    minmax(0, .8fr)
    minmax(0, 1.3fr)
    repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.footer-top > * {
  min-width: 0;
}

.footer-top > .brand {
  width: 118px;
  max-width: 100%;
  min-width: 0;
}

.footer-top > .brand img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Tablet and mobile layout. */
@media (max-width: 800px) {
  .philosophy {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .philosophy > * {
    min-width: 0;
  }

  .philosophy-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .philosophy-image picture {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .philosophy-image img {
    width: 100%;
    max-width: 100%;
  }

  .gallery-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .gallery-shell .gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .footer-top {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .footer-top > * {
    min-width: 0;
  }

  .footer-top > .brand {
    grid-column: 1;
    width: 96px;
    max-width: 100%;
    min-width: 0;
  }

  .footer-top > .brand img {
    display: block;
    width: 96px;
    max-width: 100%;
    height: auto;
  }

  .footer-top > p {
    grid-column: 2 / 4;
    min-width: 0;
  }
}

/* Narrow phones. */
@media (max-width: 480px) {
  .footer-top {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .footer-top > p {
    grid-column: 2;
  }

  .footer-top > div:last-child {
    grid-column: 1 / 3;
  }

  .footer-top > .brand {
    width: 96px;
    max-width: 100%;
    min-width: 0;
  }

  .footer-top > .brand img {
    width: 96px;
    max-width: 100%;
  }

  .philosophy-image {
    height: 390px;
  }
}
/* Noņem atdalošās līnijas benefit strip blokā */
.benefit-strip > * + * {
  border-left: 0 !important;
  border-inline-start: 0 !important;
}