#products {
  margin: 18px auto 28px;
}

#products__section {
  box-sizing: border-box;
  width: min(calc(100% - 32px), 1420px);
  margin-inline: auto;
}

.catalog-heading {
  margin: 0 0 20px;
  padding: 8px 2px 4px;
}

.catalog-heading h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.08;
}

.catalog-heading > p:last-child {
  max-width: 720px;
  margin: 0;
  color: #5b6879;
  line-height: 1.55;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 32px);
  align-items: start;
}

.catalog-category-panel {
  position: sticky;
  top: 96px;
  border: 1px solid #dfe5ec;
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(18, 32, 51, 0.06);
}

.catalog-category-panel__heading {
  margin: 0 0 12px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid #edf0f4;
}

.catalog-category-panel__heading > span {
  display: block;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
}

.catalog-category-panel__heading p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 0.84rem;
  line-height: 1.4;
}

.grid_menu {
  margin: 0;
  padding: 0;
}

.grid_menu ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.grid_item {
  width: 100%;
}

.grid_item a {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #253044;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.grid_item a:hover {
  border-color: #f3bfd8;
  background: #fff3f8;
  color: #b8005c;
  transform: translateX(2px);
}

.grid_item a:focus-visible {
  outline: 3px solid rgba(230, 0, 115, 0.22);
  outline-offset: 2px;
}

.grid_item a.is-active {
  border-color: #e60073;
  background: #e60073;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(230, 0, 115, 0.2);
}

.catalog-content {
  min-width: 0;
}

.catalog-context {
  border-bottom: 1px solid #dfe5ec;
  padding: 2px 0 16px;
}

.catalog-breadcrumb {
  margin: 0 0 8px;
  color: #7a8493;
  font-size: 0.82rem;
  font-weight: 650;
}

.catalog-context__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.catalog-context h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.catalog-context h3 + p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #5b6879;
  line-height: 1.5;
}

.catalog-category-trigger {
  display: none;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d6dde7;
  border-radius: 12px;
  background: #ffffff;
  color: #253044;
  padding: 9px 13px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
}

.catalog-category-trigger:hover {
  border-color: #e60073;
  color: #b8005c;
}

.catalog-category-trigger:focus-visible,
.catalog-category-sheet__close:focus-visible,
.catalog-sheet-option:focus-visible {
  outline: 3px solid rgba(230, 0, 115, 0.22);
  outline-offset: 2px;
}

.card__stock,
.flash__stock {
  font-weight: 700;
}

.is-available {
  color: #16833d;
}

.is-low-stock {
  color: #d35400;
}

.is-out-of-stock {
  color: #b00020;
}

/* Selector móvil: bottom sheet */
.catalog-category-sheet[hidden] {
  display: none !important;
}

.catalog-category-sheet {
  position: fixed;
  inset: 0;
  z-index: 2300;
}

.catalog-category-sheet__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(14, 18, 27, 0.52);
  cursor: default;
}

.catalog-category-sheet__panel {
  box-sizing: border-box;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 620px);
  max-height: min(78vh, 620px);
  margin-inline: auto;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  background: #ffffff;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -16px 40px rgba(14, 18, 27, 0.2);
  animation: catalog-sheet-in 0.2s ease-out;
}

.catalog-category-sheet__handle {
  width: 46px;
  height: 5px;
  margin: 2px auto 14px;
  border-radius: 999px;
  background: #d8dde5;
}

.catalog-category-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.catalog-category-sheet__header .section-eyebrow {
  margin-bottom: 2px;
}

.catalog-category-sheet__header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.catalog-category-sheet__close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #dfe5ec;
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.catalog-category-sheet__options {
  display: grid;
  gap: 10px;
}

.catalog-sheet-option {
  position: relative;
  width: 100%;
  min-height: 54px;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  background: #f8fafc;
  color: #1f2937;
  padding: 12px 48px 12px 16px;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.catalog-sheet-option::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd3df;
  transform: translateY(-50%);
}

.catalog-sheet-option.is-active {
  border-color: #e60073;
  background: #fff3f8;
  color: #b8005c;
}

.catalog-sheet-option.is-active::after {
  background: #e60073;
  box-shadow: 0 0 0 4px rgba(230, 0, 115, 0.13);
}

body.catalog-category-sheet-open {
  overflow: hidden;
}

@keyframes catalog-sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0.7;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 820px) {
  #products {
    margin: 10px auto 24px;
  }

  #products__section {
    width: min(calc(100% - 24px), 720px);
  }

  .catalog-heading {
    margin-bottom: 14px;
    padding: 6px 0 2px;
  }

  .catalog-heading .section-eyebrow {
    margin-bottom: 2px;
  }

  .catalog-heading h2 {
    margin: 0;
    font-size: 1.65rem;
  }

  .catalog-heading > p:last-child {
    display: none;
  }

  .catalog-layout {
    display: block;
  }

  .catalog-category-panel {
    display: none;
  }

  .catalog-context {
    padding: 4px 0 12px;
  }

  .catalog-breadcrumb {
    margin-bottom: 6px;
    font-size: 0.76rem;
  }

  .catalog-context__row {
    display: block;
  }

  .catalog-context h3 {
    font-size: 1.45rem;
  }

  .catalog-context h3 + p {
    margin-top: 5px;
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .catalog-category-trigger {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    margin-top: 12px;
    padding: 9px 13px;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  #products__section {
    width: min(calc(100% - 20px), 420px);
  }

  .catalog-context__row {
    display: block;
  }

  .catalog-category-trigger {
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .catalog-category-trigger span {
    font-size: 1rem;
  }
}
