/* Mi+Cota y Yo — header
   Extraído del widget HTML de Elementor del post 1046.
   El @import de Google Fonts se sustituyó por wp_enqueue_style en functions.php. */

/* ═══════ BARRA SUPERIOR ═══════ */
.mcyy-ann {
  background: #38b6ff;
  color: #fff;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
}

.mcyy-ann-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mcyy-ann-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mcyy-ann-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.95) !important;
  text-decoration: none !important;
  font-weight: 700;
  transition: color .15s;
}

.mcyy-ann-link:hover {
  color: #fff !important;
}

.mcyy-ann-link svg {
  width: 15px;
  height: 15px;
  opacity: .9;
}

.mcyy-ann-sep {
  width: 1px;
  height: 17px;
  background: rgba(255,255,255,.35);
}

.mcyy-ann-center {
  flex: 1;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
}

.mcyy-ann-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mcyy-ann-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.22);
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  transition: background .15s, transform .15s;
}

.mcyy-ann-tag:hover {
  background: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

.mcyy-ann-tag.hot {
  background: #fead54;
}

.mcyy-ann-tag.hot:hover {
  background: #fdbd59;
}


/* ═══════ HEADER ═══════ */
.mcyy-hdr {
  background: #fff;
  font-family: 'Quicksand', sans-serif;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.mcyy-hdr-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 0 48px;
  height: 96px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.mcyy-hdr-logo img {
  height: 88px;
  width: auto;
  display: block;
  max-width: 240px;
  object-fit: contain;
}

.mcyy-hdr-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  margin-left: 8px;
}


/* Nav principal */
.mcyy-hdr-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mcyy-hdr-nav a {
  text-decoration: none !important;
  color: #1C2340 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 10px 20px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: background .2s, color .2s !important;
  white-space: nowrap;
  font-family: 'Quicksand', sans-serif !important;
}

.mcyy-hdr-nav a:hover,
.mcyy-hdr-nav a.active {
  color: #38b6ff !important;
  background: #E0F2FE !important;
}


/* Acciones */
.mcyy-hdr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mcyy-hdr-search {
  position: relative;
  width: 240px;
}

.mcyy-hdr-search form {
  display: flex;
  align-items: center;
  background: #F5F3ED;
  border: 2px solid transparent;
  border-radius: 100px;
  height: 44px;
  padding: 0 5px 0 16px;
  transition: border-color .2s, background .2s;
}

.mcyy-hdr-search form:focus-within {
  border-color: #38b6ff;
  background: #fff;
}

.mcyy-hdr-search input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1C2340 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  height: 36px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.mcyy-hdr-search input::placeholder {
  color: #9CA3B5;
  font-weight: 500;
}

.mcyy-hdr-search button {
  width: 34px;
  height: 34px;
  border: none;
  background: #38b6ff;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
  padding: 0;
}

.mcyy-hdr-search button:hover {
  background: #0EA5E9;
}

.mcyy-hdr-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #E8E5DA;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color .2s;
  text-decoration: none !important;
  color: #1C2340 !important;
  flex-shrink: 0;
}

.mcyy-hdr-icon:hover {
  border-color: #38b6ff;
  color: #38b6ff !important;
}

.mcyy-hdr-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #fead54;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  padding: 0 5px;
  font-family: 'Quicksand', sans-serif;
}

.mcyy-hdr-wa {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #25D366 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 0 18px !important;
  height: 44px !important;
  border-radius: 100px !important;
  transition: opacity .2s !important;
  white-space: nowrap;
  font-family: 'Quicksand', sans-serif !important;
}

.mcyy-hdr-wa:hover {
  opacity: .88 !important;
}


/* ═══════ BARRA CATEGORÍAS CON MEGA-MENÚ (barra naranja destacada) ═══════ */
.mcyy-catbar {
  background: linear-gradient(135deg, #fdbd59 0%, #fead54 100%);
  border-top: none;
  border-bottom: 3px solid #f5a83d;
  box-shadow: 0 4px 14px rgba(245,130,31,.18);
  font-family: 'Quicksand', sans-serif;
  position: relative;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.mcyy-catbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.mcyy-catbar-item {
  position: static;
  display: flex;
  align-items: center;
}

.mcyy-catbar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(180,90,0,.25);
  text-decoration: none !important;
  white-space: nowrap;
  transition: color .2s, background .2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}

.mcyy-catbar-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.20);
  border-bottom-color: #fff;
}

