
/*
 * Bidluna Studio V6.0.2 — Responsive header, stable desktop hero and mobile spacing.
 * Loaded after the main Studio stylesheet.
 */

/* Wider but controlled desktop canvas. */
@media (min-width: 1200px) {
  .bl5-container,
  .bl5-home-grid {
    width: min(calc(100% - 72px), 1440px) !important;
  }

  /* Header: logo + elastic search + clear locale/account area. */
  .bl5-header-main {
    grid-template-columns: 220px minmax(360px, 1fr) auto !important;
    gap: 24px !important;
    min-height: 80px !important;
  }
  .bl5-brand {
    max-width: 220px !important;
  }
  .bl5-brand img {
    height: 58px !important;
  }
  .bl5-header-actions {
    gap: 10px !important;
    min-width: max-content;
  }
  .bl5-locale-wrap {
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid #e3e7ee;
    border-radius: 11px;
    background: #fff;
    white-space: nowrap;
  }
  .bl5-locale-wrap select {
    max-width: none !important;
    width: 112px;
    padding-right: 2px;
    cursor: pointer;
  }
  .bl5-login {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border-radius: 11px;
  }
  .bl5-login:hover {
    background: #f5f7fa;
  }
  .bl5-login__icon {
    display: inline-flex;
    width: 21px;
    height: 21px;
  }
  .bl5-login__icon svg {
    width: 100%;
    height: 100%;
  }

  /* Hero: two independent columns. The media can scale without moving the copy. */
  .bl5-hero {
    grid-template-columns: minmax(460px, 44%) minmax(0, 56%) !important;
    grid-template-rows: minmax(470px, 1fr) auto !important;
    min-height: 600px !important;
  }
  .bl5-hero__copy,
  .bl5-hero__actions {
    width: min(100%, 620px) !important;
    margin-left: max(36px, calc((100vw - 1440px) / 2)) !important;
    padding-right: 44px !important;
  }
  .bl5-hero__copy {
    padding-top: 74px !important;
    padding-bottom: 18px !important;
    justify-content: center !important;
  }
  .bl5-hero__actions {
    padding-bottom: 64px !important;
  }
  .bl5-hero__title {
    width: 100%;
    max-width: 610px;
    font-size: clamp(50px, 3.65vw, 66px) !important;
    line-height: .99 !important;
  }
  .bl5-hero__body {
    max-width: 565px !important;
  }
  .bl5-hero__media {
    min-width: 0 !important;
    height: 600px !important;
    padding: 26px max(28px, calc((100vw - 1440px) / 2)) 16px 8px !important;
  }
  .bl5-hero__media picture,
  .bl5-hero__media img,
  .bl5-hero-video {
    width: 100% !important;
    height: 100% !important;
  }
  .bl5-hero__media img,
  .bl5-hero-video {
    object-fit: contain !important;
    object-position: center !important;
  }
}

/* Compact desktop / laptop: preserve the composition instead of fluidly collapsing it. */
@media (min-width: 768px) and (max-width: 1199px) {
  .bl5-container,
  .bl5-home-grid {
    width: min(calc(100% - 40px), 1180px) !important;
  }
  .bl5-header-main {
    grid-template-columns: 170px minmax(260px, 1fr) auto !important;
    gap: 14px !important;
  }
  .bl5-brand {
    max-width: 170px !important;
  }
  .bl5-locale-wrap {
    padding: 0 6px;
  }
  .bl5-locale-wrap select {
    width: 78px;
    max-width: 78px !important;
  }
  .bl5-login__icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
  }
  .bl5-login__icon svg {
    width: 100%;
    height: 100%;
  }
  .bl5-login__text {
    display: none;
  }
  .bl5-login {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 11px;
  }
  .bl5-register {
    display: none !important;
  }
  .bl5-hero {
    grid-template-columns: minmax(390px, 45%) minmax(0, 55%) !important;
    grid-template-rows: minmax(430px, 1fr) auto !important;
    min-height: 540px !important;
  }
  .bl5-hero__copy,
  .bl5-hero__actions {
    width: min(100%, 540px) !important;
    margin-left: 20px !important;
    padding-right: 30px !important;
  }
  .bl5-hero__copy {
    padding-top: 54px !important;
    justify-content: center !important;
  }
  .bl5-hero__actions {
    padding-bottom: 48px !important;
  }
  .bl5-hero__title {
    max-width: 520px;
    font-size: clamp(42px, 4.6vw, 54px) !important;
  }
  .bl5-hero__media {
    height: 540px !important;
    padding: 18px 20px 12px 0 !important;
  }
}

