@import "./cart.css";

:root {
  --site-header-background: #4b1679;
  --home-category-nav-height: 44px;
  --site-headers-background: linear-gradient(
    to bottom,
    #000000 0%,
    var(--site-header-background) 100%
  );
  --site-headers-background-height: calc(
    var(--header-height, 64px) + var(--home-category-nav-height)
  );
}

html,
body {
  overscroll-behavior: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  background: #f6f7f9;
  font-family: sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-top: var(--header-offset, 0px);
}

body.modal-open {
  overflow: hidden;
}

body.checkout-page {
  background: #f6f7f9;
}
body.inventario-page {
  background: #f6f7f9;
}

main {
  background: #f6f7f9;
  min-width: 0;
  box-sizing: border-box;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* HEADER */
.header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "logo search user cart";
  align-items: center;
  padding: 12px 16px;
  background-color: var(--site-header-background);
  background-image: var(--site-headers-background);
  background-repeat: no-repeat;
  background-size: 100% var(--site-headers-background-height);
  background-position: top center;
  background-attachment: fixed;
  color: #fff;
  gap: 15px;
  width: 100%;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  transform: translateY(0);
  will-change: transform;
  transition: background-color 0.15s ease;
}

.header:hover {
  background-color: var(--site-header-background);
}

body:not(.home-page) .header,
body:not(.home-page) .header:hover {
  background-color: #15181e;
  background-image: none;
  color: #fff;
  text-shadow: none;
}

body:not(.home-page) .header .logo {
  filter: none;
}

body:not(.home-page) .header .user-menu:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

body:not(.home-page) .header .user-menu-caret {
  border-top-color: rgba(255, 255, 255, 0.92);
}

#btn-ordenes-header.has-pending-verification,
#btn-ordenes-drawer.has-pending-verification {
  outline: 2px solid #facc15 !important;
  outline-offset: 2px;
}

#btn-ordenes-header.has-pending-manual-payment,
#btn-ordenes-drawer.has-pending-manual-payment {
  outline: 2px solid #facc15 !important;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .header:has(#btn-ordenes-header.has-pending-verification) .user-menu,
  .header:has(#btn-ordenes-header.has-pending-manual-payment) .user-menu {
    outline: 2px solid #facc15 !important;
    outline-offset: 2px;
  }
}

.logo {
  width: 150px;
  height: 25px;
  object-fit: contain;
  grid-area: logo;
}

.search {
  width: 100%;
  height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 15px;
  color: #111;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.search::placeholder {
  font-size: 15px;
  color: #9ca3af;
}

.search:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.search-box {
  position: relative;
  min-width: 0;
  grid-area: search;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  text-shadow: none;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  margin-top: 6px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
}

.search-results.hidden {
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  color: #111;
}

.search-result-item:hover {
  background: #f2f2f2;
}

.search-result-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 900px) {
  body {
    padding-top: var(--header-height, var(--header-offset, 0px));
  }

  .header {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "logo logo user user"
      "actions actions actions actions"
      "search search search search";
    row-gap: 6px;
    column-gap: 10px;
    padding: 8px;
    align-items: center;
  }
  .header::after {
    display: none;
  }
  .header.has-admin-btn::before {
    display: none;
  }
  .logo {
    justify-self: start;
    width: clamp(108px, 34vw, 138px);
    height: clamp(20px, 5.4vw, 24px);
  }
  .header .header-user {
    display: contents;
  }
  .header .header-admin-actions {
    display: grid;
    grid-area: actions;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
  }
  .header .user-info {
    margin: 0;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    grid-area: user;
    justify-self: end;
  }
  .header .user-menu {
    --avatar-size: clamp(32px, 8.8vw, 38px);
    min-width: 0;
    max-width: 100%;
    width: fit-content;
    padding: 2px 6px 2px 2px;
    gap: 6px;
    border-radius: calc(var(--avatar-size) / 2 + 4px);
  }
  .header .avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    flex: 0 0 auto;
  }
  .header .username {
    display: block;
    min-width: 0;
    max-width: clamp(92px, 35vw, 170px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(13px, 3.8vw, 16px);
    line-height: 1.1;
  }
  .header #btn-login {
    font-size: 13px;
    padding: 6px 10px;
    line-height: 1;
    white-space: nowrap;
  }
  .header #btn-admin-header,
  .header #btn-ordenes-header {
    margin: 0;
    min-width: 0;
    justify-content: center;
    width: 100%;
  }
  .header .search-box {
    width: 100%;
    padding-right: calc(33px + 10px);
    box-sizing: border-box;
    min-width: 0;
    grid-area: search;
  }
  .header .carrito {
    width: 33px;
    margin: 0;
    padding: 0;
    grid-area: search;
    align-self: center;
    justify-self: end;
    z-index: 1;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .header {
    grid-template-columns: auto minmax(100px, 1fr) auto auto;
    grid-template-areas: "logo search user cart";
    row-gap: 0;
    column-gap: 10px;
  }

  .header .header-user {
    display: flex;
    min-width: 0;
    gap: 6px;
  }

  .header .header-admin-actions {
    display: contents;
    grid-area: auto;
  }

  .header .user-info {
    grid-area: auto;
  }

  .header .carrito {
    grid-area: cart;
    justify-self: end;
  }

  .header #btn-admin-header,
  .header #btn-ordenes-header {
    width: auto;
  }

  .header .search-box {
    width: 100%;
    padding-right: 0;
    justify-self: stretch;
  }
}

@media (max-width: 360px) {
  .header {
    column-gap: 10px;
  }

  .logo {
    width: clamp(96px, 30vw, 108px);
    height: auto;
  }

  .header .user-menu {
    --avatar-size: 30px;
    gap: 4px;
    padding-right: 3px;
  }

  .header .username {
    max-width: max(54px, min(31vw, calc(100vw - 194px)));
    font-size: 13px;
  }

  .header #btn-admin-header,
  .header #btn-ordenes-header {
    min-height: 36px;
    padding: 6px;
    font-size: 12px;
    line-height: 1.1;
    white-space: normal !important;
  }
}

.search-result-name {
  font-size: 14px;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;
  grid-area: user;
}

.header-mobile-tools {
  display: contents;
}

.mobile-search-header-btn {
  display: none;
}

.user-drawer-backdrop {
  display: none;
}

#user-drawer {
  display: none;
}

.drawer-item-icon {
  display: none;
}

@media (min-width: 701px) {
  .user-menu .user-dropdown {
    min-width: 230px;
    text-shadow: none;
  }

  .user-menu .user-dropdown > .dropdown-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    min-height: 38px;
    box-sizing: border-box;
    line-height: 1.2;
    text-shadow: none;
  }

  .user-menu .user-dropdown > .dropdown-item .drawer-item-label {
    grid-column: 2;
    min-width: 0;
  }

  .user-menu .user-dropdown .admin-link-row .admin-link {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    min-height: 38px;
    box-sizing: border-box;
    line-height: 1.2;
  }

  .user-menu .user-dropdown .admin-link-row .admin-link .drawer-item-label {
    grid-column: 2;
    min-width: 0;
  }

  .user-menu .drawer-item-icon {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
  }

  .user-menu .drawer-icon-question {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 1 1 3.8 2.1c-1.3.8-1.3 1.4-1.3 2.4M12 17h.01' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 1 1 3.8 2.1c-1.3.8-1.3 1.4-1.3 2.4M12 17h.01' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
  }

  .user-menu .drawer-icon-dashboard {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E");
  }
}

.header-admin-actions {
  display: contents;
}

.user-menu {
  --avatar-size: 40px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px 2px 2px;
  border-radius: calc(var(--avatar-size) / 2 + 4px);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.user-menu:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.user-menu.has-inventario-notificacion {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

.avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  object-fit: cover;
  border: none;
}

.username {
  font-weight: 600;
}

.username-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-menu-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.92);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  color: #111;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  padding: 8px 0;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  z-index: 10;
}

.user-menu:hover .user-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.user-menu.open .user-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-menu.suppress-dropdown .user-dropdown {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
}

.delivery-toast {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: #1b7a1f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.delivery-toast::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #1b7a1f;
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.delivery-dot {
  display: inline-block;
  margin-left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  vertical-align: middle;
}
.notify-dot {
  display: inline-block;
  margin-left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  vertical-align: middle;
}

.dropdown-item {
  display: block;
  padding: 8px 14px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.dropdown-item:hover {
  background: #f2f2f2;
}

.user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 38px;
  box-sizing: border-box;
  font-size: 17px;
}

.user-dropdown .dropdown-item:hover,
.user-dropdown .dropdown-item:focus-visible {
  border-radius: 8px;
}

.user-dropdown .mis-cuentas-link {
  margin: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f766e;
}

.user-dropdown .mis-cuentas-link:hover,
.user-dropdown .mis-cuentas-link:focus {
  background: #f2f2f2;
  color: #0f766e;
}

.admin-link-row {
  position: relative;
}

.user-dropdown .admin-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding-right: 42px;
  border-radius: 8px;
  background: transparent;
  color: #0f766e;
}

.user-dropdown .admin-link:hover,
.user-dropdown .admin-link:focus {
  background: #f2f2f2;
  color: #0f766e;
}

.admin-menu-item {
  position: relative;
}

.admin-menu-item.hidden {
  display: none;
}

.admin-submenu-toggle {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 22px;
  height: calc(100% - 12px);
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f766e;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-submenu-toggle:hover,
.admin-submenu-toggle:focus-visible {
  outline: none;
  color: #0f766e;
}

.admin-submenu-caret {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.admin-submenu {
  position: static;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: #111;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    max-height 0.2s ease,
    padding 0.2s ease;
}

.admin-menu-item.open .admin-submenu {
  max-height: 280px;
  padding: 0;
  opacity: 1;
  pointer-events: auto;
}

.admin-submenu .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  box-sizing: border-box;
  padding: 8px 14px 8px 44px;
  border-radius: 8px;
}

.admin-submenu-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-left: 12px;
  border-radius: 50%;
  background: #4b5563;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.dropdown-button {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 600;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  color: inherit;
}

.dropdown-button:hover {
  background: #f2f2f2;
}

.logout-btn {
  color: #dc2626;
}

.user-dropdown .logout-btn,
.user-dropdown .logout-btn .drawer-item-label,
.user-dropdown .logout-btn .drawer-item-icon {
  color: #dc2626;
}

.logout-btn:hover,
.logout-btn:focus {
  background: #fee2e2;
}

.carrito {
  width: 33px;
  cursor: pointer;
  margin-left: 0;
  grid-area: cart;
  justify-self: end;
}