.mcyy-catbar-link.active {
  color: #fff !important;
  border-bottom-color: #fff;
  background: rgba(255,255,255,.28);
}

.mcyy-catbar-ico{
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

.mcyy-catbar-ico img{
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.mcyy-catbar-ico span{
  font-size: 26px;
  line-height: 1;
}

.mcyy-catbar-arrow {
  font-size: 9px;
  opacity: .4;
  margin-left: 2px;
  transition: transform .2s;
}

.mcyy-catbar-item:hover .mcyy-catbar-arrow {
  transform: rotate(180deg);
}

.mcyy-catbar-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.4);
  flex-shrink: 0;
}

/* Tarjetas de subcategoría con SVG propio (sin foto) */
.mcyy-megadrop-card-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF4DE;
}

.mcyy-megadrop-card-svg svg {
  width: 52px;
  height: 52px;
}


/* ═══════ MEGA-MENÚ ═══════ */
.mcyy-megadrop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border: 1px solid #E8E5DA;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(28,35,64,.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease .1s, transform .2s ease .1s;
  z-index: 1002;
  margin-top: 2px;
  white-space: normal;
}

.mcyy-megadrop::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.mcyy-catbar-item:hover .mcyy-megadrop,
.mcyy-catbar-item:focus-within .mcyy-megadrop,
.mcyy-megadrop:hover {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}


/* Grid de subcategorías */
.mcyy-megadrop-grid {
  display: grid;
  gap: 16px;
}

.mcyy-megadrop-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  min-width: 560px;
}

.mcyy-megadrop-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
  min-width: 720px;
}

.mcyy-megadrop-card {
  display: block;
  text-decoration: none !important;
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  color: inherit !important;
  background: #fff;
}

.mcyy-megadrop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(56,182,255,.12);
}

.mcyy-megadrop-card-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #F0F7FF;
  border-radius: 16px;
}

.mcyy-megadrop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.mcyy-megadrop-card:hover .mcyy-megadrop-card-img img {
  transform: scale(1.06);
}

.mcyy-megadrop-card-label {
  padding: 10px 6px 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1C2340;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-family: 'Quicksand', sans-serif;
}

/* Selector múltiple de categorías dentro del mega-menú */
.mcyy-megadrop-filter {
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}

.mcyy-megafilter-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.mcyy-megafilter-heading strong {
  color: #1C2340;
  font: 800 20px/1.2 'Quicksand', sans-serif;
}

.mcyy-megafilter-heading span {
  color: #687083;
  font-size: 13px;
}

.mcyy-megadrop-choice {
  position: relative;
  cursor: pointer;
  margin: 0;
  padding: 7px;
  border: 2px solid transparent;
  background: #fff;
}

.mcyy-megadrop-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mcyy-megadrop-choice .mcyy-megadrop-card-img {
  display: block;
  width: 100%;
  height: 82px;
  aspect-ratio: auto;
}

.mcyy-megadrop-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0F7FF;
  color: #F5821F;
  font-size: 34px;
  font-weight: 800;
}

.mcyy-megadrop-card-icon img.emoji {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain;
}

.mcyy-megadrop-choice .mcyy-megadrop-card-label {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 5px 2px;
}

.mcyy-megadrop-card-description {
  display: block;
  min-height: 30px;
  padding: 0 6px 7px;
  color: #687083;
  font: 600 11px/1.3 'Quicksand', sans-serif;
  text-align: center;
}

.mcyy-megadrop-check {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #24664F;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .18s ease, transform .18s ease;
}

.mcyy-megadrop-choice:has(input:checked) {
  border-color: #24664F;
  background: #F2FAF6;
  box-shadow: 0 8px 22px rgba(36,102,79,.13);
}

.mcyy-megadrop-choice:has(input:checked) .mcyy-megadrop-check {
  opacity: 1;
  transform: scale(1);
}

.mcyy-megadrop-choice:has(input:focus-visible) {
  outline: 3px solid rgba(245,130,31,.35);
  outline-offset: 2px;
}

.mcyy-megafilter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #E8E5DA;
}

.mcyy-megafilter-footer span {
  color: #687083;
  font-size: 12px;
}

