
/* ARTDESHINE visual fixes — 2026-07-24 */

:root { --ads-sticky-header-offset: 6.25rem; }
html { scroll-padding-top: var(--ads-sticky-header-offset); }
[id] { scroll-margin-top: var(--ads-sticky-header-offset); }

/* Desktop navigation must only appear when the full navigation actually fits. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  header nav.lg\:flex,
  header > div > div.lg\:flex { display: none !important; }
  header button.lg\:hidden { display: flex !important; }
  header img[alt="Artdeshine"] { height: 2rem !important; max-width: 220px !important; }
}

/* Product gallery */
.ads-product-gallery { min-width: 0; }
.ads-product-main-frame {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
}
.ads-product-main-frame img {
  object-fit: contain !important;
  object-position: 50% 50% !important;
  margin: auto !important;
}
.ads-product-thumbnails {
  justify-content: center;
  overflow-x: auto;
  max-width: 100%;
  padding: 3px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.ads-product-thumbnails > button {
  scroll-snap-align: center;
  box-sizing: border-box;
}
.ads-product-thumbnails > button[aria-current="true"] {
  box-shadow: inset 0 0 0 2px #53d8e8;
  --tw-ring-shadow: 0 0 #0000 !important;
}

/* Product page rhythm and readable text length */
.ads-product-page main > section:not(:first-child) { padding-block: 4rem !important; }
.ads-product-page main > section:first-child { padding-top: 3.5rem !important; padding-bottom: 4.5rem !important; }
.ads-product-page .ads-long-copy > div { max-width: 75ch !important; }
.ads-product-page .ads-empty-section { display: none !important; }

/* Product specification rows */
.ads-specifications dl > div { gap: 1rem; align-items: baseline; }
.ads-specifications dt { font-weight: 500; }
.ads-specifications dd { text-align: right; }
@media (max-width: 639.98px) {
  .ads-specifications dl > div {
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    padding-block: .75rem !important;
  }
  .ads-specifications dd { text-align: left; font-size: 1rem; }
}

/* Compact product catalogue on phones without crushing text into two narrow cards. */
@media (max-width: 639.98px) {
  .ads-product-grid { grid-template-columns: 1fr !important; gap: .75rem !important; }
  .ads-product-card {
    display: grid !important;
    grid-template-columns: 100px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto 1fr !important;
    column-gap: 1rem !important;
    row-gap: .3rem !important;
    padding: 1rem !important;
    align-items: start;
  }
  .ads-product-card > :first-child {
    grid-column: 1 !important;
    grid-row: 1 / span 6 !important;
    width: 100px !important;
    align-self: start;
  }
  .ads-product-card > :nth-child(n+2) { grid-column: 2 !important; }
  .ads-product-card > :nth-child(2) { font-size: .68rem !important; line-height: 1.25 !important; }
  .ads-product-card > :nth-child(3) { font-size: 1.1rem !important; line-height: 1.15 !important; }
  .ads-product-card > :nth-child(4) {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: .82rem !important;
    line-height: 1.35 !important;
  }
  .ads-product-card > :nth-child(5) { display: none !important; }
  .ads-product-card > :nth-child(6) { margin-top: .35rem !important; font-size: .82rem !important; }
}

/* Mobile homepage hero readability. */
@media (max-width: 639.98px) {
  .ads-home-hero { min-height: 700px !important; }
  .ads-home-hero > img { object-position: 78% 58% !important; opacity: .78; }
  .ads-home-hero > div[aria-hidden="true"] {
    background: linear-gradient(90deg, rgba(0,0,0,.97) 0%, rgba(0,0,0,.88) 54%, rgba(0,0,0,.34) 100%),
                linear-gradient(0deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.08) 58%) !important;
  }
  .ads-home-hero h1 { text-wrap: balance; }
}

/* About / technology heading */
.ads-technology-section h2,
.ads-technology-section h1 {
  text-wrap: balance;
  max-width: 18ch;
}
@media (max-width: 639.98px) {
  .ads-technology-section h2,
  .ads-technology-section h1 {
    font-size: clamp(2rem, 9vw, 2.75rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -.02em;
  }
}

/* Denser information pages */
.ads-page-professionals main > section,
.ads-page-support main > section,
.ads-page-distributor main > section { padding-block: 4.5rem !important; }
@media (max-width: 639.98px) {
  .ads-page-professionals main > section,
  .ads-page-support main > section,
  .ads-page-distributor main > section { padding-block: 3rem !important; }
}

/* Support page empty state */
.ads-support-empty {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
}
.ads-support-empty h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 400; }
.ads-support-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .75rem;
  width: min(100%, 720px);
}
.ads-support-category {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .75rem;
  padding: .85rem 1rem;
  color: #d3d5d6;
  text-align: left;
  background: rgba(255,255,255,.025);
}
@media (max-width: 639.98px) { .ads-support-categories { grid-template-columns: 1fr; } }