/* Cabecera compacta exclusiva para teléfonos. */
@media (max-width: 700px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "user logo tools";
    min-height: 54px;
    padding: 8px 12px;
    gap: 8px;
  }

  .header .logo {
    grid-area: logo;
    justify-self: center;
    width: clamp(108px, 31vw, 132px);
    height: auto;
  }

  .header .header-admin-actions {
    display: none;
  }

  .header .user-info {
    grid-area: user;
    justify-self: start;
    max-width: 100%;
  }

  .header .user-menu {
    --avatar-size: 34px;
    padding: 2px 4px 2px 2px;
    gap: 0;
  }

  .header .user-menu::before {
    content: "";
    width: 36px;
    height: 20px;
    flex: 0 0 36px;
    margin-right: 0;
    background:
      radial-gradient(circle at center, #fff 0 2px, transparent 2.1px) 10px
        2px / 4px 4px no-repeat,
      linear-gradient(#fff 0 0) 12px 2px / 24px 4px no-repeat,
      radial-gradient(circle at center, #fff 0 2px, transparent 2.1px) 10px
        8px / 4px 4px no-repeat,
      linear-gradient(#fff 0 0) 12px 8px / 24px 4px no-repeat,
      radial-gradient(circle at center, #fff 0 2px, transparent 2.1px) 10px
        14px / 4px 4px no-repeat,
      linear-gradient(#fff 0 0) 12px 14px / 24px 4px no-repeat;
    -webkit-mask-image: radial-gradient(
      circle 18px at 50px 10px,
      transparent 0 17.5px,
      #000 18px
    );
    mask-image: radial-gradient(
      circle 18px at 50px 10px,
      transparent 0 17.5px,
      #000 18px
    );
  }

  .header .user-menu .avatar {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    border: 0;
  }

  .header .username {
    display: none;
  }

  .header .username-wrap {
    display: none;
  }

  .user-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
  }

  #user-drawer {
    display: block;
  }

  body.user-drawer-open {
    overflow: hidden;
    height: 100%;
    touch-action: none;
  }

  .user-drawer.open {
    pointer-events: auto;
  }

  .user-drawer-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .user-drawer.open .user-drawer-backdrop {
    opacity: 1;
  }

  .user-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 360px;
    max-width: 85%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .user-drawer.open .user-panel {
    transform: translateX(0);
  }

  .user-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .user-drawer-profile {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 10px;
  }

  .user-drawer-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
  }

  .user-drawer-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
  }

  .user-drawer-name {
    overflow: hidden;
    padding-top: 10px;
    color: #111827;
    font-size: 17px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-drawer-email {
    overflow: hidden;
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-drawer-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .user-drawer-admin-actions .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0;
    padding: 6px 11px;
    border-radius: 8px;
    border-color: #15181e;
    background: #15181e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
    transition:
      background 0.15s ease,
      border-color 0.15s ease,
      transform 0.15s ease;
  }

  .user-drawer-admin-actions .btn-outline:hover,
  .user-drawer-admin-actions .btn-outline:focus-visible {
    border-color: #2a303b;
    background: #2a303b;
    color: #fff;
    transform: translateY(-1px);
  }

  .user-drawer-close {
    border: 0;
    padding: 0;
    background: transparent;
    color: #111;
    font-size: 22px;
    cursor: pointer;
  }

  .user-drawer-items {
    display: block;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 6px 2px 12px;
  }

  .user-drawer .user-dropdown {
    position: static;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    row-gap: 8px;
  }

  .user-drawer .user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .user-drawer .user-dropdown > a.dropdown-item:not(.hidden),
  .user-drawer .user-dropdown > button.dropdown-item:not(.hidden) {
    display: flex !important;
    color: #111827;
    visibility: visible;
  }

  .user-drawer .user-dropdown > .mis-cuentas-link {
    margin: 0;
    border-radius: 0;
    background: transparent;
    color: #0f766e !important;
  }

  .user-drawer .user-dropdown > .mis-cuentas-link:hover,
  .user-drawer .user-dropdown > .mis-cuentas-link:focus {
    background: #f2f2f2;
    color: #0f766e !important;
    border-radius: 8px;
  }

  .user-drawer .admin-link {
    margin: 0;
    border-radius: 0;
    background: transparent;
    color: #0f766e !important;
    gap: 20px;
  }

  .user-drawer .admin-link:hover,
  .user-drawer .admin-link:focus {
    background: #f2f2f2;
    color: #0f766e !important;
    border-radius: 8px;
  }

  .user-drawer .admin-submenu-toggle,
  .user-drawer .admin-submenu-toggle:hover,
  .user-drawer .admin-submenu-toggle:focus-visible {
    color: #0f766e;
  }

  .user-drawer .user-dropdown > .logout-btn {
    margin-top: auto;
    color: #dc2626;
  }

  .user-drawer .drawer-item-icon {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
  }
}

.user-drawer .drawer-icon-profile {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='none' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M4 21c.7-4 3.4-6 8-6s7.3 2 8 6' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='none' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M4 21c.7-4 3.4-6 8-6s7.3 2 8 6' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.2'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-wallet {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='M3 7V5a2 2 0 0 1 2-2h12M16 14h2' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='M3 7V5a2 2 0 0 1 2-2h12M16 14h2' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-key {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='15' r='3' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='m10 13 9-9 2 2-2 2 2 2-2 2-2-2-5 5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='15' r='3' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='m10 13 9-9 2 2-2 2 2 2-2 2-2-2-5 5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-bell {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 22h4' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 9a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 22h4' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-alert {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 21h20L12 3Z' fill='none' stroke='black' stroke-linejoin='round' stroke-width='2.1'/%3E%3Cpath d='M12 9v5M12 17h.01' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 21h20L12 3Z' fill='none' stroke='black' stroke-linejoin='round' stroke-width='2.1'/%3E%3Cpath d='M12 9v5M12 17h.01' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-bag {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 8h12l1 13H5L6 8ZM9 8a3 3 0 0 1 6 0' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 8h12l1 13H5L6 8ZM9 8a3 3 0 0 1 6 0' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-question {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 1 1 3.8 2.1c-1.3.8-1.3 1.4-1.3 2.4M12 17h.01' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2.1'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 1 1 3.8 2.1c-1.3.8-1.3 1.4-1.3 2.4M12 17h.01' fill='none' stroke='black' stroke-linecap='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-logout {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 3H5v18h8M17 8l4 4-4 4M21 12H9' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 3H5v18h8M17 8l4 4-4 4M21 12H9' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-document {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h8l4 4v14H6V3ZM14 3v5h5M9 12h6M9 16h6' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h8l4 4v14H6V3ZM14 3v5h5M9 12h6M9 16h6' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-box {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 7 9-4 9 4v10l-9 4-9-4V7ZM3 7l9 4 9-4M12 11v10' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 7 9-4 9 4v10l-9 4-9-4V7ZM3 7l9 4 9-4M12 11v10' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.1'/%3E%3C/svg%3E");
}
.user-drawer .drawer-icon-dashboard {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='none' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E");
}

@media (max-width: 700px) {
  .user-drawer .drawer-item-label {
    display: inline;
    min-width: 0;
    color: inherit;
    font: inherit;
    line-height: inherit;
    opacity: 1;
    visibility: visible;
  }

  .header .header-mobile-tools {
    display: flex;
    grid-area: tools;
    align-items: center;
    justify-self: end;
    gap: 14px;
  }

  .header .mobile-search-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }

  .header .mobile-search-icon {
    position: relative;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
  }

  .header .mobile-search-icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 7px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: left center;
  }

  .header .header-mobile-tools .carrito {
    grid-area: auto;
    align-self: auto;
    justify-self: auto;
    width: 28px;
    margin: 0;
    padding: 0;
  }

  .header .search-box {
    display: none;
  }

  .header.mobile-search-open .search-box {
    display: block;
    position: fixed;
    top: calc(
      var(--header-height, 54px) + var(--home-category-nav-height, 44px)
    );
    right: 8px;
    left: 8px;
    z-index: 2001;
    width: auto;
    padding: 0;
  }

  .header.mobile-search-open .search {
    height: 42px;
  }

  .header #btn-login {
    grid-area: user;
  }
}

@media (max-width: 700px) {
  body:not(.home-page) .header .user-menu::before {
    background:
      radial-gradient(circle at center, #fff 0 2px, transparent 2.1px) 10px
        2px / 4px 4px no-repeat,
      linear-gradient(#fff 0 0) 12px 2px / 24px 4px no-repeat,
      radial-gradient(circle at center, #fff 0 2px, transparent 2.1px) 10px
        8px / 4px 4px no-repeat,
      linear-gradient(#fff 0 0) 12px 8px / 24px 4px no-repeat,
      radial-gradient(circle at center, #fff 0 2px, transparent 2.1px) 10px
        14px / 4px 4px no-repeat,
      linear-gradient(#fff 0 0) 12px 14px / 24px 4px no-repeat;
  }
}

@media (max-width: 700px) {
  .header.mobile-search-open {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "search";
  }

  .header.mobile-search-open .logo,
  .header.mobile-search-open .header-user,
  .header.mobile-search-open .header-cart-action {
    display: none;
  }

  .header.mobile-search-open .header-mobile-tools {
    display: flex;
    flex: 0 0 30px;
    width: 30px;
    align-items: center;
    justify-content: center;
    order: 2;
  }

  .header.mobile-search-open .logo {
    justify-self: start;
  }

  .header.mobile-search-open .header-mobile-tools {
    gap: 0;
  }

  .header.mobile-search-open .mobile-search-header-btn {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    z-index: 2002;
    order: 1;
    transform: none;
  }

  .header.mobile-search-open .header-cart-action {
    margin-left: 0;
  }

  .header.mobile-search-open .search-box {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    flex: 1 1 auto;
    order: 1;
    min-width: 0;
    width: auto;
    z-index: 2001;
    transform-origin: right center;
    animation: mobile-search-expand 0.2s ease-out both;
  }
}

@keyframes mobile-search-expand {
  from {
    opacity: 0;
    transform: scaleX(0.08);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.metodos-pago {
  margin-top: 24px;
}

.page-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.cart-pay-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
}

.cart-promo-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
  align-self: flex-end;
}

.cart-promo-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-align: left;
}

.cart-promo-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.cart-promo-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.cart-promo-input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 6px 34px 6px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-sizing: border-box;
  text-transform: uppercase;
}

.cart-promo-input:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.cart-promo-remove {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  place-items: center;
  transform: translateY(-50%);
}

.cart-promo-remove:hover:not(:disabled) {
  background: #fee2e2;
  color: #b91c1c;
}

.cart-promo-remove:disabled {
  cursor: wait;
  opacity: 0.6;
}

.cart-promo-apply {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 32px;
  padding: 7px 12px;
}

.cart-promo-feedback {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  color: #475569;
}

.cart-promo-feedback.is-success {
  color: #166534;
}

.cart-promo-feedback.is-error {
  color: #b91c1c;
}

.cart-pay-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.cart-page .btn-cart-main {
  min-height: 30px;
  min-width: 132px;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.cart-page .btn-cart-main:hover {
  background: #020617;
  border-color: #020617;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.24);
  transform: translateY(-1px);
}

.cart-page .btn-cart-main:active {
  transform: translateY(0);
}

.cart-page .btn-cart-main.is-pressed {
  background: #020617;
  border-color: #020617;
  color: #fff;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.28);
  transform: translateY(1px);
}

.cart-page .btn-cart-main:disabled,
.cart-page .btn-cart-main.btn-disabled-soft {
  background: #94a3b8;
  border-color: #94a3b8;
  color: #e2e8f0;
  box-shadow: none;
  transform: none;
  opacity: 1;
  filter: none;
  cursor: not-allowed;
}

.cart-page .btn-cart-main.is-pressed:disabled {
  background: #020617;
  border-color: #020617;
  color: #fff;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.28);
  transform: translateY(1px);
}

.cart-page #cart-promo-apply {
  background: #6b7280;
  border-color: #6b7280;
  box-shadow: 0 6px 14px rgba(107, 114, 128, 0.18);
}

.cart-page #cart-promo-apply.has-code {
  background: #f59e0b;
  border-color: #f59e0b;
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.2);
}

.cart-page #cart-promo-apply:hover {
  background: #4b5563;
  border-color: #4b5563;
  box-shadow: 0 8px 18px rgba(75, 85, 99, 0.24);
}

.cart-page #cart-promo-apply.has-code:hover {
  background: #d97706;
  border-color: #d97706;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.24);
}

.cart-page #cart-promo-apply:disabled,
.cart-page #cart-promo-apply.has-code:disabled {
  background: #94a3b8;
  border-color: #94a3b8;
  box-shadow: none;
}

.cart-pay-row #btn-page-continue {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 4px 10px rgba(100, 116, 139, 0.16);
}

.cart-pay-row #btn-page-continue:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.cart-pay-stack .status {
  margin: 2px 0 0;
}

.cart-saldo {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.cart-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cart-title-row .cart-saldo {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  color: #0f766e;
}

.cart-saldo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  padding: 10px 12px;
}

.cart-saldo-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.cart-saldo.is-zero {
  color: #9ca3af;
}

#cart-page-items {
  margin-bottom: 8px;
}

.cart-actions-inline {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-actions-inline .btn-cart-main {
  margin-left: 0;
}

.cart-saldo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: inherit;
  font-weight: 700;
  line-height: normal;
  user-select: none;
}

.cart-saldo-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0f766e;
  cursor: pointer;
}

.cart-saldo-toggle.is-active {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #0f766e;
}

.cart-saldo-toggle.is-disabled {
  opacity: 0.55;
}

.cart-saldo-toggle.is-disabled input {
  cursor: not-allowed;
}

.btn-disabled-soft,
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: saturate(0.6);
}

.cart-page-table th,
.cart-page-table td {
  text-align: center;
  vertical-align: middle;
}