.mcyy-megafilter-footer button {
  flex: 0 0 auto;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: #24664F;
  color: #fff;
  cursor: pointer;
  font: 800 14px/1.2 'Quicksand', sans-serif;
  transition: background .2s ease, transform .2s ease;
}

.mcyy-megafilter-footer button:hover,
.mcyy-megafilter-footer button:focus-visible {
  background: #194837;
  transform: translateY(-2px);
}


/* ═══════ HAMBURGUESA ═══════ */
.mcyy-hdr-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #E8E5DA;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.mcyy-hdr-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1C2340;
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}

.mcyy-hdr-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mcyy-hdr-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.mcyy-hdr-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mcyy-mob-search {
  display: none;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #E8E5DA;
}

.mcyy-mob-search .mcyy-hdr-search {
  width: 100%;
}


/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 1280px) {
  .mcyy-hdr-search {
    width: 200px;
  }

  .mcyy-hdr-wa {
    display: none !important;
  }

  .mcyy-megadrop-grid.cols-3 {
    min-width: 440px;
  }

  .mcyy-megadrop-grid.cols-4 {
    min-width: 580px;
  }
}

@media (max-width: 1100px) {
  .mcyy-hdr-inner {
    gap: 16px;
    padding: 0 20px 0 36px;
  }

  .mcyy-hdr-nav a {
    font-size: 14px !important;
    padding: 8px 14px !important;
  }

  .mcyy-hdr-search {
    width: 180px;
  }

  .mcyy-catbar-link {
    padding: 12px 18px;
    font-size: 13px;
  }

  .mcyy-catbar-ico {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 960px) {
  .mcyy-hdr-search {
    display: none;
  }

  .mcyy-mob-search {
    display: block;
  }

  .mcyy-hdr-toggle {
    display: flex;
  }

  .mcyy-ann-left,
  .mcyy-ann-right {
    display: none;
  }

  .mcyy-ann-center {
    font-size: 12px;
  }

  .mcyy-hdr-inner {
    grid-template-columns: auto auto;
    height: 68px;
    padding: 0 20px;
  }

  .mcyy-hdr-logo {
    margin-left: 0;
  }

  .mcyy-hdr-logo img {
    height: 62px;
    max-width: 160px;
  }

  .mcyy-hdr-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid #E8E5DA;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    transform: translateY(-150%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    z-index: 999;
  }

  .mcyy-hdr-nav.is-open {
    transform: translateY(0);
  }

  .mcyy-hdr-nav a {
    padding: 14px 16px !important;
    font-size: 16px !important;
    width: 100%;
  }

  /* Catbar en móvil: scroll horizontal */
  .mcyy-catbar,
  .mcyy-catbar-inner {
    justify-content: flex-start;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mcyy-catbar::-webkit-scrollbar,
  .mcyy-catbar-inner::-webkit-scrollbar {
    display: none;
  }

  .mcyy-catbar-link {
    padding: 12px 16px;
    font-size: 13px;
  }

  .mcyy-catbar-item {
    position: relative;
    flex-direction: column;
    align-items: stretch;
  }

  .mcyy-catbar-ico {
    width: 32px;
    height: 32px;
  }

  /* Mega-menú en móvil: acordeón */
  .mcyy-megadrop {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    border: none;
    background: #F5F3ED;
    border-radius: 14px;
    margin: 4px 0 0;
    padding: 12px;
    display: none;
    min-width: 0 !important;
  }

  .mcyy-megadrop::before {
    display: none;
  }

  .mcyy-megadrop-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    min-width: 0 !important;
    gap: 10px;
  }

  .mcyy-catbar-item.is-open .mcyy-megadrop {
    display: block;
  }

  .mcyy-megadrop-filter {
    width: min(620px, calc(100vw - 32px));
    max-height: 65vh;
    overflow-y: auto;
  }

  .mcyy-megafilter-heading,
  .mcyy-megafilter-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .mcyy-megafilter-footer button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .mcyy-hdr-inner {
    padding: 0 16px;
    height: 60px;
  }

  .mcyy-hdr-logo img {
    height: 54px;
    max-width: 140px;
  }

  .mcyy-hdr-nav {
    top: 60px;
    max-height: calc(100vh - 60px);
  }

  .mcyy-hdr-icon,
  .mcyy-hdr-toggle {
    width: 38px;
    height: 38px;
  }

  .mcyy-megadrop-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
