/* ==========================================================================
   BE.GE · 3D Interior Design Studio (stage.be.ge — Native v5)
   Exact DOM hierarchy of app-header .bottom-header:
     .bottom-header__flex-container
       ├── .left-section-wrapper  (contains ONLY .all "ყველა") -> width: auto, flex: 0 0 auto
       ├── ul.menu                (contains category li.menu__item + #bs3d-menu-li) -> flex: 1 1 auto
       └── .right-menu-text       (hidden legacy placeholder) -> display: none
   ========================================================================== */

/* ---------- 1. DESKTOP & TABLET NAVIGATION BAR (.bottom-header) ---------- */

app-header .ph-navbar .bottom-header .right-menu-text {
  display: none !important;
}

app-header .ph-navbar .bottom-header {
  height: auto !important;
  min-height: 56px;
  padding: 15px 0 !important;
}

app-header .ph-navbar .bottom-header .bottom-header__flex-container {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(20px, 2.4vw, 46px) !important;
}

/* CRITICAL: .left-section-wrapper ONLY wraps .all ("ყველა") — keep it shrink-wrapped! */
app-header .ph-navbar .bottom-header .left-section-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

app-header .ph-navbar .bottom-header .all {
  width: auto !important;
  min-width: max-content !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

app-header .ph-navbar .bottom-header ul.menu {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  flex-wrap: nowrap !important;
  column-gap: clamp(13px, 1.55vw, 24px) !important;
  row-gap: 8px !important;
}

app-header .ph-navbar .bottom-header ul.menu > li.menu__item {
  margin: 0 !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

app-header .ph-navbar .bottom-header ul.menu > li.menu__item > a {
  font-size: clamp(12.5px, 1.04vw, 15.5px) !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

/* Native 3D Studio item inside ul.menu */
app-header .ph-navbar .bottom-header ul.menu > li.bs3d-menu-li > a.bs3d-menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #161718 !important;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.2s linear;
}

app-header .ph-navbar .bottom-header ul.menu > li.bs3d-menu-li > a.bs3d-menu-link::before {
  content: "";
  position: static !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50%;
  background: #ff8f06;
  flex-shrink: 0;
}

app-header .ph-navbar .bottom-header ul.menu > li.bs3d-menu-li > a.bs3d-menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -18px;
  top: auto !important;
  width: 100%;
  height: 3px;
  background: #ff8f06;
  border-radius: 6px 6px 0 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s linear;
}

@media (hover: hover) {
  app-header .ph-navbar .bottom-header ul.menu > li.bs3d-menu-li:hover > a.bs3d-menu-link {
    color: #ff8f06 !important;
  }
  app-header .ph-navbar .bottom-header ul.menu > li.bs3d-menu-li:hover > a.bs3d-menu-link::after {
    opacity: 1;
    visibility: visible;
  }
}

/* Tablet / Narrow Window (768px - 1039px): clean wrap onto 2 rows, zero overflow, zero overlap */
@media (min-width: 768px) and (max-width: 1039.98px) {
  app-header .ph-navbar .bottom-header {
    padding: 12px 0 !important;
  }
  app-header .ph-navbar .bottom-header .bottom-header__flex-container {
    align-items: flex-start !important;
    gap: 18px !important;
  }
  app-header .ph-navbar .bottom-header ul.menu {
    flex-wrap: wrap !important;
    column-gap: 14px !important;
    row-gap: 7px !important;
  }
  app-header .ph-navbar .bottom-header ul.menu > li.menu__item > a {
    font-size: 13px !important;
  }
  app-header .ph-navbar .bottom-header ul.menu > li.menu__item > a::after,
  app-header .ph-navbar .bottom-header ul.menu > li.bs3d-menu-li > a.bs3d-menu-link::after {
    display: none !important;
  }
}

/* ---------- 2. NATIVE DRAWER ITEM (DESKTOP "ALL" & MOBILE BURGER MENU) ---------- */
a.bs3d-drawer-native,
a.bs3d-drawer-native:link,
a.bs3d-drawer-native:visited {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid transparent;
  color: #161718 !important;
  font-family: roman-caps, NeueHelveticaGeorgian55Roman, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: background 0.2s linear, border-color 0.2s linear;
}

.bs3d-drawer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff8f06;
  flex-shrink: 0;
}

