/**
 * Componentes - Botones, tarjetas, enlaces
 * Anatomía Gral. botones y tarjetas
 */

/* ========== BOTÓN ACCIÓN "VER" ========== */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--btn-ver-min-width);
  height: var(--btn-ver-height);
  padding: 0 1.5rem;
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-archivo);
  font-weight: 500;
  font-size: var(--fs-text-1);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.2s ease;
  margin: var(--btn-action-margin) 0 0;
}

.btn-action:hover,
.btn-action:focus {
  background: var(--color-dark-alt);
}

/* ========== BOTÓN WHATSAPP / CONTACTO (flotante) ========== */
/* Anatomía: 140×70px, esquinas muy redondeadas, inactivo=verde claro, activo=verde oscuro + borde verde claro */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: var(--btn-whatsapp-width);
  height: var(--btn-whatsapp-height);
  background: var(--color-whatsapp);
  color: var(--color-white);
  border-radius: 11px;
  padding: 0 8px;
  margin: var(--btn-whatsapp-margin);
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background: var(--color-whatsapp-hover);
  border-color: var(--color-whatsapp-border);
}

.btn-whatsapp svg {
  flex-shrink: 0;
}

.btn-whatsapp .wa-icon {
  width: 20px;
  height: 20px;
}

.btn-whatsapp .flag-icon {
  width: 17px;
  height: 13px;
}

.btn-whatsapp .btn-whatsapp-label {
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* ========== ENLACE "Ver mas productos de interes ->" ========== */
.link-ver-mas {
  font-family: var(--font-archivo);
  font-weight: 500;
  font-size: var(--fs-text-1);
  text-transform: uppercase;
  color: var(--color-red);
  text-decoration: underline;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s, outline 0.2s;
}

.link-ver-mas:hover,
.link-ver-mas:focus {
  color: var(--color-dark);
  outline: 1px solid var(--color-dark);
  outline-offset: 4px;
}

/* ========== TARJETA PRODUCTO (380×550px: imagen 265px, zona gris 285px) ========== */
.card-product {
  width: 100%;
  max-width: var(--card-product-width);
  min-height: var(--card-product-height);
  height: auto;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  overflow: hidden;
  border-radius: var(--card-product-radius);
  box-shadow: var(--card-product-shadow);
  margin: 0 auto;
}

@media (max-width: 420px) {
  .card-product {
    height: auto;
    min-height: 352px;
  }
  .card-product__body {
    min-height: 0;
  }
}

.card-product__image {
  width: 100%;
  height: var(--card-product-image-height);
  min-height: var(--card-product-image-height);
  flex-shrink: 0;
  object-fit: contain;
  background: var(--color-white);
}

/* Placeholder cuando el producto no tiene imagen */
.card-product__placeholder {
  width: 100%;
  height: var(--card-product-image-height);
  min-height: var(--card-product-image-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-light);
  color: var(--color-gray);
  font-family: var(--font-archivo);
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  text-align: center;
  padding: 0.5rem;
  box-sizing: border-box;
}

.card-product__body {
  flex: 1;
  min-height: 0;
  padding: var(--card-product-body-padding-top) var(--card-product-body-padding-x) var(--card-product-body-padding-bottom);
  display: flex;
  flex-direction: column;
  background: var(--color-gray-light);
  box-sizing: border-box;
}

.card-product__title {
  margin: 0 0 0.25em;
  line-height: 1.2;
  font-size: clamp(0.75rem, 1.35vw, 1.05rem);
}

.card-product__code {
  margin: 0 0 0.5rem;
  color: var(--color-gray);
  font-size: clamp(0.65rem, 1.1vw, 0.9rem);
}

.card-product__action {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  justify-content: center;
}

.card-product__action .btn-action {
  margin: 0;
  background: #000;
  min-width: 0;
  width: 80%;
  max-width: 80%;
  height: clamp(2rem, 3.2vw, 2.9rem);
  padding: 0 1.2rem;
  font-size: clamp(0.7rem, 1.1vw, 0.85rem);
}

.card-product__action .btn-action:hover,
.card-product__action .btn-action:focus {
  background: #1a1a1a;
}

/* ========== TARJETA CARACTERÍSTICA (4 cajas oscuras: icono + texto centrados) ========== */
.card-feature {
  width: 100%;
  max-width: var(--card-feature-max-width);
  min-height: var(--card-feature-min-height);
  height: var(--card-feature-height);
  background: var(--color-dark);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--card-feature-inner-padding);
  border: none;
  box-shadow: var(--card-feature-shadow);
  box-sizing: border-box;
}

.card-feature__icon {
  width: clamp(28px, 4.2vw, 40px);
  height: clamp(28px, 4.2vw, 40px);
  margin-bottom: clamp(0.28rem, 0.7vw, 0.5rem);
  flex-shrink: 0;
}

.card-feature__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.card-feature__text {
  font-family: var(--font-archivo);
  font-weight: 700;
  font-size: clamp(0.875rem, 1.54vw, 1.4rem);
  line-height: 1.25;
  margin: 0;
  max-width: 100%;
}

/* ========== INPUT Y FORMULARIO ========== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: var(--fs-text-2);
  margin-bottom: 0.35rem;
  color: var(--color-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-gray);
  background: var(--color-white);
  font-size: var(--fs-text-2);
  color: var(--color-dark);
}

.form-control::placeholder {
  color: var(--color-gray);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-red);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-submit {
  margin-top: 1.5rem;
  text-align: right;
}

.form-submit .btn-action {
  margin: 0;
}

/* Botón ENVIAR mismo estilo que VER, ~10% más chico */
.btn-enviar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: clamp(2.25rem, 3.6vw, 3.26rem);
  padding: 0 1.8rem;
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-archivo);
  font-weight: 500;
  font-size: clamp(0.9rem, 1.26vw, 1.3rem);
  text-transform: uppercase;
  transition: background 0.2s ease;
}

.btn-enviar:hover {
  background: var(--color-dark-alt);
}