/* Mobile header: logo, search and account on one clean line. */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  .bl5-announcement {
    border: 0 !important;
    box-shadow: none !important;
  }
  .bl5-announcement__inner {
    min-height: 31px !important;
    padding: max(3px, env(safe-area-inset-top)) 10px 3px !important;
    gap: 7px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
  .bl5-announcement strong {
    font-size: 7.5px !important;
    line-height: 1 !important;
    letter-spacing: .055em !important;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bl5-announcement__note,
  .bl5-announcement a {
    display: none !important;
  }
  .bl5-countdown {
    min-height: 23px !important;
    padding: 3px 7px !important;
    gap: 2px !important;
    flex: 0 0 auto;
  }
  .bl5-countdown em {
    font-size: 7px !important;
    margin-right: 2px !important;
  }
  .bl5-countdown b {
    font-size: 9px !important;
  }
  .bl5-countdown small {
    font-size: 6px !important;
  }

  .bl5-header {
    box-shadow: 0 4px 15px rgba(7,20,45,.06) !important;
  }
  .bl5-header-main {
    width: 100% !important;
    min-height: 66px !important;
    display: grid !important;
    grid-template-columns: clamp(86px, 27vw, 112px) minmax(0,1fr) 44px !important;
    gap: 8px !important;
    padding: 9px 12px !important;
    align-items: center !important;
  }
  .bl5-brand {
    display: flex !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
  }
  .bl5-brand picture {
    width: 100% !important;
  }
  .bl5-brand img {
    display: block !important;
    width: 100% !important;
    max-width: 112px !important;
    height: 42px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }
  .bl5-header-search {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    box-shadow: none !important;
  }
  .bl5-header-search input {
    min-width: 0 !important;
    padding: 0 8px 0 13px !important;
    font-size: 11px !important;
    text-overflow: ellipsis;
  }
  .bl5-header-search button {
    width: 42px !important;
    min-width: 42px !important;
  }
  .bl5-mobile-account {
    display: grid !important;
    place-items: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 9px !important;
    border-radius: 13px !important;
    color: var(--bl5-text) !important;
    text-decoration: none !important;
  }
  .bl5-mobile-account:active {
    background: #f1f4f8 !important;
  }
  .bl5-mobile-account svg {
    width: 25px !important;
    height: 25px !important;
  }
  .bl5-mobile-toggle,
  .bl5-mobile-search-row {
    display: none !important;
  }

  /* Mobile hero rhythm. */
  .bl5-hero {
    background:
      radial-gradient(circle at 50% 67%, rgba(241,182,59,.10), transparent 36%),
      #fff !important;
  }
  .bl5-hero__copy {
    padding: 18px 20px 6px !important;
  }
  .bl5-hero__title {
    font-size: clamp(30px, 9.2vw, 38px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
  }
  .bl5-hero__body {
    margin-top: 11px !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
  }
  .bl5-hero__media {
    height: clamp(240px, 67vw, 305px) !important;
    padding: 0 12px !important;
  }
  .bl5-hero__actions {
    padding: 2px 14px 17px !important;
    gap: 8px !important;
  }
  .bl5-hero__actions .bl5-btn {
    min-height: 46px !important;
    border-radius: 12px !important;
  }

  /* Categories and footer: no artificial white band. */
  .bl5-home,
  .bl5-home-grid {
    min-height: 0 !important;
    padding-bottom: 0 !important;
  }
  .bl5-block--categories {
    min-height: 0 !important;
    height: auto !important;
    margin-top: 14px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .bl5-block--categories .bl5-section-head {
    margin-bottom: 7px !important;
  }
  .bl5-block--categories .bl5-section-title {
    font-size: 21px !important;
  }
  .bl5-categories {
    min-height: 0 !important;
    height: auto !important;
    margin: 7px 0 0 !important;
    padding: 0 0 8px !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  .bl5-category {
    flex: 0 0 112px !important;
    min-height: 88px !important;
    height: 88px !important;
    padding: 11px 8px !important;
    border-radius: 13px !important;
  }
  .bl5-category__icon {
    width: 29px !important;
    height: 29px !important;
  }
  .bl5-category strong {
    font-size: 10px !important;
  }
  .bl5-home-grid > .bl5-block:last-child {
    margin-bottom: 0 !important;
  }
  .bl5-footer {
    margin-top: 0 !important;
    padding-top: 18px !important;
  }
  .bl5-footer__brand img {
    width: 160px !important;
    height: 48px !important;
  }
  .bl5-footer__brand p {
    max-width: 270px !important;
    margin: 4px auto 12px !important;
    font-size: 9.5px !important;
    line-height: 1.48 !important;
  }
}

@media (max-width: 430px) {
  .bl5-hero__actions {
    grid-template-columns: 1fr !important;
  }
  .bl5-hero__actions .bl5-btn {
    width: 100% !important;
  }
}

@media (max-width: 350px) {
  .bl5-header-main {
    grid-template-columns: 82px minmax(0,1fr) 42px !important;
    gap: 6px !important;
    padding-inline: 8px !important;
  }
  .bl5-brand img {
    max-width: 82px !important;
  }
  .bl5-header-search input {
    padding-left: 10px !important;
    font-size: 10px !important;
  }
  .bl5-announcement strong {
    display: none !important;
  }
}