/* Distributor page */
.ads-page-distributor main > section:first-child > div { padding-top: 2.5rem !important; }
.ads-distributor-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem 1.5rem;
  color: #a9abad;
  font-size: .95rem;
}
.ads-distributor-contact a { color: #53d8e8; }

/* Contact page layout */
.ads-page-contact main > section { padding-block: 5rem !important; }
.ads-page-contact main > section > div { gap: clamp(2rem, 6vw, 5rem) !important; }
.ads-contact-details {
  display: grid;
  gap: .85rem;
  margin-top: 1.5rem;
  color: #c8cacc;
  font-size: .95rem;
}
.ads-contact-details a { color: #53d8e8; overflow-wrap: anywhere; }
.ads-contact-detail { display: grid; gap: .15rem; }
.ads-contact-detail strong { color: #fff; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 1023.98px) {
  .ads-page-contact main > section { padding-block: 3.5rem !important; }
  .ads-page-contact main > section > div { gap: 2.5rem !important; }
}

/* Breadcrumb safety */
nav[aria-label="breadcrumbs"] { max-width: 100%; overflow-wrap: anywhere; }

/* Footer rhythm */
footer > div:first-child { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
footer a { min-height: 1.5rem; }

/* Buttons */
a.rounded-button, button.rounded-button { min-height: 44px; }

/* Improve muted text contrast while retaining the premium dark look. */
.text-fg-muted { color: #aeb1b3; }

/* Mobile menu language selector: keep it visible in the top-left corner. */
@media (max-width: 1279.98px) {
  .ads-mobile-menu {
    display: flex !important;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .ads-mobile-language {
    position: absolute !important;
    top: max(1rem, env(safe-area-inset-top, 0px)) !important;
    left: max(1rem, env(safe-area-inset-left, 0px)) !important;
    z-index: 70 !important;
  }
  .ads-mobile-language > button[aria-haspopup="listbox"] {
    min-width: 64px;
    min-height: 44px;
    justify-content: center;
    gap: .45rem !important;
    padding: .55rem .85rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 9999px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .ads-mobile-language > button[aria-haspopup="listbox"]:focus-visible {
    outline: 2px solid #53d8e8;
    outline-offset: 3px;
  }
  .ads-mobile-language ul[role="listbox"] {
    left: 0 !important;
    right: auto !important;
    top: 100% !important;
    margin-top: .5rem !important;
    min-width: 7rem !important;
    z-index: 80 !important;
    border-color: rgba(255,255,255,.18) !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.45) !important;
  }
  .ads-mobile-actions {
    justify-content: flex-end !important;
    padding-left: max(1rem, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(1rem, env(safe-area-inset-right, 0px)) !important;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 1279.98px) and (max-height: 700px) {
  .ads-mobile-menu > nav {
    justify-content: flex-start !important;
    overflow-y: auto;
    padding-top: 5.5rem !important;
    padding-bottom: 1rem !important;
  }
  .ads-mobile-menu > nav a {
    padding-top: .75rem !important;
    padding-bottom: .75rem !important;
  }
}


/* Map and browser geolocation disclosure on privacy pages. */
.ads-map-privacy-note {
  max-width: 48rem;
  margin: 2.5rem auto 0;
  padding: 1.5rem;
  border: 1px solid rgba(66, 214, 232, .28);
  border-radius: .75rem;
  background: rgba(66, 214, 232, .055);
}
.ads-map-privacy-note h2 { margin: 0 0 .65rem; font-size: clamp(1.25rem, 2.4vw, 1.65rem); }
.ads-map-privacy-note p { margin: 0; color: var(--color-fg-muted, #a8b0b5); line-height: 1.65; }

/* Standard Next.js header language dropdown: prevent layout shifts and escaped menus. */
.ads-language-dropdown {
  position: relative !important;
  flex: 0 0 auto !important;
  min-width: 44px;
  z-index: 90;
}
.ads-language-dropdown > button[aria-haspopup="listbox"] {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  white-space: nowrap;
}
.ads-language-dropdown > ul[role="listbox"] {
  right: 0 !important;
  left: auto !important;
  z-index: 100 !important;
  min-width: 6rem !important;
  max-width: min(12rem, calc(100vw - 2rem));
}

/* Fine-tune a few product thumbnails with off-centre source canvases. */
.ads-unified-image img.ads-card-image-repel { object-position: 47% 50% !important; }
.ads-unified-image img.ads-card-image-strip { object-position: 48% 50% !important; }
.ads-unified-image img.ads-card-image-cleanse { object-position: 49% 50% !important; }
.ads-static-product-image img.ads-card-image-repel,
.ads-static-product-image img.ads-card-image-strip,
.ads-static-product-image img.ads-card-image-cleanse { object-position: center center !important; }

/* Support cards can be links. */
.ads-support-category {
  display: block;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.ads-support-category:hover {
  border-color: rgba(89,199,221,.65);
  background: rgba(255,255,255,.045);
  color: #fff;
  transform: translateY(-1px);
}

/* Inline cookie settings action inside the Cookie Policy page only. */
.ads-cookie-settings-inline {
  margin-top: 1.5rem;
}
.ads-cookie-settings-inline .ads-cookie-settings-link {
  margin-left: 0;
  min-height: 44px;
  padding: 0;
  color: #53d8e8;
  font-weight: 600;
}

/* About page: let the main technology statement use the full content width. */
.ads-technology-section .ads-technology-intro {
  width: 100%;
  max-width: none !important;
}
.ads-technology-section .ads-technology-intro h2 {
  max-width: none !important;
  text-wrap: pretty;
}

/* Estonian hero contains a long unbreakable word; keep it inside narrow mobile viewports. */
@media (max-width: 420px) {
  html[lang="et"] .ads-page-home h1 {
    font-size: clamp(2.25rem, 11.4vw, 3rem) !important;
    letter-spacing: -0.018em;
  }
}
/* Prevent long Baltic compound words from causing horizontal overflow. */
main h1, main h2, main h3, main p, main li, footer a {
  overflow-wrap: anywhere;
}
