.overlay.active {
  height: 100vh;
  width: 100vw;
  position: fixed;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 888;
}
header a {
  text-decoration-line: none;
}

.logo img {
  height: 45px;
  width: 133px;
  transition: var(--transition-slow);
  filter: brightness(0) saturate(100%) invert(100%);
}
.user {
  cursor: pointer;
  position: relative;
}
.user img {
  height: 27px;
  width: 27px;
  transition: var(--transition-slow);
}

.user-btn {
  display: none;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.user-btn.visible { display: flex; }
.user-btn.hidden  { display: none !important; }

/* ── Guest (no logueado) ────────────────────────────── */
.user-btn--guest .user-label {
  font-size: 13px;
  color: var(--color-text-on-dark);
  white-space: nowrap;
  transition: color var(--transition-base);
}
.user-btn--guest:hover .user-label { color: var(--color-brand); }
header.abajo .user-btn--guest .user-label { color: var(--color-text-on-light); }

/* ── Auth (logueado) ────────────────────────────────── */
.user-btn--auth {
  gap: 6px;
}
.user-displayname {
  font-size: 13px;
  color: var(--color-text-on-dark);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
header.abajo .user-displayname { color: var(--color-text-on-light); }

/* ── Dropdown ────────────────────────────────────────── */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 160px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  z-index: 1000;
  flex-direction: column;
}
.user-dropdown.open { display: flex; }

.user-dropdown-item {
  display: block;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--color-text-on-light);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast);
}
.user-dropdown-item:hover { background: var(--color-surface-alt); color: var(--color-brand); }
.user-logout { 
  color: #c0392b !important;
  margin: 0;  
  text-align: center;
}
.user-logout:hover { background: #fff0f0 !important; }
.Bag img {
  height: 30px;
  width: 30px;
  transition: var(--transition-slow);
}
#contador-productos {
  font-size: 12px;
}
.agregar-carrito img {
  width: 20px;
  height: 20px;
}
header .boton-Instagram img {
  width: 30px;
  height: 30px;
  transition: var(--transition-fast);
}
header .boton-Tiktok img {
  width: 30px;
  height: 30px;
  transition: var(--transition-fast);
}
header .boton-Facebook img {
  width: 30px;
  height: 30px;
  transition: var(--transition-fast);
}
header .boton-Linkedin img {
  width: 30px;
  height: 30px;
  transition: var(--transition-fast);
}
header .boton-Instagram img:hover {
  filter: drop-shadow(0px 0px 8px #d43089);
}
header .boton-Tiktok img:hover {
  filter: drop-shadow(0px 0px 8px #00f2ea);
}
header .boton-Facebook img:hover {
  filter: drop-shadow(0px 0px 8px #3b5998);
}
header .boton-Linkedin img:hover {
  filter: drop-shadow(0px 0px 8px #3b5998);
}
header .logo {
  position: relative;
  text-decoration: none;
  transition: var(--transition-slow);
}
header {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 6%;
  transition: var(--transition-slow);
  margin-top: 30px;
}
header.abajo {
  background: var(--color-bg-card);
  padding: 6px 6%;
  box-shadow: var(--shadow-header);
}
header .menu {
  position: relative;
  padding: 0px 20px;
  margin-left: auto;
}
header .menu h4 {
  color: var(--color-text-on-light);
  margin: 10px auto;
  font-size: 18px;
  font-weight: 100;
}
header .menu ul {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
header .menu ul li {
  list-style: none;
  margin: 0;
}
header .menu a {
  color: var(--color-text-on-dark);
  font-size: 16px;
  text-decoration: none;
  margin: 0 15px;
  padding: 5px 10px;
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  transition-property: color, background;
  position: relative;
  font-weight: 400;
}
header.abajo .logo img {
  filter: none;
}
header.abajo .user img,
header.abajo .Bag .buy {
  filter: invert(100%) sepia(50%) saturate(2%) hue-rotate(62deg)
    brightness(107%) contrast(101%);
}
header .bolsa a {
  display: block;
  font-size: 20px;
  margin: 18px;
  padding: 0 10px;
  border-bottom: 0px solid rgba(445, 445, 445, 0.5);
  color: #1d264c;
}
header.abajo ul li a {
  color: var(--color-text-on-light);
}
header .menu a:hover {
  color: var(--color-brand);
}
header.abajo a:hover {
  color: var(--color-brand);
}
header .menu a:focus:after,
header .menu a:hover:after {
  width: 100%;
  left: 0%;
}
header .menu a:after {
  content: "";
  pointer-events: none;
  bottom: -2px;
  left: 50%;
  position: absolute;
  width: 0%;
  height: 2px;
  background: linear-gradient(45deg, var(--color-brand), var(--color-accent));
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-duration: 0.4s;
  transition-property: width, left;
}
header .btn {
  width: 25px;
  height: 20px;
  position: relative;
  cursor: pointer;
  display: none;
}
header .btn #spn1,
#spn2,
#spn3 {
  position: absolute;
  content: "";
  background: var(--color-text-on-dark);
  width: 25px;
  height: 3px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast) ease;
}
#spn2 {
  top: 9px;
}
#spn3 {
  top: 18px;
}
#menu-btn {
  display: none;
}
header.abajo .btn #spn1 {
  background: var(--color-bg);
}
header.abajo .btn #spn2 {
  background: var(--color-bg);
}
header.abajo .btn #spn3 {
  background: var(--color-bg);
}
#menu-btn:checked ~ .btn #spn1 {
  transform: rotate(140deg);
  top: 10px;
}
#menu-btn:checked ~ .btn #spn2 {
  opacity: 0;
  margin-left: 30px;
}
#menu-btn:checked ~ .btn #spn3 {
  transform: rotate(-140deg);
  top: 10px;
}
header .social_media_container {
  width: 100%;
  display: none;
  text-align: center;
  margin-top: 25px
}
header .all_social_media {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 100px;
}
header button {
  margin: 0 15px;
  background: transparent;
  border: none;
  cursor: pointer;
}
#menu-carrito {
  display: none;
}
header .bolsa ul li {
  list-style: none;
  margin: 0;
  margin: 0 auto;
  max-width: 22%;
}
header .bts {
  width: 23px;
  height: 18px;
  position: relative;
  cursor: pointer;
}
header .Bag {
  position: relative;
  padding: 0 30px;
}
header .count-products {
  font-size: 13px;
  position: absolute;
  top: 50%;
  right: 0;
  background: var(--color-surface);
  color: var(--color-bg);
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--color-bg);
  border-radius: var(--radius-full);
  transition: var(--transition-slow);
}
header.abajo .count-products {
  background: var(--color-bg-ui);
  color: var(--color-surface);
  border: 1px solid var(--color-surface);
}
header .count-products span {
  color: var(--color-bg);
}
header.abajo .count-products span {
  color: var(--color-surface);
}
header .bolsa {
  max-width: 432px;
  min-width: 432px;
  position: fixed;
  background: var(--color-bg-card);
  z-index: 102;
  right: 0;
  top: 0;
  transform: translateX(100%);
  transition: transform var(--transition-slow) ease-in-out;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
header .bolsa.active {
  transform: translateX(0);
  box-shadow: var(--shadow-panel);
}
header .btC {
  display: flex;
  width: 25px;
  height: 25px;
  align-items: center;
  cursor: pointer;
}
header .bolsa h3 {
  color: var(--color-bg);
  font-size: 21px;
  text-align: start;
  font-weight: 500;
  margin: 0;
  padding: 0;
}
header .carrito {
  position: left;
}
header .bolsa .botones_bolsa {
  margin: 15px 0 0 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
header .carrito_vacio {
  text-align: center;
  padding-top: 35px;
  border-top: 1px solid var(--color-border);
}
header .carrito_vacio img {
  width: 160px;
  height: 160px;
  margin: auto;
}
header .carrito_vacio h4 {
  color: #505050;
  font-size: 25px;
  font-weight: 100;
  margin-top: 10px;
}
header .bolsa ul {
  display: flex;
  flex-direction: flex;
  justify-content: space-between;
}
header .bolsa button {
  background-color: var(--color-bg-ui);
  color: var(--color-text-on-dark);
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  border: solid thin var(--color-border);
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: none;
}
header .bolsa button img {
  width: 20px;
  height: 20px;
  margin: 0 9px;
  filter: invert(100%) sepia(50%) saturate(2%) hue-rotate(62deg)
    brightness(107%) contrast(101%);
}
header .bolsa button:hover {
  background: var(--gradient-brand);
  color: var(--color-text-on-dark);
  transition: var(--transition-slow);
}
header .bolsa .bolsa-inicio {
  width: 100%;
  display: flex;
  padding: 20px 10px;
  justify-content: space-between;
  box-shadow: var(--shadow-header);
}
#spn4 {
  transform: rotate(-140deg);
}
#spn5 {
  transform: rotate(140deg);
}
#cerrar-carrito {
  display: none;
}
header .bolsa #spn4,
#spn5 {
  position: fixed;
  content: "";
  background: var(--color-bg);
  width: 25px;
  height: 2px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
