.landing-page {
  background: #f3f4f6;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  min-height: 74px;
  padding: 10px clamp(12px, 3vw, 28px);
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  background: var(--bl-white);
  color: var(--bl-ink);
  border-bottom: 4px solid var(--sustenta-teal);
  box-shadow: 0 10px 28px rgba(55, 56, 58, 0.1);
}

.landing-topbar .brand-mini {
  color: var(--bl-ink);
}

.landing-topbar .brand-mini img {
  width: clamp(190px, 20vw, 270px);
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.market-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  border: 2px solid var(--sustenta-teal);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bl-white);
}

.market-search input {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: var(--bl-white);
}

.market-search button {
  border: 0;
  background: var(--sustenta-teal);
  color: var(--bl-white);
  font-weight: 900;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--bl-ink);
  font-weight: 800;
}

.landing-nav a:hover {
  color: var(--sustenta-teal);
}

.landing-topbar .btn-light-cart {
  min-height: 44px;
  color: var(--bl-white);
  background: var(--sustenta-green);
}

.btn-client-session {
  min-height: 44px;
  color: var(--bl-ink);
  background: #eef5f3;
}

.landing-main {
  width: min(calc(100% - 24px), 1440px);
  margin: 12px auto 56px;
  display: grid;
  gap: 12px;
}

.market-strip {
  min-height: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #b7ddd5;
  border-radius: 6px;
  background: #edf8f4;
  color: #14625b;
}

.market-strip strong {
  margin-right: 4px;
}

.market-strip span {
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--bl-white);
  font-size: 0.88rem;
  font-weight: 800;
}

.catalog-section {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.market-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 90px;
}

.filter-card,
.market-results,
.pedido-panel,
.product-card {
  border: 1px solid var(--bl-line);
  border-radius: 6px;
  background: var(--bl-white);
}

.filter-card {
  padding: 14px;
  min-width: 0;
}

.filter-toggle {
  display: none;
}

.filter-card h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.filter-card p {
  margin: 0;
  color: var(--bl-muted);
  line-height: 1.45;
}

.filter-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--bl-muted);
  font-weight: 800;
}

.filter-card select,
.filter-card input {
  min-width: 0;
  width: 100%;
}

.filter-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.filter-check input {
  width: auto;
  min-height: auto;
}

.quote-detail-link {
  width: 100%;
  min-height: 38px;
  border: 1px dashed var(--sustenta-teal);
  border-radius: 6px;
  background: #f2fbf8;
  color: var(--sustenta-teal);
  font-weight: 900;
}

.category-strip {
  display: grid;
  gap: 8px;
}

.category-strip button {
  min-height: 38px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--bl-line);
  border-radius: 5px;
  background: #f8fafc;
  color: var(--bl-ink);
  font-weight: 800;
  text-align: left;
}

.category-strip button.active,
.category-strip button:hover {
  border-color: var(--sustenta-teal);
  background: #e8f7f2;
  color: #007a72;
}

.market-results {
  min-width: 0;
  padding: 12px;
}

.video-library {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--bl-line);
  border-radius: 6px;
  background: var(--bl-white);
}

.library-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: #e8f7f2;
  color: #007a72;
  font-size: 0.82rem;
  font-weight: 900;
}

.video-stage {
  min-width: 0;
}

.video-grid {
  position: relative;
  min-width: 0;
  display: block;
}

.production-player {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d5e6e0;
  border-radius: 6px;
  background: #f9fcfb;
}

.production-screen {
  aspect-ratio: 16 / 9;
  background: #303133;
}

.production-screen iframe,
.production-screen video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.production-info {
  display: grid;
  gap: 8px;
  padding: clamp(14px, 2vw, 20px);
}