.cart-page-table th:first-child {
  text-align: center;
}

.cart-page-table td:first-child {
  text-align: left;
}

.cart-page-table td:nth-child(3),
.cart-page-table td:nth-child(4),
.cart-page-table td:nth-child(5) {
  text-align: center;
}

.cart-page-table td.cart-actions-inline {
  text-align: right !important;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-width: 0;
  align-items: start;
}

.cart-left,
.cart-right {
  width: 100%;
  min-width: 0;
}

.cart-main-table-wrap,
.cart-summary-table-wrap {
  width: 100%;
  min-width: 0;
}

.cart-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}

.cart-left .cart-page-table {
  width: 100%;
  min-width: 760px;
}

.cart-right .cart-summary-table {
  width: 100%;
  min-width: 0;
  display: table;
  margin: 0;
  table-layout: fixed;
}

.cart-summary-table.table-base {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}

.cart-summary-table.table-base th,
.cart-summary-table.table-base td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.cart-pay-wrap {
  margin-top: 10px;
  text-align: right;
}

.cart-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media (min-width: 1200px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
  }

  .cart-right {
    border-left: 1px solid #d1d5db;
    padding-left: 14px;
  }
}

@media (max-width: 1199px) {
  .cart-right {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .cart-title-row {
    align-items: stretch;
  }

  .cart-saldo-wrap {
    width: fit-content;
    max-width: 100%;
    align-items: flex-start;
  }

  .cart-title-row .cart-saldo,
  .cart-saldo-label {
    text-align: left;
  }

  .cart-actions-inline {
    justify-content: flex-start;
  }

  .cart-promo-field {
    width: 100%;
    max-width: none;
    align-self: stretch;
  }

  .cart-promo-inline {
    width: 100%;
    flex-wrap: nowrap;
  }

  .cart-promo-apply,
  .cart-promo-feedback {
    align-self: flex-start;
    text-align: left;
  }

  .cart-promo-apply {
    width: max-content;
    min-width: 0;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .cart-pay-row {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

.checkout-form {
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}

.checkout-form > * {
  max-width: 100%;
  box-sizing: border-box;
}

.form-label {
  font-weight: 700;
  margin: 6px 0 2px;
}

.form-label .required {
  color: red;
}

.form-select,
.form-input {
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

#input-ref {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.checkout-form .form-select,
.checkout-form .form-input,
.checkout-form #input-ref,
.checkout-form .metodo-detalle,
.checkout-form .checkout-total,
.checkout-form .dropzone {
  width: 100%;
  max-width: 100%;
}

.checkout-form .page-pay-btn {
  width: 100%;
}

#phone-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hidden {
  display: none !important;
}

/* Loader */
.page-loader {
  position: fixed;
  inset: 0;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  visibility: visible;
  opacity: 1;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.page-loader__content {
  --loader-logo-width: 180px;
  --loader-logo-height: 32px;
  --loader-avatar-size: 140px;
  --loader-gap: 14px;
  --loader-progress-width: 220px;
  --loader-progress-height: 8px;
  position: relative;
  width: max(var(--loader-logo-width), var(--loader-progress-width));
  height: calc(
    var(--loader-avatar-size) + var(--loader-logo-height) + var(--loader-gap)
  );
}

.page-loader__avatar-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--loader-avatar-size);
  height: var(--loader-avatar-size);
  transform: translate(
    -50%,
    calc(-100% - (var(--loader-logo-height) / 2 + var(--loader-gap)))
  );
  border-radius: 50%;
  overflow: hidden;
}

.page-loader__avatar-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #f3f4f6;
}

.page-loader__avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  background: transparent;
}

.page-loader__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--loader-logo-width);
  height: var(--loader-logo-height);
  transform: translate(-50%, -50%);
  background: url("../assets/logo-header-carga/logo-blanco.webp") center /
    contain no-repeat;
}
.page-loader__logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
}

.page-loader__progress {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--loader-logo-height) / 2 + 14px);
  width: var(--loader-progress-width);
  height: var(--loader-progress-height);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.page-loader__progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #facc15 0%, #eab308 100%);
  transition: width 0.2s ease;
}

.page-loader__progress-text {
  position: absolute;
  left: 50%;
  top: calc(
    50% + var(--loader-logo-height) / 2 + 14px + var(--loader-progress-height) +
      10px
  );
  transform: translateX(-50%);
  margin: 0;
  color: #fef08a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.page-loader--error .page-loader__progress-text {
  width: min(290px, 90vw);
  line-height: 1.4;
  text-align: center;
  white-space: normal;
}

.page-loader--error #page-loader-retry {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--loader-logo-height) / 2 + 90px);
  transform: translateX(-50%);
  cursor: pointer;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.connectivity-error-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  background: #050505;
  color: #f8fafc;
  text-align: center;
}

.connectivity-error-screen__content {
  width: min(100%, 920px);
  min-height: min(600px, calc(100dvh - 32px));
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 32px;
  background: #101010;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.connectivity-error-screen__brand {
  width: 180px;
  height: 32px;
  margin-bottom: clamp(26px, 4vw, 40px);
  object-fit: contain;
}

.connectivity-error-screen__icon {
  display: grid;
  width: 88px;
  height: 88px;
  margin-bottom: 26px;
  border-radius: 50%;
  place-items: center;
  background: rgba(250, 204, 21, 0.11);
  color: #fde047;
}

.connectivity-error-screen__icon svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.connectivity-error-screen h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
}

.connectivity-error-screen p {
  max-width: 760px;
  margin: 24px 0 0;
  color: #c8c8cb;
  font-size: clamp(17px, 1.8vw, 24px);
  line-height: 1.38;
}

.connectivity-error-screen .connectivity-error-screen__detail {
  margin-top: 16px;
}

.connectivity-error-screen button {
  width: fit-content;
  min-height: 58px;
  margin-top: 32px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #303030;
  color: #eeeef0;
  font: inherit;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 650;
  cursor: pointer;
}

.connectivity-error-screen button:hover,
.connectivity-error-screen button:focus-visible {
  background: #414141;
}

.connectivity-error-screen button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 560px) {
  .connectivity-error-screen__content {
    min-height: calc(100dvh - 24px);
    border-radius: 22px;
  }

  .connectivity-error-screen__icon {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
  }

  .connectivity-error-screen__icon svg {
    width: 34px;
    height: 34px;
  }

  .connectivity-error-screen p {
    margin-top: 24px;
  }
}

#avatar-modal .avatar-modal-card {
  width: min(500px, calc(100vw - 24px));
  max-width: none;
  padding: 14px;
}

#avatar-modal .avatar-modal-card .modal-body {
  display: block;
  overflow-y: auto;
}

#avatar-modal .avatar-modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

#avatar-modal .avatar-picker-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

#avatar-modal .avatar-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  grid-auto-flow: row;
  align-items: stretch;
  gap: 8px;
  max-height: min(55vh, 380px);
  overflow: auto;
  padding-right: 2px;
  width: 100%;
}

#avatar-modal .avatar-modal-grid > * {
  min-width: 0;
}

#avatar-modal .avatar-option {
  display: block;
  width: 100%;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

#avatar-modal .avatar-option:hover {
  border-color: #111;
}

#avatar-modal .avatar-option img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: var(--avatar-bg, #ffffff);
}

#avatar-modal .avatar-option.selected {
  border-color: #111;
  box-shadow: none;
}

#avatar-modal .avatar-palette {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-top: 0;
  width: 100%;
}

#avatar-modal .avatar-palette-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}

#avatar-modal .avatar-palette-dot.selected {
  border-color: #111;
  box-shadow: none;
}

#avatar-modal .avatar-modal-actions {
  display: flex;
  justify-content: center;
}

@media (max-width: 720px) {
  #avatar-modal .avatar-palette {
    gap: 8px;
  }

  #avatar-modal .avatar-modal-grid {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }
}

.input-error {
  border-color: red !important;
}

.input-disabled {
  background: #f2f2f2;
  color: #777;
}

.dropzone {
  border: 2px dashed #bbb;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  background: #fafafa;
  transition:
    background 0.15s ease,
    opacity 0.15s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.file-preview {
  margin-top: 10px;
  display: flex;
  width: 100%;
  max-width: 100%;
  max-height: 240px;
  justify-content: center;
  align-items: center;
}

.file-preview img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.reporte-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}

.reporte-form .form-label {
  margin-bottom: 4px;
}

.checkout-total {
  margin-top: 10px;
  font-weight: 700;
  background: #eef2f6;
  border-radius: 10px;
  padding: 10px 12px;
}

.checkout-main-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  overflow-x: hidden;
}

.checkout-metodo-menu,
.checkout-main-content {
  will-change: transform, opacity;
}

.checkout-panel-animating {
  animation-duration: 260ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
  pointer-events: none;
}

.checkout-panel-enter-right {
  animation-name: checkoutPanelEnterRight;
}

.checkout-panel-enter-left {
  animation-name: checkoutPanelEnterLeft;
}

.checkout-panel-exit-left {
  animation-name: checkoutPanelExitLeft;
}

.checkout-panel-exit-right {
  animation-name: checkoutPanelExitRight;
}

@keyframes checkoutPanelEnterRight {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes checkoutPanelEnterLeft {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes checkoutPanelExitLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-26px);
  }
}

@keyframes checkoutPanelExitRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(26px);
  }
}

.checkout-main-content > * {
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.checkout-main-content .checkout-total,
.checkout-main-content .metodo-detalle,
.checkout-main-content .dropzone,
.checkout-main-content #input-ref,
.checkout-main-content .form-input,
.checkout-main-content .form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.checkout-change-metodo {
  width: 100%;
}

#btn-back-metodo {
  border: none;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

#btn-back-metodo:hover {
  background: transparent;
  color: #6b7280;
}

#btn-back-metodo .checkout-back-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.55);
}

.checkout-metodo-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.checkout-metodo-menu-label {
  margin: 0;
  font-weight: 700;
  color: #1f2937;
}

.checkout-metodo-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.checkout-metodo-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-metodo-section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
}

.checkout-metodo-section.is-auto .checkout-metodo-section-title {
  color: #f97316;
}

.checkout-metodo-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  justify-items: center;
}

.checkout-metodo-continue {
  width: 100%;
}

.checkout-metodo-btn {
  border: 2px solid #d1d5db;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  padding: 2px;
  box-sizing: border-box;
  width: 148px;
  min-width: 148px;
  height: 62px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.checkout-metodo-btn:hover {
  border-color: #14b8a6;
  transform: translateY(-1px);
  opacity: 0.95;
}

.checkout-metodo-btn.is-active {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(29, 78, 216, 0.15);
}

.checkout-metodo-btn:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 12px;
}

.checkout-metodo-btn-image {
  display: block;
  width: 140px;
  max-width: 140px;
  height: 54px;
  max-height: 54px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.15s ease;
}

.checkout-metodo-btn.is-active .checkout-metodo-btn-image {
  transform: none;
}

.checkout-metodo-btn-image-fallback {
  display: block;
  width: 140px;
  max-width: 140px;
  height: 54px;
  border: none;
  border-radius: 12px;
  background: #f3f4f6;
}

@media (max-width: 620px) {
  .checkout-metodo-section-grid {
    grid-template-columns: 1fr;
  }
}

.checkout-metodo-btn-name {
  display: block;
  font-size: 0.98rem;
}

.checkout-metodo-btn-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
}

.checkout-metodo-empty {
  margin: 0;
  color: #6b7280;
  font-weight: 600;
}

body.checkout-page .metodo-detalle,
body.checkout-page .checkout-total {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

body.checkout-page .checkout-total {
  width: 100%;
  max-width: 350px;
}

.checkout-countdown {
  margin-top: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: #444;
}

.saldo-display {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.saldo-subtitle {
  font-size: 1rem;
  color: #555;
}

.saldo-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0 16px 16px;
  margin: 0 auto 20px;
  text-align: left;
}

.saldo-page #saldo-input {
  font-size: 26px;
  padding: 14px 16px 14px 36px;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  box-shadow: none;
  text-align: center;
  font-weight: 800;
  color: #1f2937 !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.saldo-page #saldo-input::placeholder {
  color: #cbd5f5 !important;
  opacity: 1;
}