header .bolsa .btC:hover #spn4 {
  transform: rotate(0deg);
}
header .bolsa .btC:hover #spn5 {
  transform: rotate(0deg);
}
header .lista-productos {
  height: 60%;
  overflow-y: auto;
}
header .lista-productos::-webkit-scrollbar {
  width: 12px;
}
header .lista-productos::-webkit-scrollbar-track {
  background: var(--color-surface-alt);
}
header .lista-productos::-webkit-scrollbar-thumb {
  background-color: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-surface-alt);
}
header .lista-productos .selected_product {
  display: flex;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  margin: 0 4%;
  padding-top: 17px;
  position: relative;
}
header .lista-productos span {
  color: var(--color-bg);
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}
header .lista-productos p {
  color: var(--color-bg);
  font-size: 14px;
  margin: 0;
  text-align: start;
}
header .lista-productos .quantity {
  color: var(--color-text-faint);
  font-size: 12px;
  font-weight: 100;
}
header .lista-productos .cantidad {
  display: none;
}
header .lista-productos .product {
  width: 23%;
  min-width: 120px;
  height: auto;
  border-radius: var(--radius-md);
}
header .lista-productos .product_specification {
  flex-direction: column;
  display: flex;
  margin: 0px auto 0px 10px;
}
header .precios_productos:has(.predesc) .pretot {
  color: var(--color-text-faint);
  color: #888888;
  font-weight: 100;
}
header .precios_productos .predesc,
header .precios_productos .pretot {
  font-weight: 600;
}
header .lista-productos .precios_productos {
  display: flex;
  flex-direction: column;
  border: none;
  min-width: 69px;
  margin: 0 5px;
}
header .lista-productos .trash {
  width: 17px;
  height: 17px;
  padding: 2px;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 5px;
}
header .cart_summary {
  box-shadow: var(--shadow-header);
  height: auto;
  padding: 10px 0;
  width: 100%;
  margin-top: auto;
}
header .subtotal {
  display: flex;
  justify-content: space-between;
  margin: 0px 20px;
  padding-top: 20px;
}
header .subtotal h4 {
  color: var(--color-bg);
  font-size: 15px;
  margin: 2px 0;
  font-weight: 100;
}
header .subtotal span {
  color: var(--color-text-faint);
  text-decoration: line-through;
  font-size: 15px;
  display: flex;
  justify-content: center;
}
header .ahorrocompra {
  display: flex;
  justify-content: space-between;
  margin: 0px 20px;
}
header .ahorrocompra h4 {
  color: var(--color-bg);
  font-size: 15px;
  margin: 2px 0;
  font-weight: 100;
}
header .ahorrocompra span {
  color: var(--color-bg);
  font-size: 15px;
  display: flex;
  justify-content: center;
}
header .total {
  display: flex;
  justify-content: space-between;
  margin: 0px 20px;
  padding-top: 15px;
}
header .total h4 {
  color: var(--color-brand);
  font-weight: 500;
  font-size: 18px;
  margin: 5px 0;
}
header .total span {
  color: var(--color-brand);
  font-size: 18px;
  font-weight: 500;
}
@media (max-width: 950px) {
  header,
  header.abajo {
    padding: 5px 4% 5px 4%
  }
  header .btn {
    display: flex;
  }
  header .menu {
    position: fixed;
    background: var(--color-bg-card);
    min-width: 33px;
    height: 40vh;
    top: -100%;
    align-items: center;
    padding: 30px 0px;
    transition: 800ms;
    transition-property: left;
    opacity: 1;
    z-index: 3;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.35);
  }
  header .carrito {
    position: right;
  }
  header .menu ul {
    flex-direction: column;
    margin: 0px 20px;
    border-radius: 8px;
  }
  header .menu ul li {
    width: 100%;
  }
  header .menu.active {
    width: 50%;
    height: 50vh;
    top: 58px;
    right: 0;
    transition: var(--transition-slow);
  }
  header .menu.active ul li a {
    color: var(--color-bg);
    text-align: center;
  }
  header .menu.active ul li a:hover {
    color: var(--color-brand);
    background: #e6e6e6;
  }
  header .social_media_container {
    display: block;
  }
  header .all_social_media {
    display: flex;
    justify-content: space-between;
    width: 85%;
    margin: 0 auto;
    padding: 15px 15px;
    border-radius: 7px;
    box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.35);
  }
  header .menu a {
    display: block;
    font-size: 18px;
    padding: 7px 0px;
    margin: 0;
    cursor: pointer;
    border-radius: 7px;
  }
   header .menu .all_social_media a {
    padding: 0;
    height: 30px;
   }
  .Bag img {
    padding: 0 0px;
  }
}
@media (max-width: 650px) {
  header {
    margin-top: 24px;
  }
  header,
  header.abajo {
    padding: 4px 3% 4px 4%;
  }
  header .menu.active {
    width: 100%;
    top: 83px;
  }
  header li {
    padding: 0;
  }
  header .Bag {
    padding: 0;
  }
  header .lista-productos .selected_product {
    margin: 0 15px;
  }
  header .lista-productos p {
    font-size: 13px;
  }
  header .lista-productos span {
    font-size: 15px;
  }
  header .lista-productos .trash {
    width: 18px;
    height: 18px;
  }
  header .lista-productos .precio-item {
    font-weight: 100;
  }
  .user-displayname {
    display: none;
  }
  .user-btn--guest .user-label {
    display: none;
  }
}
@media (max-width: 432px) {
  header .bolsa {
    min-width: 100%;
  }
}
