.catalog-body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

.catalog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(10, 14, 23, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  view-transition-name: site-header;
}

.site-sections {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.9);
}

.site-sections__pill {
  position: absolute;
  top: 0.25rem;
  left: 0;
  z-index: 0;
  height: calc(100% - 0.5rem);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(126, 184, 218, 0.28);
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  view-transition-name: site-nav-pill;
  opacity: 0;
}

.site-sections__pill.is-ready {
  opacity: 1;
}

.site-sections__item {
  position: relative;
  z-index: 1;
  min-width: 120px;
  text-align: center;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.site-sections__item:hover {
  color: var(--text);
}

.site-sections__item.is-active {
  color: #0a0e17;
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .site-sections__pill {
    transition: none;
  }
}

/* Cross-document view transitions between main sections */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
  animation-timing-function: ease;
}

::view-transition-old(root) {
  animation-name: site-vt-fade-out;
}

::view-transition-new(root) {
  animation-name: site-vt-fade-in;
}

@keyframes site-vt-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes site-vt-fade-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* Primera carga de la sesión */
@keyframes site-intro-header {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes site-intro-nav {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes site-intro-pill {
  from {
    opacity: 0;
    transform: translateX(var(--site-pill-x, 0)) scaleX(0.35);
  }
  to {
    opacity: 1;
    transform: translateX(var(--site-pill-x, 0)) scaleX(1);
  }
}

@keyframes site-intro-main {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalog-body.is-site-intro .catalog-header {
  animation: site-intro-header 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.catalog-body.is-site-intro .site-sections {
  animation: site-intro-nav 0.55s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.catalog-body.is-site-intro .site-sections__pill.is-ready {
  animation: site-intro-pill 0.55s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.catalog-body.is-site-intro main,
.catalog-body.is-site-intro .pricing-shell,
.catalog-body.is-site-intro .pricing-guest-wrap,
.catalog-body.is-site-intro .auth-wrap {
  animation: site-intro-main 0.7s 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-body.is-site-intro .catalog-header,
  .catalog-body.is-site-intro .site-sections,
  .catalog-body.is-site-intro .site-sections__pill.is-ready,
  .catalog-body.is-site-intro main,
  .catalog-body.is-site-intro .pricing-shell,
  .catalog-body.is-site-intro .pricing-guest-wrap,
  .catalog-body.is-site-intro .auth-wrap {
    animation: none;
  }
}

.catalog-header__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.catalog-header__admin {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
}

.catalog-header__admin:hover {
  color: var(--text);
  background: rgba(126, 184, 218, 0.12);
}

.btn-header-login {
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: #0a0e17;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
}

.btn-header-login:hover {
  opacity: 0.88;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.header-user:hover {
  background: rgba(126, 184, 218, 0.08);
}

.header-user__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.header-user__initials {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0e17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.header-user__name {
  font-size: 0.9rem;
  font-weight: 600;
}

.catalog-header__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.catalog-header__brand img {
  width: 72px;
  height: auto;
  border-radius: 8px;
}

.catalog-header__brand span {
  font-size: 1.2rem;
  font-weight: 700;
}

.catalog-header__nav {
  display: none;
}

@media (max-width: 720px) {
  .catalog-header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.65rem;
  }

  .catalog-header__brand img {
    width: 56px;
  }

  .catalog-header__brand span {
    font-size: 1.05rem;
  }

  .catalog-header__right {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }

  .site-sections {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .site-sections__item {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
  }

  .catalog-main {
    padding: 1.25rem 1rem 2.5rem;
  }

  .catalog-hero {
    margin-bottom: 1.75rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .product-card__body {
    padding: 0.85rem;
  }

  .product-card__title {
    font-size: 0.98rem;
  }

  .preview-banner {
    font-size: 0.78rem;
    padding: 0.55rem 0.75rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .catalog-header__brand span {
    display: none;
  }

  .header-user__name {
    display: none;
  }

  .catalog-header__admin {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
  }

  .btn-header-login {
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .product-tag {
    font-size: 0.62rem;
    padding: 0.18rem 0.45rem;
  }
}

@media (max-width: 640px) {
  .catalog-filters__row {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-filters__row select,
  .filter-chip,
  .btn-filter,
  .btn-filter-clear {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .filter-chip {
    justify-content: flex-start;
  }
}

.catalog-main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.catalog-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.catalog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.75rem;
}

.catalog-hero p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.catalog-filters {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.catalog-filters__search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.catalog-filters__search input:focus {
  outline: none;
  border-color: var(--accent);
}

.catalog-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.catalog-filters__row select {
  min-width: 180px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.9);
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}

.filter-chip input {
  accent-color: var(--accent);
}

.filter-chip:has(input:checked) {
  color: #0a0e17;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-filter,
.btn-filter-clear {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-filter {
  border: none;
  background: var(--accent);
  color: #0a0e17;
}

.btn-filter-clear {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
}

.catalog-count {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

a.product-card:hover {
  border-color: rgba(126, 184, 218, 0.45);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #1a2332;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__tags {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  z-index: 2;
}

.product-tag {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.product-tag--print {
  color: #0a0e17;
  background: #7eb8da;
}

.product-tag--design {
  color: #0a0e17;
  background: #fbbf24;
}

.product-card__body {
  padding: 1rem;
}

.product-card__category {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.product-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.product-card__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Detalle de producto */
.product-detail__back {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.product-detail__back:hover {
  color: var(--accent);
}

.product-detail {
  overflow-x: clip;
}

.product-detail__layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.product-gallery,
.product-detail__info {
  min-width: 0;
}

.product-gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #1a2332;
  border: 1px solid var(--border);
  max-width: 100%;
}

.product-gallery__slide {
  display: none;
  width: 100%;
  height: 100%;
}

.product-gallery__slide.is-active {
  display: block;
}

.product-gallery__slide img,
.product-gallery__slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b1220;
}

.product-gallery__empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-muted);
}

.product-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.72);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 3;
}

.product-gallery__nav--prev { left: 0.75rem; }
.product-gallery__nav--next { right: 0.75rem; }

.product-gallery__nav:hover {
  background: rgba(126, 184, 218, 0.9);
  color: #0a0e17;
}

.product-gallery__thumbs {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.product-gallery__thumb {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #1a2332;
  cursor: pointer;
}

.product-gallery__thumb.is-active {
  border-color: var(--accent);
}

.product-gallery__thumb img,
.product-gallery__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery__thumb-video {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
  font-size: 0.9rem;
}

.product-detail__info h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
}

.product-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.product-detail__desc {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 1.02rem;
}

.product-detail__exclusive {
  margin-top: 1rem;
  color: #fbbf24;
  font-size: 0.92rem;
}

.product-detail__actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.product-detail__cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.product-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s, transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}

.product-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.product-cta:hover {
  transform: translateY(-1px);
}

.product-cta--instagram {
  color: #fff;
  background: linear-gradient(135deg, #f58529, #dd2a7b 48%, #8134af);
}

.product-cta--instagram:hover {
  opacity: 0.92;
}

.product-cta--email {
  color: #0a0e17;
  background: var(--accent);
}

.product-cta--email:hover {
  opacity: 0.9;
}

.product-cta--explore {
  color: var(--text-muted);
  background: rgba(17, 24, 39, 0.7);
  border-color: var(--border);
}

.product-cta--explore:hover {
  color: var(--text);
  border-color: rgba(126, 184, 218, 0.4);
  background: rgba(126, 184, 218, 0.1);
}

.product-detail__cta-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.product-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 40;
  transform: translateX(-50%) translateY(8px);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: #111827;
  border: 1px solid rgba(126, 184, 218, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.product-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.preview-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: #fef3c7;
  background: rgba(120, 53, 15, 0.92);
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
}

.preview-banner a {
  color: #fde68a;
}

.preview-banner--maintenance {
  color: #e0f2fe;
  background: rgba(12, 74, 110, 0.92);
  border-bottom-color: rgba(56, 189, 248, 0.35);
}

.preview-banner--maintenance a {
  color: #bae6fd;
}

.catalog-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
}

/* Detalle de producto — responsive (debe ir DESPUÉS de las reglas base) */
@media (max-width: 860px) {
  .product-detail__layout {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .product-detail__info h1 {
    font-size: clamp(1.45rem, 6vw, 1.9rem);
  }

  .product-gallery__thumbs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

@media (max-width: 640px) {
  .product-detail__back {
    margin-bottom: 0.9rem;
  }

  .product-gallery__main {
    aspect-ratio: 1 / 1;
    border-radius: 14px;
  }

  .product-gallery__nav {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .product-gallery__nav--prev { left: 0.5rem; }
  .product-gallery__nav--next { right: 0.5rem; }

  .product-gallery__thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
  }

  .product-detail__desc {
    font-size: 0.95rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .product-detail__cta-row {
    grid-template-columns: 1fr;
  }

  .product-cta {
    width: 100%;
    padding: 0.9rem 1rem;
  }

  .product-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    transform: translateY(8px);
    text-align: center;
    border-radius: 14px;
  }

  .product-toast.is-visible {
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  .product-gallery__main {
    aspect-ratio: 5 / 6;
  }

  .product-cta {
    font-size: 0.92rem;
  }
}
