.landing-page {
  background: #f3f4f6;
}

.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;
  align-items: center;
  gap: 14px;
  background: var(--bl-night);
  color: var(--bl-white);
  border-bottom: 4px solid var(--sustenta-teal);
}

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

.landing-topbar .brand-mini img {
  width: clamp(170px, 18vw, 246px);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bl-white);
}

.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: #dbe2ea;
  font-weight: 800;
}

.landing-nav a:hover {
  color: #bfe7da;
}

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

.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;
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  min-height: 260px;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(120deg, rgba(61, 61, 63, 0.96), rgba(0, 155, 143, 0.72)),
    var(--bl-night);
  color: var(--bl-white);
}

.market-hero-main {
  align-self: center;
  padding: clamp(24px, 4vw, 48px);
}

.market-hero h1 {
  max-width: 780px;
  margin: 10px 0 0;
  font-size: clamp(2rem, 4vw, 4.35rem);
  line-height: 0.98;
}

.hero-deals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-deals span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #dff2e8;
  font-weight: 800;
}

.market-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.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;
}

.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-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

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

.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 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(190px, 1fr));
  gap: 10px;
}

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

.product-detail-trigger {
  width: 100%;
  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: 1 / 1;
  object-fit: cover;
}

.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 {
  min-height: 54px;
  color: var(--bl-muted);
  font-size: 0.9rem;
  line-height: 1.32;
}

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

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

.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);
}

.quote-summary-head,
.quote-line,
.quote-total {
  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,
.quote-total strong {
  color: #bfe7da;
  white-space: nowrap;
}

.quote-total {
  padding-top: 4px;
  font-size: 1.05rem;
}

.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);
}

.cart-head,
.cart-item,
.cart-total {
  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 > 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;
}

.cart-total {
  padding-top: 14px;
  border-top: 1px solid var(--bl-line);
}

.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;
}

.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-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-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,
  .market-hero,
  .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: 1fr;
  }

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

  .landing-nav {
    justify-content: space-between;
  }

  .market-toolbar,
  .cart-item,
  .quote-line,
  .cart-total {
    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;
  }
}
