/* Restored existing header rules from magicstudio.css, 2026-09-12. */
.magicstudio-desktop-header-logo {
  display: none !important;
}

/* Tablets keep the current layout, but the tall header must leave with the page. */
@media (min-width: 768px) and (max-width: 1199.98px),
  (min-width: 768px) and (hover: none),
  (min-width: 768px) and (pointer: coarse) {
  html body #header,
  html body header.header,
  html body .js-sticky-header {
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }
}

/* Desktop-only compact header: light identity row and one dark navigation rail. */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  html body .header-top {
    border-bottom: 1px solid rgba(199, 161, 93, .3) !important;
    background:
      linear-gradient(100deg, rgba(199, 161, 93, .1), transparent 34%),
      #fffdf8 !important;
    color: #4d3828 !important;
    padding-block: 0 !important;
    box-shadow: 0 8px 24px rgba(8, 7, 6, .06) !important;
  }

  html body .header-top .container-md,
  html body .magicstudio-header .header-bottom__container {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1760px !important;
    padding-right: 24px !important;
    padding-left: 24px !important;
  }

  html body .header-top .row {
    display: grid !important;
    grid-template-columns: auto minmax(130px, 1fr) auto !important;
    gap: clamp(1rem, 2vw, 2rem) !important;
    align-items: center !important;
    min-height: 64px !important;
    height: 64px !important;
    margin: 0 !important;
  }

  html body .header-top .magicstudio-desktop-header-logo {
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  html body .header-top .magicstudio-desktop-header-logo .navbar-brand {
    display: flex !important;
    align-items: center !important;
    width: clamp(260px, 23vw, 330px) !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  html body .header-top .magicstudio-desktop-header-logo .logo {
    display: block !important;
    width: 100% !important;
    max-width: 330px !important;
    height: auto !important;
    max-height: 40px !important;
    object-fit: contain !important;
    object-position: left center !important;
    filter: none !important;
  }

  html body .header-top__left,
  html body .header-top__right {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
  }

  html body .header-top__left {
    justify-self: start !important;
  }

  html body .header-top__left .ps-contactinfo__phone,
  html body .header-top__left .ps-contactinfo__phone:visited {
    display: inline-flex !important;
    gap: .42rem !important;
    align-items: center !important;
    color: #5a402e !important;
    font-size: clamp(.78rem, 1vw, .98rem) !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  html body .header-top__left .ps-contactinfo__phone:hover,
  html body .header-top__left .ps-contactinfo__phone:focus,
  html body .header-top__left .ps-contactinfo__phone:active {
    color: #8f3328 !important;
    text-decoration: none !important;
  }

  html body .header-top__left .ps-contactinfo__phone::before {
    content: "\e0cd";
    color: #76522f;
    font-family: "Material Icons";
    font-size: 20px;
    font-weight: normal;
    line-height: 1;
  }

  html body .header-top__right {
    justify-self: end !important;
    gap: .5rem !important;
  }

  html body .header-top #_desktop_ps_languageselector .magicstudio-switcher__toggle,
  html body .header-top #_desktop_ps_currencyselector .magicstudio-switcher__toggle,
  html body .header-top #_desktop_ps_customersignin .header-block__action-btn,
  html body .header-top #_desktop_ps_shoppingcart .header-block__action-btn {
    min-height: 42px !important;
    height: 42px !important;
    border-radius: 7px !important;
    padding: 0 .78rem !important;
    font-size: clamp(12px, .92vw, 14px) !important;
  }

  html body .header-top #_desktop_ps_customersignin .header-block__icon,
  html body .header-top #_desktop_ps_shoppingcart .header-block__icon {
    font-size: 20px !important;
  }

  html body .magicstudio-header {
    border-bottom: 1px solid rgba(199, 161, 93, .42) !important;
    background:
      linear-gradient(90deg, rgba(102, 33, 25, .7), transparent 28%, rgba(87, 52, 25, .5)),
      #17110d !important;
    box-shadow: 0 13px 30px rgba(8, 7, 6, .14) !important;
  }

  html body .magicstudio-header .header-bottom__container > .header-bottom__row {
    display: grid !important;
    grid-template-columns: minmax(560px, 1fr) clamp(150px, 14vw, 205px) clamp(300px, 29vw, 430px) !important;
    grid-template-areas: "mega sale search" !important;
    gap: 12px !important;
    align-items: center !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding-block: 4px !important;
  }

  html body .magicstudio-header.magicstudio-header
    .header-bottom__container.header-bottom__container
    > .header-bottom__row.header-bottom__row
    > .header-bottom__logo.header-bottom__logo,
  html body .magicstudio-header.magicstudio-header
    .header-bottom__container.header-bottom__container
    > .header-bottom__row.header-bottom__row
    > .magicstudio-header-slogan.magicstudio-header-slogan {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    position: absolute !important;
    visibility: hidden !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  html body .magicstudio-header
    .header-bottom__container
    > .header-bottom__row:not(:has(> .magicmegamenu-sale-cta)) {
    grid-template-columns: minmax(560px, 1fr) clamp(300px, 29vw, 430px) !important;
    grid-template-areas: "mega search" !important;
  }

  html body .magicstudio-header nav.magicmegamenu,
  html body .magicstudio-header .magicmegamenu {
    grid-area: mega !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body .magicstudio-header .magicmegamenu__list {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body .magicstudio-header .magicmegamenu__link {
    position: relative !important;
    min-height: 48px !important;
    height: 100% !important;
    padding: 0 .38rem !important;
    color: #fff8ea !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: clamp(12px, 1vw, 16px) !important;
    font-weight: 600 !important;
    letter-spacing: .035em !important;
    line-height: 1.08 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  html:lang(pl) body .magicstudio-header .magicmegamenu__link {
    font-size: clamp(12px, .96vw, 15px) !important;
    letter-spacing: .02em !important;
  }

  html body .magicstudio-header .magicmegamenu__link::after {
    content: "";
    position: absolute;
    right: 18%;
    bottom: 5px;
    left: 18%;
    height: 2px;
    border-radius: 70% 35% 65% 40%;
    background: #9b3028;
    opacity: 0;
    transform: rotate(-.7deg) scaleX(.3);
    transform-origin: left center;
    transition: opacity .18s ease, transform .2s ease;
  }

  html body .magicstudio-header .magicmegamenu__link:hover::after,
  html body .magicstudio-header .magicmegamenu__link:focus-visible::after,
  html body .magicstudio-header .magicmegamenu__link[aria-current="page"]::after,
  html body.page-new-products .magicstudio-header .magicmegamenu__item:first-child > .magicmegamenu__link::after,
  html body.category-id-1173 .magicstudio-header .magicmegamenu__link[href*="/1173-"]::after,
  html body:has(.breadcrumb a[href*="/1173-"]) .magicstudio-header .magicmegamenu__link[href*="/1173-"]::after,
  html body.category-id-1198 .magicstudio-header .magicmegamenu__link[href*="/1198-"]::after,
  html body:has(.breadcrumb a[href*="/1198-"]) .magicstudio-header .magicmegamenu__link[href*="/1198-"]::after,
  html body.category-id-1204 .magicstudio-header .magicmegamenu__link[href*="/1204-"]::after,
  html body:has(.breadcrumb a[href*="/1204-"]) .magicstudio-header .magicmegamenu__link[href*="/1204-"]::after,
  html body.category-id-1200 .magicstudio-header .magicmegamenu__link[href*="/1200-"]::after,
  html body:has(.breadcrumb a[href*="/1200-"]) .magicstudio-header .magicmegamenu__link[href*="/1200-"]::after,
  html body.category-id-1227 .magicstudio-header .magicmegamenu__link[href*="/1227-"]::after,
  html body:has(.breadcrumb a[href*="/1227-"]) .magicstudio-header .magicmegamenu__link[href*="/1227-"]::after {
    opacity: 1;
    transform: rotate(-.7deg) scaleX(1);
  }

  html body .magicstudio-header .magicmegamenu-sale-cta {
    grid-area: sale !important;
    align-self: stretch !important;
    width: 100% !important;
  }

  html body .magicstudio-header .magicmegamenu-sale-cta__link {
    min-height: 48px !important;
    height: 100% !important;
    border-radius: 7px !important;
    padding: .42rem .72rem !important;
    box-shadow: inset 0 1px 0 rgba(255, 253, 248, .08) !important;
  }

  html body .magicstudio-header .magicmegamenu-sale-cta__eyebrow {
    font-size: 8px !important;
  }

  html body .magicstudio-header .magicmegamenu-sale-cta__title {
    font-size: clamp(12px, 1vw, 15px) !important;
  }

  html body .magicstudio-header #_desktop_ps_searchbar,
  html body .magicstudio-header #_desktop_search {
    grid-area: search !important;
    justify-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  html body .magicstudio-header #_desktop_ps_searchbar .ps-searchbar__form,
  html body .magicstudio-header #_desktop_search .ps-searchbar__form {
    min-height: 48px !important;
    border-radius: 7px !important;
    box-shadow: 0 9px 24px rgba(8, 7, 6, .16) !important;
  }

  html body .magicstudio-header #_desktop_ps_searchbar .ps-searchbar__input,
  html body .magicstudio-header #_desktop_search .ps-searchbar__input {
    min-height: 48px !important;
    font-size: 14px !important;
  }
}
