/* =========================================================
   CONSTRUFLORIDA — PRODUCTOS
   Archivo: estilos/productos.css
   ========================================================= */

.products-page {
  background: var(--paper);
  color: var(--ink);
}

/* HERO compacto */
.products-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  padding: 48px 0;
  background: var(--green);
  color: #fff;
}

.products-hero-inner {
  display: grid;
  grid-template-columns: minmax(480px, .92fr) minmax(420px, 1.08fr);
  align-items: end;
  gap: clamp(60px, 8vw, 120px);
}

.products-hero h1 {
  max-width: 650px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 3.55vw, 52px);
  line-height: 1;
  letter-spacing: -2.5px;
}

.products-hero h1 em {
  color: var(--orange);
  font-style: normal;
}

.products-hero .eyebrow {
  color: #e6c79f;
}

.products-hero-copy {
  max-width: 570px;
}

.products-hero-copy > p {
  margin: 0;
  color: #d9e2dd;
  font-size: var(--page-body);
  line-height: 1.75;
}

.products-hero-link {
  display: inline-flex;
  gap: 26px;
  margin-top: 22px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgb(255 255 255 / 30%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.products-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  border-bottom: 1px solid var(--line);
  background: rgb(248 248 244 / 92%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.products-nav .wrap {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-block: 14px;
  scrollbar-width: none;
}

.products-nav .wrap::-webkit-scrollbar { display: none; }

.products-nav a {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

/* Buscador / ayuda */
.catalog-tools {
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(420px, 1.1fr);
  gap: clamp(50px, 7vw, 100px);
  align-items: end;
  padding-top: 54px;
  padding-bottom: 10px;
}

.catalog-search label,
.catalog-tools-note > span {
  display: block;
  margin-bottom: 10px;
  color: #996035;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.catalog-search-field {
  position: relative;
}

.catalog-search input {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 0;
  border: 0;
  border-bottom: 1px solid #a9ada9;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 18px;
}

.catalog-search input:focus { border-color: var(--orange-dark); }
.catalog-search input::placeholder { color: #979d99; }

#product-search-clear {
  position: absolute;
  top: 50%;
  right: 0;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  transform: translateY(-50%);
}


/* Buscador mejorado */
.catalog-search input::-webkit-search-cancel-button,
.catalog-search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

#product-search-clear[hidden] {
  display: none !important;
}

.catalog-search-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 9px;
  margin-top: 13px;
}

.catalog-search-examples > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
}

.catalog-search-examples button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.catalog-search-examples button:hover {
  transform: translateY(-1px);
  border-color: rgb(166 84 28 / 42%);
  background: #fff;
}

.catalog-search-status {
  min-height: 18px;
  margin: 10px 0 0 !important;
  color: #996035 !important;
  font-size: 11px !important;
  font-weight: 700;
}

.variant-chip[hidden] {
  display: none !important;
}

.variant-chip.is-search-match:not(.is-selected) {
  border-color: rgb(166 84 28 / 42%);
  background: #fffdf8;
}

.product-section.is-search-result .product-section-copy h2 {
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.catalog-search > p,
.catalog-tools-note p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.catalog-tools-note {
  padding-left: 24px;
  border-left: 2px solid var(--orange);
}

.products-catalog { padding-block: 48px 72px; }

.product-section {
  scroll-margin-top: calc(var(--header-height) + 62px);
  display: grid;
  grid-template-columns: minmax(320px, .72fr) minmax(600px, 1.28fr);
  gap: clamp(55px, 7vw, 100px);
  padding-block: 54px;
  border-bottom: 1px solid var(--line);
}

.product-section[hidden] { display: none !important; }

.product-section-media {
  position: relative;
  overflow: hidden;
  min-height: 315px;
  border-radius: 20px;
  background: #e7e7e1;
}

.product-section-media > img:first-child {
  width: 100%;
  height: 100%;
  min-height: 315px;
  object-fit: cover;
}

.product-section-media.has-secondary > img:first-child { padding-right: 68px; }

.product-section-media-secondary {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 145px;
  height: 105px;
  border: 5px solid var(--paper);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgb(18 42 34 / 14%);
}

.product-section-copy .eyebrow { margin-bottom: 12px; }

.product-section-copy h2 {
  color: var(--green);
  font-size: var(--page-h2);
  line-height: 1.08;
  letter-spacing: -1.8px;
}

.product-section-copy > p {
  max-width: 650px;
  margin: 16px 0 25px;
  color: var(--muted);
  font-size: var(--page-body);
  line-height: 1.75;
}

.variant-group + .variant-group { margin-top: 22px; }
.variant-group[hidden] { display: none !important; }

.variant-group h3 {
  margin: 0 0 11px;
  color: var(--green);
  font-size: 14px;
  letter-spacing: -.2px;
}

.variant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 11px 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.variant-chip small {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--orange-dark);
  font-size: 14px;
  line-height: 1;
}

.variant-chip:hover {
  transform: translateY(-1px);
  border-color: rgb(166 84 28 / 45%);
}

.variant-chip.is-selected {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.variant-chip.is-selected small {
  background: var(--orange);
  color: var(--green-dark);
}

.product-image-note {
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11px !important;
}

.products-note {
  padding: 28px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.product-search-empty {
  margin: 10px 0 40px;
  padding: 28px 0;
  border-block: 1px solid var(--line);
}

.product-search-empty span {
  color: #996035;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.product-search-empty p {
  margin: 9px 0 0;
  color: var(--green);
  font-size: 18px;
}

.products-cta {
  padding-block: 56px;
  background: var(--green-dark);
  color: #fff;
}

.products-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.products-cta h2 {
  color: #fff;
  font-size: var(--page-h2);
}

.products-cta p:not(.eyebrow) {
  max-width: 560px;
  margin: 15px 0 0;
  color: #cbd7d1;
  font-size: var(--page-body);
  line-height: 1.7;
}

.products-cta .eyebrow { color: #dfc19c; }

/* Selection bar */
.quote-selection-bar {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2450;
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 330px;
  padding: 10px 11px 10px 17px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 18px;
  background: rgb(16 46 37 / 94%);
  color: #fff;
  box-shadow: 0 18px 44px rgb(16 45 35 / 24%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.quote-selection-bar[hidden] { display: none !important; }
.quote-selection-bar > div { display: flex; flex-direction: column; gap: 2px; }
.quote-selection-bar > div span { color: #d9bb95; font-size: 7px; font-weight: 700; letter-spacing: 1.5px; }
.quote-selection-bar > div strong { font-size: 12px; }
.quote-selection-bar > button {
  min-height: 42px;
  margin-left: auto;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* Drawer */
.quote-drawer {
  position: fixed;
  inset: 0;
  z-index: 3200;
  visibility: hidden;
  pointer-events: none;
}

.quote-drawer.is-open { visibility: visible; pointer-events: auto; }
.quote-drawer-backdrop { position: absolute; inset: 0; border: 0; background: rgb(8 25 20 / 48%); opacity: 0; transition: opacity .25s ease; cursor: default; }
.quote-drawer.is-open .quote-drawer-backdrop { opacity: 1; }

.quote-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(500px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 34px;
  background: var(--paper);
  box-shadow: -20px 0 60px rgb(10 34 26 / 20%);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}

.quote-drawer.is-open .quote-drawer-panel { transform: translateX(0); }
.quote-drawer-header { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.quote-drawer-header span { color: #996035; font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.quote-drawer-header h2 { margin-top: 7px; color: var(--green); font-size: 30px; }
.quote-drawer-close { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--green); font-size: 22px; cursor: pointer; }
.quote-drawer-intro { color: var(--muted); font-size: 13px; line-height: 1.7; }
.quote-selected-list { border-top: 1px solid var(--line); }
.quote-selected-item { display: grid; grid-template-columns: 28px 1fr 34px; gap: 10px; align-items: center; min-height: 58px; border-bottom: 1px solid var(--line); }
.quote-selected-item span { color: #996035; font-size: 8px; font-weight: 700; }
.quote-selected-item strong { color: var(--green); font-size: 12px; line-height: 1.45; }
.quote-selected-item button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #9b5c32; font-size: 18px; cursor: pointer; }
.quote-drawer-actions { display: grid; gap: 9px; margin-top: 24px; }
.quote-action-primary, .quote-action-secondary { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); text-align: center; text-decoration: none; font-size: 11px; font-weight: 700; cursor: pointer; }
.quote-action-primary { border-color: var(--orange); background: var(--orange); color: var(--green-dark); }
.quote-action-secondary { background: #fff; color: var(--green); }
.quote-clear { margin-top: 20px; padding: 8px 0; border: 0; border-bottom: 1px solid #999; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }

@media (max-width: 980px) {
  .products-hero-inner,
  .catalog-tools,
  .product-section { grid-template-columns: 1fr; }
  .products-hero-inner { gap: 24px; }
  .catalog-tools-note { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 2px solid var(--orange); }
}

@media (max-width: 780px) {
  .products-hero { min-height: 0; padding: 42px 0 46px; }
  .products-hero h1 { font-size: clamp(38px, 11vw, 49px); }
  .products-catalog { padding-block: 35px 55px; }
  .catalog-tools { padding-top: 42px; }
  .product-section { gap: 28px; padding-block: 42px; }
  .product-section-media, .product-section-media > img:first-child { min-height: 230px; }
  .products-cta-inner { align-items: flex-start; flex-direction: column; gap: 28px; }
  .quote-selection-bar { right: 16px; left: 16px; bottom: 84px; min-width: 0; }
  .quote-drawer-panel { padding: 26px 20px; }
}