.saldo-page #saldo-input::-webkit-input-placeholder {
  color: #cbd5f5 !important;
  opacity: 1;
}

.saldo-page #saldo-input::-moz-placeholder {
  color: #cbd5f5 !important;
  opacity: 1;
}

.saldo-page #saldo-input:-ms-input-placeholder {
  color: #cbd5f5 !important;
  opacity: 1;
}

.saldo-page #saldo-input::-ms-input-placeholder {
  color: #cbd5f5 !important;
  opacity: 1;
}

.saldo-page #saldo-input.saldo-zero {
  color: #cbd5f5 !important;
}

.saldo-page #saldo-input:focus::placeholder {
  color: transparent !important;
}

.saldo-page #saldo-input:focus::-webkit-input-placeholder {
  color: transparent !important;
}

.saldo-page #saldo-input:focus::-moz-placeholder {
  color: transparent !important;
}

.saldo-page #saldo-input:focus:-ms-input-placeholder {
  color: transparent !important;
}

.saldo-page #saldo-input:focus::-ms-input-placeholder {
  color: transparent !important;
}

.saldo-page #saldo-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Quitar flechas del input numérico */
.saldo-page #saldo-input::-webkit-outer-spin-button,
.saldo-page #saldo-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.saldo-page #saldo-input[type="number"] {
  -moz-appearance: textfield;
}

.saldo-input-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.saldo-page .saldo-input-wrap {
  max-width: 280px;
}

.saldo-currency {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 700;
  color: #6b7280;
  pointer-events: none;
}

.saldo-page .saldo-form {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  align-items: center;
}

.saldo-page .saldo-form .btn-primary {
  align-self: center;
}

.saldo-page.categorias-dinamicas {
  margin: 0 auto 20px;
  padding: 0 16px 16px;
}

@media (max-width: 700px) {
  .saldo-page .saldo-form {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .saldo-input-wrap {
    max-width: 100%;
    margin: 0 auto;
  }

  .saldo-page #saldo-input {
    width: 100%;
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }
}

.dropzone.dragover {
  background: rgba(0, 0, 0, 0.1);
}

.dropzone.dropzone-disabled {
  background: #f2f2f2;
  border-color: #ddd;
  color: #777;
  pointer-events: none;
  opacity: 0.8;
}

.checkbox-line input {
  margin-right: 8px;
}

.metodos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.metodo-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #f7f7f7;
  cursor: pointer;
  font-weight: 700;
}

.metodo-btn.selected {
  border-color: #111;
  background: #e7e7e7;
}

.metodo-detalle {
  background: #eef2f6;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
  width: 350px;
}

.metodo-detalle p {
  margin: 4px 0;
}

.metodo-detalle-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 0 10px;
}

.metodo-detalle-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.inventario-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f6f7f9;
  padding: 12px;
}

.inventario-item {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.inventario-btn {
  width: 100%;
  text-align: left;
  font-weight: 700;
}

.inventario-plan {
  margin-top: 8px;
}

.inventario-plan-btn {
  width: 100%;
  text-align: left;
}

.btn-outline,
.btn-primary {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.btn-small {
  width: auto;
  padding: 8px 12px;
  font-size: 13px;
}

.actions-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-outline {
  background: #f7f7f7;
  border: 1px solid #ddd;
  color: #111;
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-outline:hover {
  background: #eee;
}

.reportes-table {
  margin-top: 10px;
}

.reportes-table:not(.table-base) {
  width: 100%;
  border-collapse: collapse;
}

.reportes-table:not(.table-base) th,
.reportes-table:not(.table-base) td {
  padding: 10px;
  border: 1px solid #e5e5e5;
  font-size: 13px;
}

.reportes-table:not(.table-base) th {
  background: #f8f8f8;
  text-align: left;
}

.modal-body-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
}

.modal-info p {
  margin: 6px 0;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
}

.modal-info-grid .label {
  font-weight: 700;
}

.modal-info-grid .value {
  word-break: break-word;
}

.input-inline {
  width: 100%;
  max-width: 240px;
  padding: 8px 10px;
}

.modal-actions-column {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

/* Quitar flechas de inputs numéricos */
input[type="number"].input-inline::-webkit-outer-spin-button,
input[type="number"].input-inline::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"].input-inline {
  -moz-appearance: textfield;
}

.plat-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}
.modal-evidencia {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
}

.modal-evidencia img {
  max-width: 260px;
  max-height: 200px;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #eee;
}

.resumen-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.resumen-row .label {
  font-weight: 700;
}

.resumen-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resumen-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resumen-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.resumen-checks label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-primary:hover {
  background: #333;
}

.admin-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin: 16px 0;
  align-items: center;
  flex-wrap: wrap;
}

.admin-group {
  background: #e9e9e9;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #dcdcdc;
  width: 100%;
  max-width: 900px;
}

.admin-action {
  width: 200px;
  align-self: center;
  margin: 0;
}
.admin-actions.single {
  justify-content: center;
}
.admin-action-full {
  width: 100%;
  max-width: 480px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0 20px;
}
.admin-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.admin-card.reportes {
  background: #ff8b89;
  border-color: #ff8b89;
  color: #8f1e1c;
}
.admin-card.cortes {
  background: #ffba8f;
  border-color: #ffba8f;
  color: #8a451a;
}
.admin-card.pedidos {
  background: #93cfa2;
  border-color: #93cfa2;
  color: #205a2f;
}
.admin-card.tareas {
  background: #bcd7ff;
  border-color: #bcd7ff;
  color: #1e3a8a;
}
.admin-card .card-title {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
}
.admin-card .card-count {
  font-size: 26px;
  font-weight: 800;
  margin: 4px 0;
}
.admin-card .card-desc {
  margin: 4px 0 0;
  color: inherit;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  padding: 20px;
  max-width: 720px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3001;
}

.modal-card-resumen {
  max-width: 520px;
  width: 95%;
}

.modal-card-sol {
  max-width: 520px;
  width: 95%;
}

.modal-card-renovar {
  max-width: 300px;
  width: 90%;
}

.modal-card-login-required {
  max-width: 420px;
  width: 92%;
}

#login-required-modal .login-required-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-top: 24px;
}

#login-required-modal .login-required-message {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

#login-required-modal .login-required-message a {
  color: #0d99ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#login-required-modal #login-required-btn {
  width: 100%;
  max-width: 240px;
}

.birthdate-modal-card {
  max-width: 420px;
  width: 92%;
}

#birthdate-modal .birthdate-modal-card,
#birthdate-modal .birthdate-modal-card * {
  box-sizing: border-box;
}

#birthdate-modal .birthdate-modal-topbar {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.birthdate-modal-close {
  position: static;
  flex: 0 0 auto;
}

.birthdate-modal-title,
.birthdate-modal-text {
  margin: 0;
}

.birthdate-modal-text {
  color: #4b5563;
  line-height: 1.45;
}

#birthdate-modal #birthdate-input,
#birthdate-save-btn {
  width: 100%;
  max-width: 100%;
}

.modal-renovar-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-close {
  position: absolute;
  top: 4px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: #eef2f6;
}

.modal-body {
  gap: 16px;
  align-items: center;
  overflow-y: auto;
}

#platform-modal .modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

#birthdate-modal .birthdate-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  padding-top: 20px;
}

/* Asegura que el contenido del modal se ajuste al ancho del modal */
#platform-modal * {
  box-sizing: border-box;
}

#platform-modal .modal-body,
#platform-modal .modal-media,
#platform-modal .modal-media-wrap,
#platform-modal .modal-top,
#platform-modal .modal-banner-meta,
#platform-modal .modal-bottom,
#platform-modal .modal-info,
#platform-modal .modal-scroll {
  width: 100%;
  max-width: 100%;
}

#platform-modal .modal-scroll-hint {
  display: none;
}

.modal-plan-hint {
  display: block;
  margin: 6px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #f29aa0;
  text-transform: none;
}

.modal-title-mobile {
  display: none;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  text-align: left;
}

#platform-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
  padding-top: 36px;
}

#platform-modal .modal-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#platform-modal .modal-info {
  display: flex;
  flex-direction: column;
}

#platform-modal .modal-media-wrap {
  align-self: start;
}

#platform-modal .modal-info {
  align-self: start;
}

#platform-modal .modal-media-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-mobile-header {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  margin: 0 0 2px;
}

#platform-modal .modal-banner-meta {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  margin-top: 0;
  padding: 0;
}

#platform-modal .modal-banner-meta .modal-badge {
  width: 100%;
  display: block;
  text-align: center;
  margin: 0;
}

#platform-modal .modal-banner-meta h3 {
  margin: 0;
}

.modal-name-mobile {
  display: none;
  margin: 0;
}

.modal-category-mobile {
  display: none;
  margin: 0;
}

#platform-modal .modal-bottom {
  background: #eef2f6;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #1f2933;
  align-items: center;
}

#platform-modal .modal-bottom .modal-qty-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 400px;
  gap: 6px;
  align-items: stretch;
}

#platform-modal .modal-bottom .modal-qty-group.is-single {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

#platform-modal .modal-bottom .modal-qty-group.is-single .modal-qty {
  width: min(100%, 220px);
}

#platform-modal .modal-bottom .modal-qty {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  gap: 8px;
  border-color: #cbd5e1;
  color: #1f2933;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

#platform-modal .modal-bottom .modal-total,
#platform-modal .modal-bottom #add-cart {
  width: 100%;
  max-width: 320px;
}

#platform-modal .modal-bottom .modal-qty-head {
  width: 100%;
  min-height: 24px;
  justify-content: center;
  gap: 6px;
}

#platform-modal .modal-bottom .modal-qty-title {
  width: 100%;
  text-align: center;
}

#platform-modal .modal-bottom .modal-qty-row {
  width: 100%;
  justify-content: center;
}

#platform-modal .modal-bottom .modal-qty > .discount-badge {
  width: 64px;
  margin-top: 4px;
  margin-left: 0;
}

#platform-modal .modal-bottom .modal-qty-title,
#platform-modal .modal-bottom .modal-duration-suffix {
  color: #4b5563;
}

#platform-modal .modal-bottom .modal-qty button {
  background: #3c3e44;
  color: #fff;
}

#platform-modal .modal-bottom .modal-qty button:hover {
  background: #4b4e56;
}

#platform-modal .modal-bottom .modal-qty button:active {
  background: #2f3238;
}

#platform-modal .modal-bottom .modal-qty button:disabled,
#platform-modal .modal-bottom .modal-qty button:disabled:hover,
#platform-modal .modal-bottom .modal-qty button:disabled:active {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

#platform-modal .modal-bottom .modal-total {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

#platform-modal .modal-bottom #add-cart {
  margin-top: 4px;
  margin-left: auto;
  margin-right: auto;
  background: #1f2933;
  color: #f8fafc;
}

#platform-modal .modal-bottom #add-cart.btn-disabled-soft,
#platform-modal .modal-bottom #add-cart:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

#platform-modal .modal-bottom #add-cart:hover {
  background: #111827;
}

#platform-modal .modal-bottom #add-cart.btn-disabled-soft:hover,
#platform-modal .modal-bottom #add-cart:disabled:hover {
  background: #d1d5db;
}

/* Mueve el scrollbar al borde del modal (evita scrollbar interno en modal-body) */
#platform-modal .modal-card {
  overflow: hidden;
  scrollbar-gutter: stable;
}

#platform-modal .modal-scroll {
  overflow-y: auto;
  padding-right: 12px;
  margin-right: -12px;
}

/* For single-column layout in renovar row modal */
#modal-renovar-row .modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}
#modal-renovar-row .modal-footer {
  padding-left: 0;
}
#modal-renovar-row .modal-card {
  width: auto;
  max-width: 520px;
  align-items: flex-start;
}

/* For single-column layout in renovar modal */
#modal-renovar .modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

#modal-renovar .modal-card {
  width: auto;
  max-width: 520px;
}

/* Resumen de cambios: forzar layout vertical */
.modal-body.resumen-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.modal-media {
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  flex: 1;
}

.modal-info h3 {
  margin: 0 0 6px;
}

.modal-category {
  margin: 0 0 12px;
  color: #666;
}

.modal-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 700;
  margin: 4px 0;
}

.modal-badge-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-badge-label {
  display: inline-block;
}

