/* Mobile navigation belongs to Casa Costa; desktop retains its existing layout. */
.cc-mobile-header-spacer { display: none; }
@media (max-width: 767px) {
    /* Keep the former toolbar space inside the configured footer surface. */
    body.store-theme-casa-costa { padding-bottom: 0; }
    body.store-theme-casa-costa footer.tf-footer { padding-bottom: 70px; }
    body.store-theme-casa-costa .tf-toolbar-bottom { display: none !important; }
    body.store-theme-casa-costa #mobileMenu.cc-side-menu {
        width: min(80vw, 360px);
        left: auto;
        right: 0;
        border-right: 0;
        transform: translateX(100%);
    }
    body.store-theme-casa-costa #mobileMenu.cc-side-menu.show:not(.hiding),
    body.store-theme-casa-costa #mobileMenu.cc-side-menu.showing {
        transform: none;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header {
        position: fixed !important;
        inset: 0 0 auto !important;
        width: 100%;
        padding: 0 !important;
        z-index: 1030;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        mix-blend-mode: normal !important;
        background: var(--cc-header-glass, rgba(51,51,51,.68)) !important;
        backdrop-filter: blur(20px) saturate(120%);
        -webkit-backdrop-filter: blur(20px) saturate(120%);
        transition: none !important;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header::before { display: none !important; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .header-inner_wrap {
        opacity: 1 !important;
        transition: none !important;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .container {
        width: 100%; max-width: none; padding-inline: 12px;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .header-inner {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        height: 64px;
        min-height: 64px;
        padding: 0 !important;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .header-center {
        position: static; flex: 1; min-width: 0;
        padding: 0 !important; margin: 0 !important;
        justify-content: flex-start !important;
        pointer-events: auto;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .logo-site {
        max-width: 160px !important; width: 100%; filter: none !important;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .logo-site :is(picture,img) {
        display: block; width: 100% !important; max-width: 160px !important;
        height: 40px !important; max-height: 40px !important;
        object-fit: contain; object-position: left center;
    }
    /* The wordmark is black; the frosted header is dark at every phone width, not only from 380px. */
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .logo-site--wordmark img {
        filter: invert(1) !important;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header :is(.theme-inline-navigation,.theme-header-search,.header-left) { display: none !important; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .header-right {
        display: block !important; flex: 0 0 auto;
        visibility: visible !important; opacity: 1 !important; pointer-events: auto !important;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .nav-icon-list { display: flex; gap: 0; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .nav-icon-list > li { display: block !important; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .nav-icon-list > li:has([aria-controls="search"]) { order: 1; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .nav-icon-list > li:has(.shop-cart) { order: 2; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .nav-icon-list > li:has([aria-controls="sign"], [href="/cuenta"]) { order: 3; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .nav-icon-list > .cc-mobile-menu-item { order: 4; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header .nav-icon-list > li:has([href="/wishlist.php"]) { display: none !important; }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header :is(.nav-icon-item,.btn-open-menu) {
        display: inline-flex !important; position: relative !important;
        inset: auto !important; transform: none !important;
        align-items: center; justify-content: center;
        width: 36px !important; min-width: 36px !important; height: 44px !important; padding: 0 !important;
        font-size: 20px; color: var(--cc-menu-fg, #fff) !important;
    }
    body.store-theme-casa-costa .cc-mobile-header-spacer.is-flow { display: block; height: 64px; }
}

/* Shared Casa Costa announcement strip, outside the header's blend/fade layers. */
body.store-theme-casa-costa.cc-has-announcement { padding-top: 32px; }
body.store-theme-casa-costa.cc-has-announcement.cc-mobile-navigation header.tf-header.cc-mobile-header { top: 32px !important; }
.store-theme-casa-costa .cc-announcement {
  position: fixed;
  inset: 0 0 auto;
  height: 32px;
  overflow: hidden;
  background: #000;
  color: #fff;
  z-index: 1031;
  font-size: 13px;
  line-height: 32px;
}
/* Each message stays centered for three seconds, with 200ms fades between messages. */
.store-theme-casa-costa .cc-announcement-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.store-theme-casa-costa .cc-announcement-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-inline: 10px;
  box-sizing: border-box;
  white-space: nowrap;
  font-size: clamp(11px, 3vw, 13px);
  opacity: 0;
  animation: cc-announcement-fade 10.2s ease-in-out infinite;
}
/* "Texto fijo a la derecha" de la pestaña Topbar (horario, teléfono): solo en computadora. */
.store-theme-casa-costa .cc-announcement-aside { display: none; }
@media (min-width: 992px) {
  .store-theme-casa-costa .cc-announcement-aside {
    display: block;
    position: absolute;
    top: 0;
    right: 24px;
    max-width: 28%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: rgba(255, 255, 255, .78);
  }
}
.store-theme-casa-costa .cc-announcement-message:nth-child(2) { animation-delay: -6.8s; }
.store-theme-casa-costa .cc-announcement-message:nth-child(3) { animation-delay: -3.4s; }
.store-theme-casa-costa .cc-announcement:focus .cc-announcement-message { animation-play-state: paused; }
@keyframes cc-announcement-fade {
  0%, 29.411765% { opacity: 1; }
  31.372549%, 98.039216% { opacity: 0; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .store-theme-casa-costa .cc-announcement-message { animation-timing-function: steps(1, end); }
}

/* Slide navigation vertically; announcements are reserved for the page top. */
body.store-theme-casa-costa.cc-has-announcement.cc-mobile-navigation header.tf-header.cc-mobile-header {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: transform .3s ease, top .3s ease, visibility 0s !important;
}
body.store-theme-casa-costa.cc-page-scrolled.cc-has-announcement.cc-mobile-navigation header.tf-header.cc-mobile-header {
  top: 0 !important;
}
body.store-theme-casa-costa.cc-navigation-hidden.cc-has-announcement.cc-mobile-navigation header.tf-header.cc-mobile-header {
  transform: translateY(calc(-100% - 32px)) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: transform .3s ease, top .3s ease, visibility 0s .3s !important;
}
body.store-theme-casa-costa .cc-announcement {
  transform: translateY(0);
  transition: transform .3s ease, visibility 0s;
}
body.store-theme-casa-costa.cc-page-scrolled .cc-announcement {
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .3s ease, visibility 0s .3s;
}
@media (prefers-reduced-motion: reduce) {
  body.store-theme-casa-costa.cc-has-announcement.cc-mobile-navigation header.tf-header.cc-mobile-header,
  body.store-theme-casa-costa .cc-announcement { transition: none !important; }
}

/* Featured content is selected by viewport, never by user-agent or tenant IDs. */
@media (min-width: 768px) {
  .store-theme-casa-costa .cc-featured-viewport--mobile { display: none !important; }
}
@media (max-width: 767px) {
  .store-theme-casa-costa .cc-featured-viewport--desktop { display: none !important; }
  .store-theme-casa-costa .cc-featured-viewport--mobile .cc-featured-text[style*="--cc-text-mobile:"] { font-size: var(--cc-text-mobile) !important; white-space: normal; }
}

/* Isolate the frosted surface from the moving mobile header contents. */
@media (max-width: 767px) {
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header {
        background: transparent !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        isolation: isolate;
    }
    body.store-theme-casa-costa.cc-mobile-navigation header.tf-header.cc-mobile-header::before {
        content: "";
        display: block !important;
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: var(--cc-header-glass, rgba(51,51,51,.68));
        -webkit-backdrop-filter: blur(20px) saturate(120%);
        backdrop-filter: blur(20px) saturate(120%);
    }
    .store-theme-casa-costa .cc-hero_play { display: none; }
}