.production-info span {
  color: var(--sustenta-teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.production-info h3,
.production-info p {
  margin: 0;
}

.production-info p {
  color: var(--bl-muted);
  line-height: 1.42;
}

.production-queue {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 8px;
  max-height: min(220px, 42%);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(13, 27, 41, 0.86);
  box-shadow: 0 18px 50px rgba(13, 27, 41, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-grid:hover .production-queue,
.video-grid:focus-within .production-queue {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.queue-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--bl-ink);
  text-align: left;
}

.queue-item:hover,
.queue-item.active {
  border-color: var(--sustenta-teal);
  background: #e8f7f2;
}

.queue-item img {
  width: 96px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  object-fit: cover;
  background: #e5ecea;
}

.queue-item span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.queue-item strong,
.queue-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item strong {
  color: var(--bl-ink);
  font-weight: 900;
}

.queue-item small {
  color: var(--sustenta-teal);
  font-weight: 800;
}

.market-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.market-toolbar h1,
.market-toolbar h2 {
  margin: 4px 0 0;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
}

.sort-select {
  max-width: 190px;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-detail-trigger {
  width: 100%;
  flex: 1;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.product-card:hover {
  border-color: rgba(0, 155, 143, 0.72);
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.13);
  transform: translateY(-2px);
}

.product-image-wrap {
  position: relative;
  background: #eef2f6;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.product-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #e9eff0;
  color: #52616a;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.product-image-wrap > .product-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.deal-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--sustenta-green);
  color: var(--bl-white);
  font-size: 0.72rem;
  font-weight: 900;
}

.product-card-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.product-category,
.product-meta small {
  color: var(--bl-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.product-card h3,
.product-card p {
  margin: 0;
}

.product-card h3 {
  min-height: 42px;
  font-size: 0.98rem;
  line-height: 1.18;
}

.product-card p {
  color: var(--bl-muted);
  font-size: 0.9rem;
  line-height: 1.32;
}

.product-meta {
  display: grid;
  gap: 2px;
}

.product-meta small {
  overflow-wrap: anywhere;
}

.product-meta strong {
  color: var(--sustenta-teal);
  font-size: 0.92rem;
  line-height: 1.1;
}

.product-badges {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.product-badges span {
  max-width: 100%;
  padding: 4px 6px;
  border-radius: 4px;
  background: #edf8f4;
  color: #007a72;
  font-size: 0.72rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 6px;
  padding: 0 10px 10px;
}

.product-actions .btn {
  min-height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
}

.pedido-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  gap: 18px;
  padding: 18px;
  background: var(--bl-night);
  color: var(--bl-white);
}

.pedido-panel .section-kicker {
  color: #bfe7da;
}

.quote-summary {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.client-box {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.client-box strong,
.client-box span {
  display: block;
}

.client-box span {
  color: #dbe2ea;
  font-size: 0.92rem;
}

.quote-summary-head,
.quote-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-summary-head span {
  color: #bfe7da;
  font-weight: 800;
}

.quote-lines {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.quote-summary .empty-state {
  color: #dbe2ea;
}

.quote-line {
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quote-line span {
  min-width: 0;
}

.quote-line strong {
  color: #bfe7da;
  white-space: nowrap;
}

.pedido-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pedido-form textarea,
.pedido-form button {
  grid-column: 1 / -1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(420px, 100%);
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: var(--bl-white);
  box-shadow: -24px 0 80px rgba(13, 27, 41, 0.25);
  transform: translateX(105%);
  transition: transform 0.2s ease;
}

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

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  background: rgba(13, 27, 41, 0);
  transition: background 0.2s ease;
}

.cart-overlay.open {
  pointer-events: auto;
  background: rgba(13, 27, 41, 0.48);
}

.floating-cart {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 34;
  width: 62px;
  height: 62px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--sustenta-green);
  color: var(--bl-white);
  box-shadow: 0 16px 34px rgba(55, 56, 58, 0.22);
}

.floating-cart i {
  font-size: 1.45rem;
}

.floating-cart span {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border: 2px solid var(--bl-white);
  border-radius: 999px;
  background: var(--sustenta-teal);
  color: var(--bl-white);
  font-size: 0.78rem;
  font-weight: 900;
}

.floating-cart.cart-bump {
  animation: cartBump 0.42s ease;
}

.cart-flyer {
  position: fixed;
  z-index: 90;
  width: 18px;
  height: 18px;
  pointer-events: none;
  border-radius: 50%;
  background: var(--sustenta-teal);
  box-shadow: 0 0 0 5px rgba(0, 155, 143, 0.16);
  transform: translate(-50%, -50%);
  animation: cartFlyer 0.68s cubic-bezier(0.2, 0.74, 0.28, 1) forwards;
}

@keyframes cartBump {
  0% { transform: scale(1); }
  42% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes cartFlyer {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--cart-x) - 50%), calc(var(--cart-y) - 50%)) scale(0.35);
  }
}

.cart-head,
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-head h2 {
  margin: 0;
}

.cart-head button,
.qty-control button {
  border: 0;
  border-radius: var(--bl-radius);
  background: var(--bl-night);
  color: var(--bl-white);
}

.cart-head button {
  width: 38px;
  height: 38px;
}

.cart-items {
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
}

.cart-item {
  padding: 12px;
  border: 1px solid var(--bl-line);
  border-radius: var(--bl-radius);
}

.cart-item img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef2f6;
}

.cart-item > .product-photo-placeholder {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  padding: 4px;
  border-radius: 6px;
  font-size: 0.55rem;
}

.cart-item > div:first-of-type {
  min-width: 0;
  flex: 1;
}

.cart-item strong,
.cart-item span {
  display: block;
}

.cart-item span,
.empty-state {
  color: var(--bl-muted);
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 30px 34px 30px;
  align-items: center;
  text-align: center;
}

.qty-control button {
  height: 30px;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
  background: rgba(13, 27, 41, 0);
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.client-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
  background: rgba(13, 27, 41, 0);
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.client-modal.open {
  pointer-events: auto;
  background: rgba(13, 27, 41, 0.58);
  opacity: 1;
}

.client-modal-card {
  position: relative;
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
  background: var(--bl-white);
  box-shadow: 0 24px 90px rgba(13, 27, 41, 0.34);
}

.client-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.client-tabs button {
  min-height: 40px;
  border: 1px solid var(--bl-line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--bl-ink);
  font-weight: 900;
}

.client-tabs button.active {
  border-color: var(--sustenta-teal);
  background: #e8f7f2;
  color: #007a72;
}

.client-form {
  display: none;
  gap: 10px;
}

.client-form.active {
  display: grid;
}

.client-form[hidden] {
  display: none;
}

.client-form h2 {
  margin: 0;
}

.client-session-actions {
  display: grid;
}

.product-modal.open {
  pointer-events: auto;
  background: rgba(13, 27, 41, 0.58);
  opacity: 1;
}

.product-modal-card {
  position: relative;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  overflow: auto;
  border-radius: 8px;
  background: var(--bl-white);
  box-shadow: 0 24px 90px rgba(13, 27, 41, 0.34);
  transform: translateY(10px);
  transition: transform 0.18s ease;
}

.product-modal.open .product-modal-card {
  transform: translateY(0);
}

.product-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 24, 32, 0.9);
  color: var(--bl-white);
}

.product-modal-media {
  position: relative;
  min-height: 100%;
  background: #eef2f6;
}

.product-modal-media img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.product-modal-media > .product-photo-placeholder {
  min-height: 440px;
  height: 100%;
}

.product-gallery {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.72);
}

.product-gallery button {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--bl-white);
}

.product-gallery button.active {
  border-color: var(--sustenta-green);
}

.product-gallery img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.product-gallery .product-photo-placeholder {
  width: 100%;
  height: 100%;
  padding: 2px;
  font-size: 0.45rem;
}

.product-modal-info {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(20px, 4vw, 38px);
}

.product-modal-info h2,
.product-modal-info p {
  margin: 0;
}

.product-modal-info h2 {
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.02;
}

.product-modal-info p {
  color: var(--bl-muted);
  line-height: 1.55;
}

.product-modal-price {
  color: var(--sustenta-teal);
  font-size: 1.75rem;
  line-height: 1;
}

.spec-list {
  display: grid;
  gap: 8px;
}

.spec-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bl-line);
}