.modal-badge-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.modal-badge-help-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid currentColor;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.modal-badge-help-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  transform: none;
  width: min(300px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  background: #50555f;
  color: #f9fafb;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  display: none;
  z-index: 2147483647;
}

.modal-badge-help-tooltip.is-visible {
  display: block;
}

.modal-badge-mobile {
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.1;
}

.badge-green {
  background: #d6f5d8;
  color: #1b7a1f;
  border: 1px solid #9adba0;
}

.badge-warning {
  background: #ffd9b8;
  color: #9a4f12;
  border: 1px solid #f0b989;
}

.badge-gray {
  background: #f0f0f0;
  color: #555;
  border: 1px solid #d6d6d6;
}

@media (max-width: 640px) {
  /* Botón del modal en mobile: ancho completo al final */
  #platform-modal .modal-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  #platform-modal #add-cart {
    width: 100%;
    align-self: stretch;
    margin-top: 6px;
  }

  .plan-price-line {
    margin-top: 0;
  }
}

.modal-precios {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.plan-bloque {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#platform-modal .plan-bloque {
  background: #eef2f6;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.plan-titulo {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  position: relative;
  color: #636f87;
  line-height: 1.1;
}

.plan-name {
  display: inline-flex;
  align-items: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
}
.plan-name-only {
  font-size: 14px;
}
.plan-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
  color: #4b4e58;
  font-size: 15px;
}
.plan-kind-label {
  color: inherit;
  font-size: inherit;
  font-weight: 700;
}
.plan-badges .plan-encargo-tag {
  margin-left: 0;
}
.plan-encargo-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}
.plan-correo-personal-tag {
  border-color: #6d28d9;
  background: #7c3aed;
  color: #fff;
}
.plan-titulo .stock-line {
  font-weight: 400;
  color: #9ca3af;
  display: block;
  margin-top: 2px;
}
.plan-titulo .stock-subtitle {
  font-weight: 700;
}

.plan-price-line {
  font-weight: 600;
  font-size: 20px;
  margin-top: 0;
  display: block;
  color: #303238;
  line-height: 1.1;
}

#platform-modal .plan-bloque.selected {
  background: #3c3e44;
  color: #fff;
}

#platform-modal .plan-bloque.selected .plan-titulo,
#platform-modal .plan-bloque.selected .stock-line,
#platform-modal .plan-bloque.selected .plan-price-line,
#platform-modal .plan-bloque.selected .plan-name {
  color: #fff;
}
#platform-modal .plan-bloque.selected .plan-kind-label {
  color: #fff;
}
#platform-modal .plan-bloque.selected .plan-badges {
  color: #fff;
}
#platform-modal .plan-bloque.selected .plan-encargo-tag {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
#platform-modal .plan-bloque.selected .plan-correo-personal-tag {
  border-color: #a78bfa;
  background: #7c3aed;
  color: #fff;
}

.plan-info-wrap {
  position: static;
  display: inline-flex;
  align-items: center;
}

.plan-info-icon {
  display: inline-flex;
  margin-left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #d1d5db;
  color: #2f343a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.plan-info-icon:hover {
  background: #d1d5db;
}

.plan-bloque {
  position: relative;
}

.plan-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  transform: none;
  width: min(300px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 20px);
  box-sizing: border-box;
  background: #50555f;
  color: #f9fafb;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  display: none;
  z-index: 2147483647;
}

.plan-tooltip.is-visible {
  display: block;
}

.plan-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.precio-region {
  margin: 0;
  font-size: 13px;
  color: #555;
  width: 100%;
}

.precio-opcion {
  padding: 8px 10px;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  background: #2f2f2f;
  color: #f8fafc;
  cursor: pointer;
  font-weight: 700;
}

.precio-opcion.selected {
  border-color: #3c3c3c;
  background: #656565;
  color: #fff;
}

.precio-opcion:active {
  background: #656565;
  border-color: #3c3c3c;
  color: #fff;
}

.precio-opcion.selected:active {
  background: #656565;
  border-color: #3c3c3c;
  color: #fff;
}

.modal-qty {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  gap: 6px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 6px 10px;
}

.modal-qty-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-qty-head {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 24px;
  gap: 8px;
}

.modal-qty.modal-qty-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.modal-qty-title,
.modal-duration-label,
.modal-duration-suffix {
  font-weight: 700;
  font-size: 14px;
}

.modal-qty-title {
  width: 100%;
  text-align: center;
}

.modal-qty.hidden {
  display: none;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1b7a1f;
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  width: 90px;
  box-sizing: border-box;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  margin-left: auto;
}

.discount-badge.is-zero {
  background: #9ca3af;
  color: #111827;
}

.flying-price {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.flying-cart-chip {
  position: fixed;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 10020;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(17, 24, 39, 0.82);
  overflow: hidden;
}

.flying-cart-chip__thumb,
.flying-cart-chip__thumb img {
  width: 100%;
  height: 100%;
  display: block;
}

.flying-cart-chip__thumb img {
  object-fit: cover;
}

.flying-cart-chip__dot {
  width: 100%;
  height: 100%;
  display: block;
  background: radial-gradient(
    circle at 32% 28%,
    #ffffff,
    #5b5f6a 72%,
    #2b2f3a 100%
  );
}

.flying-cart-chip__qty {
  position: absolute;
  right: -3px;
  bottom: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  color: #111827;
  text-align: center;
  background: #fbbf24;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.carrito.cart-pop {
  animation: cart-pop-bounce 0.4s ease-out;
  transform-origin: 50% 50%;
}

@keyframes cart-pop-bounce {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.26);
  }
  70% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}

.modal-qty button {
  width: 28px;
  height: 28px;
  border: none;
  background: #111;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.modal-qty button:hover {
  background: #2f2f2f;
}

.modal-qty button:active {
  background: #4b5563;
}

.modal-qty span {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
}

.modal-qty .modal-qty-input {
  width: 54px;
  min-width: 54px;
  height: 28px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: #111827;
  background: #fff;
}

.modal-qty .modal-qty-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.modal-qty .modal-qty-input::-webkit-outer-spin-button,
.modal-qty .modal-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-qty .modal-qty-input[type="number"] {
  -moz-appearance: textfield;
}

.modal-qty-head .discount-badge {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  margin-left: 0;
  z-index: 1;
}

.modal-total {
  margin: 4px 0 6px;
  font-weight: 700;
  font-size: 14px;
  color: #111;
}

/* Próximas a vencer */
.proximas-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.proximas-header {
  font-weight: 600;
  margin-bottom: 8px;
}

.proximas-bloque + .proximas-bloque {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.proximas-title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.proximas-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 720px;
}

.proximas-table td {
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  word-break: break-word;
}
.proximas-table th {
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  text-align: left;
  word-break: break-word;
}

/* Ancho por defecto (modal proximas en inventario) */
.proximas-table td:nth-child(1),
.proximas-table th:nth-child(1) {
  width: 70px;
}
.proximas-table td:nth-child(2),
.proximas-table th:nth-child(2) {
  width: 200px;
}
.proximas-table td:nth-child(3),
.proximas-table th:nth-child(3) {
  width: 20px;
}

/* Anchos específicos para el panel de resultados en renovar_cliente */
#buscador-resultado {
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  padding: 8px 10px;
  box-sizing: border-box;
}
#buscador-resultado .proximas-table {
  margin: 0;
  table-layout: auto;
  min-width: 640px;
}
#buscador-resultado .proximas-table th,
#buscador-resultado .proximas-table td {
  padding: 6px 6px;
  font-size: 13px;
}
#buscador-resultado .proximas-table td:nth-child(1),
#buscador-resultado .proximas-table th:nth-child(1) {
  min-width: 52px;
}
#buscador-resultado .proximas-table td:nth-child(2),
#buscador-resultado .proximas-table th:nth-child(2) {
  min-width: 110px;
}
#buscador-resultado .proximas-table td:nth-child(3),
#buscador-resultado .proximas-table th:nth-child(3) {
  min-width: 160px;
}
#buscador-resultado .proximas-table td:nth-child(4),
#buscador-resultado .proximas-table th:nth-child(4) {
  min-width: 120px;
}
#buscador-resultado .proximas-table td:nth-child(5),
#buscador-resultado .proximas-table th:nth-child(5) {
  min-width: 120px;
}

.modal-card-proximas {
  max-width: 720px;
  width: 95%;
}