@media (hover: hover) {
  a.bs3d-drawer-native:hover {
    background: #fafbfb;
    border-color: #ff8f06;
  }
}

/* ---------- 3. HOME 3D STUDIO SHOWCASE SECTION ---------- */

.bege-studio3d-host {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  margin-bottom: 32px;
}

.bs3d-wrap {
  width: 100%;
  opacity: 1 !important;
  visibility: visible !important;
}

a.bs3d-card,
a.bs3d-card:link,
a.bs3d-card:visited {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  min-height: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(14, 23, 31, 0.06);
  overflow: hidden;
  text-decoration: none !important;
  color: #161718;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  a.bs3d-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(14, 23, 31, 0.11);
  }
}

a.bs3d-card:focus-visible {
  outline: 2px solid #ffa829;
  outline-offset: 3px;
}

.bs3d-editorial {
  width: 44%;
  padding: 40px 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  z-index: 2;
}

.bs3d-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #161718;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bs3d-butterfly {
  width: 20px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.bs3d-eyebrow-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffa829;
}

.bs3d-title {
  margin: 0 0 14px;
  font-family: roman-caps, NeueHelveticaGeorgian55Roman, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #161718;
}

.bs3d-desc {
  margin: 0 0 26px;
  font-family: NeueHelveticaGeorgian55Roman, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.62;
  color: #575d61;
  max-width: 440px;
}

.bs3d-rooms {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
  border-bottom: 1px solid #eef0f2;
}

.bs3d-room-tab {
  position: relative;
  padding: 0 0 11px;
  font-family: NeueHelveticaGeorgian55Roman, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #8b9398;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.bs3d-room-tab.is-active {
  color: #161718;
  font-weight: 600;
}

.bs3d-room-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #ffa829;
  transform: scaleX(0);
  transform-origin: left center;
}

.bs3d-room-tab.is-active .bs3d-room-line {
  animation: bs3dTabFill 4.8s linear forwards;
}

@keyframes bs3dTabFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.bs3d-bottom {
  display: flex;
  align-items: center;
}

.bs3d-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  border-radius: 8px;
  background: #161718;
  color: #ffffff;
  font-family: roman-caps, NeueHelveticaGeorgian55Roman, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.bs3d-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffc91d;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  a.bs3d-card:hover .bs3d-cta-btn {
    background: #ffa829;
    color: #161718;
  }
  a.bs3d-card:hover .bs3d-cta-icon {
    color: #161718;
    transform: translate(3px, -2px);
  }
}

.bs3d-stage {
  position: relative;
  width: 56%;
  min-height: 420px;
  background: #f4f2ee;
  overflow: hidden;
}

.bs3d-slides {
  position: absolute;
  inset: 0;
}

.bs3d-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale3d(1.045, 1.045, 1);
  transition: opacity 1.05s cubic-bezier(0.22, 1, 0.36, 1),
              transform 5.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bs3d-slide.is-active {
  opacity: 1;
  transform: scale3d(1, 1, 1);
  z-index: 1;
}

.bs3d-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 991px) {
  a.bs3d-card,
  a.bs3d-card:link,
  a.bs3d-card:visited {
    flex-direction: column-reverse;
    min-height: 0;
  }

  .bs3d-editorial,
  .bs3d-stage {
    width: 100%;
  }

  .bs3d-stage {
    min-height: 290px;
    height: 290px;
  }

  .bs3d-editorial {
    padding: 26px 24px 28px;
  }

  .bs3d-title {
    font-size: 22px;
  }
}

@media (max-width: 575px) {
  .bege-studio3d-host {
    margin-bottom: 24px;
  }

  .bs3d-stage {
    min-height: 235px;
    height: 235px;
  }

  .bs3d-editorial {
    padding: 22px 18px 24px;
  }

  .bs3d-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .bs3d-desc {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .bs3d-rooms {
    gap: 16px;
    margin-bottom: 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bs3d-rooms::-webkit-scrollbar {
    display: none;
  }

  .bs3d-room-tab {
    font-size: 12.5px;
  }

  .bs3d-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bs3d-room-tab.is-active .bs3d-room-line {
    animation: none !important;
    transform: scaleX(1) !important;
  }
  .bs3d-slide {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
}