.spec-list span {
  color: var(--bl-muted);
  font-weight: 800;
}

.spec-list strong {
  text-align: right;
}

.product-modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.42fr);
  gap: 10px;
}

.product-modal-actions .btn {
  min-height: 46px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .landing-topbar {
    grid-template-columns: auto auto;
  }

  .market-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .landing-nav {
    justify-content: flex-end;
  }

  .catalog-section,
  .pedido-panel,
  .product-modal-card {
    grid-template-columns: 1fr;
  }

  .production-queue {
    grid-auto-columns: minmax(220px, 1fr);
  }

  .market-sidebar {
    position: static;
  }

  .category-strip {
    display: flex;
    flex-wrap: wrap;
  }

  .category-strip button {
    width: auto;
  }
}

@media (max-width: 680px) {
  .landing-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .landing-topbar .brand-mini img {
    width: min(175px, 100%);
  }

  .btn-client-session span,
  .landing-nav {
    display: none;
  }

  .btn-client-session {
    width: 44px;
    padding: 0;
  }

  .market-search {
    min-width: 0;
  }

  .catalog-section,
  .market-sidebar {
    min-width: 0;
  }

  .landing-topbar .btn-light-cart {
    width: 100%;
  }

  .landing-topbar .btn-light-cart {
    display: none;
  }

  .floating-cart {
    width: 56px;
    height: 56px;
  }

  #filtrosCatalogo {
    padding: 0;
  }

  #filtrosCatalogo h2 {
    display: none;
  }

  .filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: var(--bl-ink);
    font-weight: 800;
    text-align: left;
  }

  #filtrosCatalogo:not(.open) > label,
  #filtrosCatalogo:not(.open) > #btnLimpiarFiltros {
    display: none;
  }

  #filtrosCatalogo.open > label,
  #filtrosCatalogo.open > #btnLimpiarFiltros {
    margin: 0 14px 12px;
  }

  #filtrosCatalogo.open > .filter-check {
    display: flex;
  }

  .market-toolbar,
  .cart-item,
  .quote-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .sort-select,
  .pedido-form,
  .product-modal-actions {
    max-width: none;
    grid-template-columns: 1fr;
  }

  .product-modal {
    padding: 10px;
  }

  .product-modal-media img {
    min-height: 260px;
    max-height: 340px;
  }

  .product-modal-media > .product-photo-placeholder {
    min-height: 260px;
    max-height: 340px;
  }
}