.tabla-wrapper,
.table-base-wrap,
.table-scroll-x {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-base {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
}

.table-base th,
.table-base td {
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding: 3px 10px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  height: 30px;
  white-space: nowrap;
  overflow: hidden;
}
.table-base th {
  background: var(--table-header-bg, #2c2f36);
  color: #fff;
  padding: 5px 10px;
  font-size: 17px;
  font-weight: 800;
}
.table-base thead th,
.table-base thead th * {
  color: #fff !important;
}
.table-base tbody tr:nth-child(odd) {
  background: #eef1f5;
}
.table-base tbody tr:nth-child(even) {
  background: #ffffff;
}

.table-base td[style*="display:flex"] {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.table-base td .btn-outline,
.table-base td .btn-primary,
.table-base td .btn-delete,
.table-base td .btn-copy,
.table-base td .btn-delete-venta {
  max-width: 100%;
}

@media (max-width: 1024px) {
  :where(div, section, article):has(> table.table-base) {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.table-base {
    min-width: max-content;
  }
}

.copyable,
[data-clipboard] {
  cursor: pointer;
}

.copy-toast {
  position: fixed;
  top: 80px;
  right: 18px;
  background: #000;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 2000;
  pointer-events: none;
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Contenedor de tablas (datos de cuentas) */
.cuenta-table-wrap {
  overflow-x: auto;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}

.modal-card-renovar-sel {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-renovar-sel-body {
  display: block;
}

#modal-renovar-sel .proximas-table {
  width: 100%;
  table-layout: fixed;
}

.modal-proximas-body {
  display: block;
  width: 100%;
}

.modal-proximas-title {
  margin-top: 0;
}

.proximas-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proximas-table-wrap {
  flex: 1;
  overflow-x: auto;
}

.proximas-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proximas-footnote {
  margin: 0;
  font-size: 13px;
  color: #555;
}

.buscador-actions {
  margin-top: 10px;
}

.input-disabled {
  background: #f1f1f1;
  color: #888;
}

.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-add {
  display: inline-block;
  padding: 10px 16px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.btn-add:hover {
  background: #333;
}

.btn-add.btn-disabled-soft,
.btn-add:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;
}

/* CATEGORÍAS */
.categorias-dinamicas {
  margin: 0 20px 20px;
  padding-top: 12px;
}

.categoria-card {
  margin-top: 20px;
}

.categorias-dinamicas > .categoria-card:first-child {
  margin-top: 0;
}

.testing-toggle-wrap {
  display: flex;
  justify-content: flex-start;
  padding: 0 20px 10px;
}

.missing-data-wrap {
  display: flex;
  justify-content: center;
  padding: 0 20px 12px;
}

.push-permission-wrap {
  display: flex;
  justify-content: center;
  padding: 0 20px 12px;
}

.push-permission-wrap.hidden {
  display: none;
}

#whatsapp-qr-warning-wrap {
  width: min(100%, 340px);
  margin: 0 auto 16px;
  padding: 14px;
  text-align: center;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

#whatsapp-qr-warning-wrap.hidden {
  display: none;
}

.whatsapp-qr-warning-box {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.whatsapp-qr-warning-box canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.whatsapp-session-status-wrap {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 10px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.whatsapp-session-status-wrap strong {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

.whatsapp-session-status-message {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.whatsapp-session-status-message.is-error {
  color: #b91c1c;
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff5f5 0%, #fff1f2 100%);
}

.whatsapp-session-status-detail {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.whatsapp-reconnect-btn {
  align-self: center;
  min-width: 180px;
}

.whatsapp-hetzner-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 20px 12px;
}

.whatsapp-hetzner-toggle-wrap.hidden {
  display: none;
}

.whatsapp-hetzner-toggle {
  width: min(100%, 720px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.whatsapp-hetzner-toggle-label {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.whatsapp-hetzner-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.whatsapp-hetzner-toggle-slider {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.2s ease;
  flex: 0 0 auto;
}

.whatsapp-hetzner-toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.whatsapp-hetzner-toggle input:checked + .whatsapp-hetzner-toggle-slider {
  background: #22c55e;
}

.whatsapp-hetzner-toggle
  input:checked
  + .whatsapp-hetzner-toggle-slider::after {
  transform: translateX(20px);
}

.whatsapp-hetzner-toggle input:disabled + .whatsapp-hetzner-toggle-slider {
  opacity: 0.65;
}

.whatsapp-hetzner-toggle-status {
  width: min(100%, 720px);
  margin: 0 auto;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
}

.whatsapp-hetzner-activate-btn {
  min-width: 180px;
}

.whatsapp-hetzner-activate-btn.hidden {
  display: none;
}

.client-view-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 20px 16px;
}

.client-view-toggle-wrap.hidden {
  display: none;
}

.client-view-toggle {
  width: min(100%, 720px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.client-view-toggle-label {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.client-view-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.client-view-toggle-slider {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.2s ease;
  flex: 0 0 auto;
}

.client-view-toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.client-view-toggle input:checked + .client-view-toggle-slider {
  background: #22c55e;
}

.client-view-toggle input:checked + .client-view-toggle-slider::after {
  transform: translateX(20px);
}

.client-view-toggle input:disabled + .client-view-toggle-slider {
  opacity: 0.65;
}

.client-view-toggle-status {
  width: min(100%, 720px);
  margin: 0 auto;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
}

.whatsapp-toggle-confirm-card {
  max-width: 430px;
}

.whatsapp-toggle-confirm-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.whatsapp-toggle-confirm-message {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.whatsapp-toggle-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.push-permission-card {
  width: min(100%, 720px);
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.push-permission-message {
  margin: 0;
  color: #1d4ed8;
  font-weight: 600;
  text-align: center;
}

.push-permission-message.is-error {
  color: #b91c1c;
}

.push-permission-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-banners {
  margin: -1px 0 8px;
}

body.home-page {
  padding-top: 0;
}

body.home-page .header,
body.home-page .header:hover {
  background: rgba(15, 23, 42, 0.2);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: none;
}

body.home-page .home-category-nav {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0.04) 48%,
      rgba(0, 0, 0, 0.18)
    ),
    rgba(25, 8, 42, 0.68);
  -webkit-backdrop-filter: blur(8px) saturate(135%);
  backdrop-filter: blur(8px) saturate(135%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.home-page .header {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

body.home-page .header.liquid-gl-active,
body.home-page .home-category-nav.liquid-gl-active {
  background: rgba(15, 23, 42, 0.2);
}

body.home-page .header {
  isolation: isolate;
}

body.home-page .home-category-nav {
  isolation: isolate;
}

body.home-page .liquid-gl-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.home-page .header > :not(.liquid-gl-surface) {
  position: relative;
  z-index: 1;
}

body.home-page .home-category-nav > :not(.liquid-gl-surface) {
  position: relative;
  z-index: 1;
}

body.home-page .liquid-gl-surface-active {
  background: transparent;
}

body.home-page .header > .liquid-gl-surface {
  display: none;
}

body.home-page .header .btn-outline,
body.home-page .header .mobile-search-header-btn,
body.home-page .header-cart-action,
body.home-page .home-category-trigger,
body.home-page .home-category-platform-link {
  box-sizing: border-box;
  overflow: visible;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    filter 0.18s ease;
}

body.home-page .header #btn-admin-header,
body.home-page .header #btn-ordenes-header {
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset;
  -webkit-backdrop-filter: blur(4px) saturate(130%);
  backdrop-filter: blur(4px) saturate(130%);
}

body.home-page .header #btn-admin-header:hover,
body.home-page .header #btn-admin-header:focus-visible,
body.home-page .header #btn-ordenes-header:hover,
body.home-page .header #btn-ordenes-header:focus-visible {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transform: none;
  filter: brightness(1.08);
  outline: none;
}

body.home-page .header .user-menu:hover,
body.home-page .header .user-menu:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  filter: brightness(1.08);
  transform: none;
}

body.home-page .header .btn-outline:hover,
body.home-page .header .btn-outline:focus-visible,
body.home-page .home-category-trigger:hover,
body.home-page .home-category-trigger:focus-visible,
body.home-page .home-category-platform-link:hover,
body.home-page .home-category-platform-link:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transform: none;
  filter: brightness(1.08);
  outline: none;
}

body.home-page .header-cart-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-area: cart;
  justify-self: end;
  padding: 0;
  border-radius: 50%;
}

body.home-page .header-cart-action::before,
body.home-page .header .mobile-search-header-btn::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  pointer-events: none;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
}

body.home-page .header-cart-action:hover::before,
body.home-page .header-cart-action:focus-visible::before,
body.home-page .header .mobile-search-header-btn:hover::before,
body.home-page .header .mobile-search-header-btn:focus-visible::before {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  filter: brightness(1.08);
}

body.home-page .header .mobile-search-header-btn {
  position: relative;
  z-index: 0;
}

body.home-page .header .mobile-search-header-btn > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 700px) {
  body.home-page .header.mobile-search-open .mobile-search-header-btn {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    z-index: 2002;
    transform: none;
  }

  body.home-page .header.mobile-search-open .search-box {
    right: auto;
    left: auto;
    z-index: 2001;
  }
}

body.home-page .header-cart-action .carrito {
  position: relative;
  z-index: 1;
}

body.home-page .home-category-platform-link:hover,
body.home-page .home-category-platform-link:focus-visible {
  color: #0f172a;
}

body.home-page .home-category-nav {
  position: fixed;
  top: var(--header-height, 64px);
  left: 0;
  right: 0;
  z-index: 1999;
  box-sizing: border-box;
  transform: translateY(0);
  will-change: transform;
}

body.home-page .home-banners {
  margin: 0 0 8px;
}

body.home-page .home-banner-release-badge {
  top: calc(var(--site-headers-background-height) + 12px);
}

.home-category-nav {
  position: relative;
  z-index: 20;
  padding: 8px 14px;
  background-color: var(--site-header-background);
  background-image: var(--site-headers-background);
  background-repeat: no-repeat;
  background-size: 100% var(--site-headers-background-height);
  background-position: top center;
  background-attachment: fixed;
  transition: background-color 0.35s ease;
}

body.home-page .home-category-nav {
  background: rgba(15, 23, 42, 0.2);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 0;
  box-shadow: none;
}

body.home-page.home-headers-solid .header,
body.home-page.home-headers-solid .header:hover,
body.home-page.home-headers-solid .home-category-nav {
  background: #0f172a;
}

body.home-page .home-category-nav > .liquid-gl-surface {
  display: none;
}

.home-category-nav.hidden {
  display: none;
}

.home-category-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.home-category-group {
  position: relative;
  flex: 0 0 auto;
  transition: width 0.26s ease;
}

.home-category-group.is-row-shifting {
  transition: transform 0.26s ease;
}

@keyframes home-category-menu-expand {
  from {
    opacity: 0.55;
    transform: scale(
      var(--home-category-menu-start-scale-x, 0.5),
      var(--home-category-menu-start-scale-y, 0.25)
    );
  }

  to {
    opacity: 1;
    transform: scale(1, 1);
  }
}

.home-category-trigger,
.home-category-platform-link {
  font: inherit;
}

.home-category-trigger {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    opacity 0.16s ease,
    transform 0.22s ease;
}

.home-category-trigger::after {
  content: "▾";
  margin-left: 6px;
  font-size: 11px;
}

.home-category-group.is-open > .home-category-trigger {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

.home-category-group.is-open > .home-category-platforms {
  top: var(--home-category-menu-top, 0px);
  left: var(--home-category-menu-left, 0px);
}

.home-category-group.is-open {
  position: static;
}

.home-category-platforms.is-entering,
.home-category-mobile-dropdown.is-entering {
  transform-origin: top center;
  animation: home-category-menu-expand 0.26s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .home-category-platforms.is-entering,
  .home-category-mobile-dropdown.is-entering {
    animation: none;
  }

  .home-category-group,
  .home-category-group > .home-category-trigger,
  .home-category-group.is-row-shifting {
    transition: none;
  }
}

.home-category-group:hover .home-category-trigger,
.home-category-group:focus-within .home-category-trigger,
.home-category-group.is-open .home-category-trigger {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  filter: brightness(1.08);
}

.home-category-platforms {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  box-sizing: border-box;
  min-width: 190px;
  max-width: min(300px, calc(100vw - 28px));
  max-height: min(360px, calc(100vh - 150px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  z-index: 30;
}

.home-category-group:hover .home-category-platforms,
.home-category-group:focus-within .home-category-platforms,
.home-category-group.is-open .home-category-platforms {
  display: grid;
  gap: 2px;
}

.home-category-platform-link {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.home-category-menu-title {
  margin: 0 2px 2px;
  padding: 8px 10px 9px;
  border-bottom: 1px solid rgba(215, 215, 215, 0.24);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.home-category-platform-link:hover,
.home-category-platform-link:focus-visible {
  background: #eef2f6;
  outline: none;
}

body.home-page .home-category-platforms .home-category-platform-link:hover,
body.home-page .home-category-platforms .home-category-platform-link:focus-visible,
body.home-page .home-category-platforms .home-category-platform-link:active,
body.home-page .home-category-mobile-dropdown .home-category-platform-link:hover,
body.home-page .home-category-mobile-dropdown .home-category-platform-link:focus-visible,
body.home-page .home-category-mobile-dropdown .home-category-platform-link:active {
  background: rgba(255, 255, 255, 0.22);
  border-color: transparent;
  box-shadow: none;
  filter: none;
  outline: none;
}

.popular-recent {
  margin: 28px 0 12px;
  padding: 0 14px;
}

.popular-recent::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 14px;
  background: #cbd5e1;
}

.popular-recent.hidden {
  display: none;
}

.popular-recent-head {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 0 2px;
}

.popular-recent-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: #111827;
}

.popular-recent-title-accent {
  color: inherit;
}

.reseller-prices {
  margin: 24px 14px 18px;
  padding: 24px 44px;
  border-radius: 22px;
  background: linear-gradient(135deg, #16a085 0%, #075e54 100%);
  box-shadow: 0 12px 28px rgba(2, 8, 23, 0.22);
  color: #ffffff;
}

.reseller-prices-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.reseller-prices-content {
  max-width: 820px;
}

.reseller-prices h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.08;
  font-weight: 800;
}

.reseller-prices p {
  max-width: 880px;
  margin: 6px 0 10px;
  font-size: 18px;
  line-height: 1.55;
  color: #ffffff;
}

.reseller-prices p strong {
  color: #ffffff;
}

.reseller-prices-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  border: none;
  border-radius: 14px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  gap: 10px;
  background: #111827;
  box-shadow: 0 8px 18px rgba(2, 8, 23, 0.3);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.reseller-prices-button-arrow {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 1.15em;
  font-weight: 900;
}

.reseller-prices-button:hover,
.reseller-prices-button:focus-visible {
  background: #1f2937;
  box-shadow: 0 10px 22px rgba(2, 8, 23, 0.4);
  transform: translateY(-2px);
}

.reseller-prices-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

.popular-recent-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.popular-recent-card {
  appearance: none;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  position: relative;
}

.home-banner-card {
  position: relative;
}

.popular-recent-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.popular-recent-card-thumb {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1650 / 828;
  overflow: hidden;
  background: #0f172a;
}

.popular-recent-card-thumb img {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.popular-recent-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.24);
}

.plataforma-rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.24);
}

.site-contact-footer {
  margin: 16px 14px 24px;
  padding: 14px 16px;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  color: #1f2937;
  font-size: 14px;
}

.site-contact-footer p {
  margin: 0;
}

.site-contact-footer p + p {
  margin-top: 6px;
}

.site-contact-title {
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.02em;
}

.site-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.site-contact-label {
  color: #4b5563;
  font-size: 13px;
}

.site-contact-inline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-contact-link {
  display: inline;
  color: #111111;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.site-contact-link:hover {
  color: #000000;
}

.site-contact-phone {
  font-weight: 700;
  color: #334155;
}

.app-shell.session-validation-error-view {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-shell.session-validation-error-view #app-header,
.app-shell.session-validation-error-view main > :not(.categorias-dinamicas),
.app-shell.session-validation-error-view
  .categorias-dinamicas
  > :not(#categorias-status):not(.session-validation-refresh-btn) {
  display: none !important;
}

.app-shell.session-validation-error-view main {
  display: block;
  width: min(calc(100% - 28px), 560px);
  padding: 0;
}

.app-shell.session-validation-error-view #categorias-status {
  display: block;
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #b91c1c;
}

.session-validation-refresh-btn {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #15181e;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.session-validation-refresh-btn:hover,
.session-validation-refresh-btn:focus-visible {
  background: #2a303b;
}

.session-validation-refresh-icon {
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11a8 8 0 1 0 2 5.3M20 4v7h-7' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11a8 8 0 1 0 2 5.3M20 4v7h-7' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.app-shell.session-validation-error-view .site-contact-footer {
  margin: 18px 14px 0;
  text-align: center;
}

.app-shell.session-validation-error-view .site-contact-inline {
  justify-content: center;
}

.home-banners-viewport {
  position: relative;
  overflow: hidden;
  max-width: none;
  width: 100%;
  aspect-ratio: var(--home-banners-aspect-ratio, 2940 / 1244);
  margin: 0 auto;
  border-radius: 0;
  background: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.home-banners-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.55s ease;
  will-change: transform;
}

.home-banner-card {
  flex: 0 0 100%;
  position: relative;
  container-type: inline-size;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--home-banners-aspect-ratio, 2940 / 1244);
  border-radius: 0;
  overflow: hidden;
  background: #111827;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.home-banner-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: -6px;
}

.home-banner-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-rendering: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

.home-banner-cta-button {
  position: absolute;
  top: var(--home-banner-cta-top, 50%);
  left: var(--home-banner-cta-left, 50%);
  transform: translate(-50%, -50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  max-width: calc(100% - 36px);
  padding: clamp(8px, 1cqw, 12px) clamp(20px, 2.1cqw, 34px);
  border: none;
  border-radius: 999px;
  background: var(--home-banner-cta-bg, #ffffff);
  color: var(--home-banner-cta-color, #413763);
  font-size: clamp(14px, 2.05cqw, 36px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.18),
    0 3px 12px rgba(255, 255, 255, 0.32);
}

.home-banner-cta-button:hover {
  transform: translate(-50%, calc(-50% - 2px));
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.24),
    0 4px 14px rgba(255, 255, 255, 0.38);
  filter: brightness(1.03);
}

.home-banner-cta-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 2px;
}

.home-banner-release-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: min(52vw, 320px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
  color: #fff;
  text-align: left;
  pointer-events: none;
}

.home-banner-release-badge--released {
  background: rgba(22, 101, 52, 0.86);
  border-color: rgba(187, 247, 208, 0.28);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.home-banner-release-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-banner-release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.home-banner-release-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-banner-release-value {
  font-size: 42px;
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.home-banner-release-unit {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}

.home-banners-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
}

.home-banners-dots.hidden {
  display: none;
}

.home-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background-color 0.2s ease;
  opacity: 0.8;
}

.home-banner-dot.is-active {
  transform: scale(1.45);
  opacity: 1;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .home-banners-track {
    transition: none;
  }
}

@media (max-width: 640px) {
  .home-banner-release-badge {
    top: 10px;
    left: 10px;
    max-width: min(52vw, 172px);
    gap: 5px;
    padding: 6px 7px;
    border-radius: 10px;
  }

  .home-banner-release-grid {
    gap: 6px;
  }

  .home-banner-release-value {
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.04em;
  }

  .home-banner-release-unit {
    font-size: 6px;
    letter-spacing: 0.06em;
  }

  .home-banner-release-label {
    font-size: 7px;
    letter-spacing: 0.04em;
  }
}

.missing-data-wrap.hidden {
  display: none;
}

.missing-data-wrap .btn-outline {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
  font-weight: 700;
}

.missing-data-wrap .btn-outline:hover {
  background: #fde68a;
}

@media (max-width: 640px) {
  .push-permission-card {
    padding: 12px;
  }

  .push-permission-actions {
    gap: 8px;
  }

  .push-permission-actions .btn-primary,
  .push-permission-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }
}

.testing-toggle-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  background: #f97316;
  color: #fff;
}

.testing-toggle-btn.testing-off {
  background: #16a34a;
}

.categorias-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 0;
}

.categorias-grid > .categoria-card + .categoria-card {
  border-top: 1px solid #cbd5e1;
  padding-top: 16px;
}

.categoria-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.categoria-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
}

/* Refuerzo para evitar sobrescrituras externas */
.categorias-dinamicas .categoria-card h3 {
  font-size: 22px !important;
  font-weight: 700 !important;
}

.plataformas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px 16px;
}

.plataforma-card {
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.plataforma-card.plataforma-card-unavailable {
  cursor: not-allowed;
}

.plataforma-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.plataforma-card.plataforma-card-unavailable:hover {
  transform: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.plataforma-card.is-banner-hover-preview {
  transform: scale(1.03);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.plataforma-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: transparent;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}

.plataforma-thumb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.plataforma-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.descuento-temporal-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 4px 7px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.plan-titulo .descuento-temporal-badge {
  position: static;
  display: inline-flex;
  margin-left: 7px;
  vertical-align: middle;
}

.plataforma-card.plataforma-card-unavailable .plataforma-thumb img {
  filter: blur(2.2px) brightness(0.58) saturate(0.85);
  transform: scale(1.02);
}

.plataforma-unavailable-badge {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.plataforma-nombre {
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  color: #111827;
}

.categorias-dinamicas .plataforma-nombre {
  font-size: 18px !important;
  font-weight: 600 !important;
}

.plataforma-precio {
  font-size: 15px;
  color: #6b7280;
  text-align: left;
  margin-top: 4px;
}

.plataforma-precio .plataforma-precio-int {
  color: #404e6c !important;
  font-weight: 800;
}

.plataforma-precio .plataforma-precio-dec {
  color: #6b7280;
  font-weight: 600;
}

.plataforma-precio sup {
  font-size: 0.75em;
  vertical-align: baseline;
  position: relative;
  top: -0.25em;
}

.sin-plataformas {
  color: #777;
  margin: 0;
  font-size: 14px;
}

.status {
  color: #555;
  font-size: 14px;
  margin: 8px 0;
}

#categorias-status:empty {
  display: none;
}

.tasa-actual {
  font-weight: 700;
}

.tasa-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tasa-markup-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tasa-markup-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.tasa-markup-input {
  width: 96px;
  min-width: 96px;
  padding: 8px 10px;
}

.tasa-menu-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 8px 0;
  padding: 14px;
  border: 1px solid #dbe5f1;
  border-radius: 16px;
  background: #f8fafc;
}

.tasa-menu-panel .tasa-actual {
  margin: 0;
  color: #0f766e;
  font-size: 16px;
  text-align: left;
}

.tasa-menu-panel .tasa-markup-wrap {
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbe5f1;
}

.tasa-menu-panel .tasa-markup-label {
  color: #475569;
}

.tasa-menu-panel .tasa-markup-input {
  width: 120px;
  min-width: 0;
  border: 1px solid #cbd9e9;
  border-radius: 14px;
  background: #fff;
  text-align: right;
}

@media (max-width: 700px) {
  .user-drawer .tasa-menu-panel {
    width: calc(100% - 28px);
    margin: 8px 14px;
  }
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0 !important;
  background:
    radial-gradient(circle at 20% 20%, #e6ecff, transparent 35%),
    radial-gradient(circle at 80% 0%, #ffe5f0, transparent 30%),
    linear-gradient(180deg, #f9fafc 0%, #eef1f7 100%);
}

.auth-page.login-page,
.auth-page.signup-page {
  background: #f6f7f9;
}

.auth-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
}

.auth-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid #f0f0f0;
}

.auth-logo {
  width: 80px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: brightness(0);
}

.auth-title {
  margin: 0;
  font-size: 26px;
}

.auth-subtitle {
  margin: 6px 0 20px;
  color: #555;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  min-width: 0;
  text-align: left;
  align-items: flex-start;
}

.form-label.required::after {
  content: " *";
  color: #dc2626;
  font-weight: 700;
}

.auth-form .form-input,
.auth-form .input-with-toggle {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.auth-submit {
  margin-top: 6px;
  align-self: center;
}

.auth-forgot {
  width: 100%;
  text-align: left;
  margin: -2px 0 2px;
}

.auth-forgot-link {
  color: #4b5563;
  font-size: 13px;
  text-decoration: underline;
}

.auth-forgot-link:hover {
  color: #111827;
}

.auth-captcha-wrap {
  width: 100%;
  margin: 2px 0 4px;
}

.auth-captcha {
  width: 100%;
  min-height: 65px;
  display: flex;
  align-items: flex-start;
}

.auth-secondary {
  margin-top: 12px;
  width: 100%;
  overflow-wrap: anywhere;
}

/* Auth visual polish (login/signup) */
.auth-page:is(.login-page, .signup-page) .auth-container {
  min-height: 100vh;
  padding: 40px 16px;
  align-items: center;
  box-sizing: border-box;
}

.auth-page:is(.login-page, .signup-page) .auth-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 420px);
  max-width: min(420px, 100%);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 30px 28px 24px;
  box-shadow:
    0 22px 48px rgba(15, 23, 42, 0.14),
    0 2px 0 rgba(15, 23, 42, 0.03);
  margin-left: auto;
  margin-right: auto;
}

.auth-page:is(.login-page, .signup-page) .auth-logo {
  width: 92px;
  margin-bottom: 12px;
}

.auth-page:is(.login-page, .signup-page) .auth-title {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.auth-page:is(.login-page, .signup-page) .auth-subtitle {
  margin: 8px 0 22px;
  color: #64748b;
}

.auth-page:is(.login-page, .signup-page) .auth-form {
  gap: 9px;
}

.auth-page:is(.login-page, .signup-page) .auth-form .form-label {
  margin: 5px 0 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.auth-page:is(.login-page, .signup-page) .auth-form .form-helper-text {
  margin: -2px 0 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.auth-page:is(.login-page, .signup-page) .auth-form .form-input {
  min-height: 46px;
  border: 1px solid #d6deea;
  border-radius: 12px;
  background: #f8fafc;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.auth-page:is(.login-page, .signup-page) .auth-form .form-input:focus {
  outline: none;
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.auth-page:is(.login-page, .signup-page) .toggle-password {
  right: 12px;
  color: #64748b;
}

.auth-page:is(.login-page, .signup-page) .toggle-password:hover {
  color: #0f172a;
}

.auth-page:is(.login-page, .signup-page) .auth-forgot {
  margin: 3px 0 2px;
}

.auth-page:is(.login-page, .signup-page) .auth-forgot-link {
  text-decoration: none;
  border-bottom: 1px solid #cbd5e1;
  color: #475569;
}

.auth-page:is(.login-page, .signup-page) .auth-forgot-link:hover {
  color: #0ea5a8;
  border-color: #0ea5a8;
}

.auth-page:is(.login-page, .signup-page) .auth-captcha-wrap {
  border: 1px dashed #d7e1ee;
  border-radius: 12px;
  background: #fbfdff;
  padding: 8px 10px 6px;
  margin: 4px 0 10px;
}

.auth-page:is(.login-page, .signup-page) .auth-captcha {
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.auth-page:is(.login-page, .signup-page) .auth-captcha > * {
  max-width: 100%;
}

.auth-page.login-page .auth-captcha-wrap {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}

.auth-page.signup-page .auth-captcha-wrap {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}

.auth-page:is(.login-page, .signup-page) .auth-submit {
  width: 100%;
  border-radius: 12px;
  margin-top: 2px;
  padding: 12px 16px;
  font-size: 15px;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.auth-page:is(.login-page, .signup-page) .auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
  filter: brightness(1.02);
}

.auth-page:is(.login-page, .signup-page) .auth-submit:active {
  transform: translateY(0);
}

.auth-page:is(.login-page, .signup-page) .auth-secondary {
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

.auth-page:is(.login-page, .signup-page) .auth-secondary a {
  color: #0f172a;
  text-decoration: none;
  border-bottom: 1px solid #94a3b8;
  font-weight: 700;
}

.auth-page:is(.login-page, .signup-page) .auth-secondary a:hover {
  color: #0ea5a8;
  border-color: #0ea5a8;
}

.signup-flow {
  width: 100%;
  overflow: hidden;
}

.signup-flow-track {
  width: 200%;
  display: flex;
  align-items: flex-start;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.signup-flow-step {
  width: 50%;
  box-sizing: border-box;
  flex: 0 0 50%;
}

.signup-flow.is-success .signup-flow-track {
  transform: translateX(-50%);
}

.signup-flow-step-success {
  text-align: center;
  padding: 16px 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.signup-success-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.signup-success-main {
  font-size: 15px;
  line-height: 1.55;
  color: #334155;
}

.signup-success-email {
  font-weight: 600;
  color: #1f2937;
}

.signup-success-status {
  min-height: 20px;
  font-size: 13px;
  color: #64748b;
}

.signup-success-status.is-error {
  color: #c0392b;
}

.signup-success-status.is-success {
  color: #1e8449;
}

.signup-resend-btn {
  min-width: 170px;
  margin-top: 4px;
}

.signup-success-icon {
  width: 70px;
  height: 70px;
  display: block;
  margin: 2px auto 8px;
  background-color: #2a81d2;
  -webkit-mask-image: url("https://ojigtjcwhcrnawdbtqkl.supabase.co/storage/v1/object/public/public_assets/iconos/481664-2.png");
  mask-image: url("https://ojigtjcwhcrnawdbtqkl.supabase.co/storage/v1/object/public/public_assets/iconos/481664-2.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.auth-page.signup-page .auth-card.signup-success-only .auth-logo,
.auth-page.signup-page .auth-card.signup-success-only .auth-title,
.auth-page.signup-page .auth-card.signup-success-only .auth-subtitle {
  display: none;
}

.auth-page.signup-page .auth-card.signup-success-only {
  width: fit-content;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.auth-page.signup-page .auth-card.signup-success-only .signup-flow {
  width: fit-content;
  max-width: calc(100vw - 88px);
}

.auth-page.signup-page .auth-card.signup-success-only .signup-flow-track {
  width: auto;
  display: block;
  transform: none !important;
}

.auth-page.signup-page .auth-card.signup-success-only .signup-flow-step {
  width: auto;
  flex: 0 0 auto;
}

.auth-page.signup-page .auth-card.signup-success-only .signup-flow-step-form {
  display: none;
}

.auth-page.signup-page .auth-card.signup-success-only .signup-success-main {
  max-width: min(38ch, calc(100vw - 96px));
  margin-left: auto;
  margin-right: auto;
}

.auth-page.signup-page
  .auth-card.signup-success-only
  .signup-flow-step-success {
  padding: 4px 0 2px;
}

.signup-flow-step-success:focus {
  outline: none;
}

@media (max-width: 480px) {
  .auth-page:is(.login-page, .signup-page) .auth-container {
    min-height: 100svh;
    padding: 20px 12px;
  }
  .auth-page:is(.login-page, .signup-page) .auth-card {
    padding: 26px 20px 20px;
    border-radius: 18px;
  }
  .auth-page:is(.login-page, .signup-page) .auth-title {
    font-size: 27px;
  }
  .auth-page:is(.login-page, .signup-page) .auth-subtitle {
    margin-bottom: 18px;
  }
}

@media (max-width: 360px) {
  .auth-page:is(.login-page, .signup-page) .auth-container {
    padding: 14px 10px;
  }

  .auth-page:is(.login-page, .signup-page) .auth-card {
    padding: 22px 14px 18px;
    border-radius: 16px;
  }

  .auth-page:is(.login-page, .signup-page) .auth-title {
    font-size: 24px;
  }

  .auth-page:is(.login-page, .signup-page) .auth-form .form-input {
    min-height: 44px;
  }

  .auth-page:is(.login-page, .signup-page) .auth-captcha {
    justify-content: flex-start;
    min-height: 72px;
  }

  .auth-page:is(.login-page, .signup-page) .auth-captcha > * {
    transform: scale(0.89);
    transform-origin: left top;
  }

  .auth-page:is(.login-page, .signup-page) .auth-secondary,
  .status-message,
  .input-message {
    font-size: 12px;
  }
}

.input-message {
  display: none;
  margin: 0;
  color: #c0392b;
  font-size: 13px;
}

.input-message:not(:empty) {
  display: block;
  margin: 4px 0 10px;
}

.input-message a {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
}

.status-message {
  text-align: center;
  color: #2c3e50;
}

.status-message.is-error {
  color: #c0392b;
}

.status-message.is-success {
  color: #1e8449;
}

.link-inline {
  color: inherit;
  text-decoration: underline;
}

.input-with-toggle {
  position: relative;
}

.input-with-toggle .form-input {
  padding-right: 42px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: color 0.15s ease;
}

.toggle-password:hover {
  background: transparent;
  color: #111;
}

.toggle-password svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.toggle-password .icon-closed {
  display: none;
}

.toggle-password.is-hidden .icon-open {
  display: none;
}

.toggle-password.is-hidden .icon-closed {
  display: block;
}

.ocupado-reemplazo {
  background: #ffeaea;
  color: #b91c1c;
  font-weight: 600;
}

.toggle-text {
  margin-left: 8px;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 700px) {
  .home-category-nav {
    padding: 7px 0 8px;
  }

  .home-category-nav-list {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding: 0 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .home-category-nav-list::-webkit-scrollbar {
    display: none;
  }

  .home-category-trigger {
    padding: 7px 10px;
    font-size: 13px;
  }

  .home-category-platforms {
    position: static;
    min-width: min(240px, calc(100vw - 32px));
    max-width: min(280px, calc(100vw - 32px));
    max-height: 260px;
    margin-top: 0;
  }

  .home-category-group:hover .home-category-platforms,
  .home-category-group:focus-within .home-category-platforms {
    display: none;
  }

  .home-category-group.is-open .home-category-platforms {
    display: none;
  }

  body.home-page .home-category-nav > .home-category-mobile-dropdown {
    position: absolute;
    top: var(--home-category-dropdown-top, 0px);
    left: var(--home-category-dropdown-left, 10px);
    z-index: 40;
  }

  .home-category-mobile-dropdown {
    display: none;
    width: max-content;
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
    max-height: min(260px, calc(100vh - var(--header-height, 54px) - 54px));
    overflow-y: auto;
    padding: 6px;
    border-radius: 12px;
  }

  .home-category-mobile-dropdown.is-open {
    display: grid;
    gap: 2px;
  }

  body.home-page .home-category-nav > .home-category-mobile-dropdown.is-open {
    display: grid;
  }

  .home-category-mobile-dropdown .home-category-menu-title {
    padding-top: 0;
  }

  .home-banners {
    margin: -1px 0 10px;
  }

  .home-banner-cta-button {
    min-height: 36px;
  }

  .home-banners.home-banners-mobile-ratio .home-banners-viewport {
    aspect-ratio: 1 / 1;
  }

  .home-banners.home-banners-mobile-ratio .home-banner-card {
    aspect-ratio: 1 / 1;
  }

  .home-banners-viewport {
    aspect-ratio: var(--home-banners-aspect-ratio, 2940 / 1244);
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .home-banner-card {
    aspect-ratio: var(--home-banners-aspect-ratio, 2940 / 1244);
  }

  .home-banner-card img {
    object-fit: contain;
    object-position: center top;
    background: #111827;
  }

  .home-banner-card[data-source-type="custom"] img {
    object-fit: cover;
    object-position: center;
  }

  .popular-recent {
    margin-top: 16px;
    padding: 0 14px;
  }

  .popular-recent-head {
    align-items: flex-start;
  }

  .popular-recent-head h2 {
    font-size: 18px;
  }

  .reseller-prices {
    margin: 20px 14px 16px;
    padding: 20px 20px;
  }

  .reseller-prices-layout {
    align-items: stretch;
    flex-direction: column;
    gap: 24px;
  }

  .reseller-prices h2 {
    font-size: 22px;
  }

  .reseller-prices p {
    margin: 5px 0 8px;
    font-size: 15px;
  }

  .reseller-prices-button {
    width: 100%;
    box-sizing: border-box;
  }

  .popular-recent-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .popular-recent-card {
    min-width: 0;
    border-radius: 16px;
  }

  .popular-recent-card-badge {
    display: none;
  }

  .plataforma-rank-badge {
    display: none;
  }

  /* Quitar cajas de categorías en móvil */
  .categoria-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .categorias-dinamicas .plataforma-nombre {
    font-size: 20px !important;
  }

  .categorias-dinamicas > .categoria-card + .categoria-card {
    margin-top: 12px;
    border-top: 1px solid #94a3b8;
    padding-top: 12px;
  }

  .modal-card {
    max-width: 420px;
    width: 80%;
    padding: 16px;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  #platform-modal .modal-card {
    height: auto;
    max-height: 92vh;
  }

  #platform-modal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    gap: 5px;
    padding-top: 24px;
  }

  #platform-modal .modal-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    position: relative;
  }

  #platform-modal .modal-top::after {
    content: "";
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    margin-top: -20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff);
    pointer-events: none;
  }

  #platform-modal .modal-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%) translateY(6px);
    background: rgba(17, 24, 39, 0.85);
    color: #f9fafb;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0.2s ease;
    pointer-events: none;
    z-index: 2;
  }

  #platform-modal .modal-scroll-hint.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  #platform-modal .modal-scroll-hint {
    display: block;
  }

  #platform-modal .modal-top::-webkit-scrollbar {
    width: 6px;
  }

  #platform-modal .modal-top::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
  }

  #platform-modal .modal-top::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
  }

  #platform-modal .modal-media {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 7;
    min-height: 116px;
    width: 100%;
    background: #f3f4f6;
  }

  #platform-modal .modal-media img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  #platform-modal .modal-media-wrap {
    gap: 2px !important;
  }

  #platform-modal .modal-banner-meta {
    gap: 0 !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    min-height: 0;
    height: auto;
  }

  #platform-modal .modal-banner-meta .modal-badge {
    padding: 2px 6px;
    line-height: 1;
    font-size: 13px;
  }

  #platform-modal .modal-info {
    display: flex;
    flex-direction: column;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
  }

  #platform-modal .modal-header {
    display: none;
  }

  .modal-mobile-header {
    display: none;
  }

  .modal-name-mobile {
    display: none;
  }

  .modal-category-mobile {
    display: none;
  }

  #platform-modal .modal-info .modal-header h3 {
    display: none;
  }

  #platform-modal .modal-info .modal-category {
    display: none;
  }

  #platform-modal .modal-info .modal-title {
    display: none;
  }

  #platform-modal .modal-banner-meta {
    display: flex;
  }

  .modal-title-mobile {
    display: none;
  }

  #platform-modal .plan-bloque {
    background: #eef2f6;
    border-radius: 10px;
    padding: 8px 10px;
  }

  .plan-info-icon {
    display: inline-flex;
  }

  #platform-modal .modal-scroll {
    flex: 1 1 auto;
    overflow: visible;
    padding-right: 0;
    margin-right: 0;
  }

  #platform-modal .modal-bottom {
    flex-direction: column;
    flex-wrap: nowrap;
    margin: 4px 0 0;
    padding: 12px;
    border-radius: 12px;
    align-self: center;
  }

  #platform-modal .modal-bottom .modal-qty-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    align-items: stretch;
  }

  #platform-modal .modal-bottom .modal-qty {
    width: 100%;
    max-width: none;
  }

  #platform-modal .modal-bottom .modal-total,
  #platform-modal .modal-bottom #add-cart {
    width: 100%;
    max-width: 320px;
  }

  #platform-modal .modal-close:hover {
    background: #eef2f6;
    border-radius: 999px;
  }
}

.btn-alert {
  background: #dc2626;
  color: #fff;
  border: none;
}

.btn-entregar {
  background: #16a34a;
  color: #fff;
  border: none;
}

/*
 * Safari en iOS amplía automáticamente la vista al enfocar controles de texto
 * cuyo tamaño efectivo es menor de 16px. Mantener este mínimo solo en móvil
 * evita ese zoom sin alterar la tipografía de escritorio.
 */
@media (max-width: 767px) {
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not(
      [type="range"]
    ):not([type="button"]):not([type="submit"]):not([type="reset"]):not(
      [type="file"]
    ):not([type="image"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}
