/* public/assets/css/products.css */
/* Scoped styles for the Products page */
.kp-products {
  color: #1b1f2a;
}

.kp-products__hero {
  background:
    linear-gradient(120deg, rgba(30, 99, 255, 0.1), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 85% 20%, rgba(123, 220, 140, 0.2), transparent 34%);
  padding: clamp(48px, 8vw, 92px) 0 clamp(34px, 5vw, 64px);
}

.kp-products__hero-inner,
.kp-products__section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.kp-products__hero-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kp-products__eyebrow {
  color: #1e63ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kp-products__title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.kp-products__lead {
  max-width: 660px;
  margin: 0;
  color: #4b5563;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.7;
}

.kp-products__section {
  padding-top: 34px;
  padding-bottom: 82px;
}

.kp-products__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.kp-product-card {
  overflow: hidden;
  border: 1px solid rgba(230, 232, 239, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.kp-product-card:hover {
  border-color: rgba(30, 99, 255, 0.22);
  box-shadow: 0 24px 56px rgba(16, 24, 40, 0.14);
  transform: translateY(-4px);
}

.kp-product-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.kp-product-card__link:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(30, 99, 255, 0.34);
}

.kp-product-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f1f3f8;
  overflow: hidden;
}

.kp-product-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.kp-product-card:hover .kp-product-card__media img {
  transform: scale(1.05);
}

.kp-product-card__media--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: linear-gradient(135deg, #f8fbff, #edf4ff);
}

.kp-product-card__media--brand img {
  object-fit: contain;
}

.kp-product-card:hover .kp-product-card__media--brand img {
  transform: scale(1.02);
}

.kp-product-card__body {
  padding: 0 0 20px;
}

.kp-product-card__content {
  display: block;
  padding: 20px 20px 0;
}

.kp-product-card__tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1e63ff;
  font-size: 12px;
  font-weight: 700;
}

.kp-product-card__title {
  display: block;
  margin: 14px 0 8px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.kp-product-card__text {
  margin: 0;
  padding: 0 20px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 1080px) {
  .kp-products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .kp-products__hero-inner,
  .kp-products__section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .kp-products__grid {
    grid-template-columns: 1fr;
  }

  .kp-product-card {
    border-radius: 20px;
  }
}

.kp-detail {
  color: #1b1f2a;
}

.kp-detail__hero {
  padding: clamp(42px, 7vw, 76px) 0;
  background:
    linear-gradient(120deg, rgba(30, 99, 255, 0.1), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 78% 22%, rgba(123, 220, 140, 0.18), transparent 32%);
}

.kp-detail__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.kp-detail__back {
  display: inline-flex;
  margin-bottom: 22px;
  color: #1e63ff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.kp-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(26px, 5vw, 56px);
  align-items: center;
}

.kp-detail__eyebrow {
  color: #1e63ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kp-detail__title {
  margin: 12px 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
}

.kp-detail__lead {
  max-width: 650px;
  margin: 0;
  color: #4b5563;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.kp-detail__image {
  overflow: hidden;
  border: 1px solid rgba(230, 232, 239, 0.95);
  border-radius: 28px;
  background: #f1f3f8;
  box-shadow: 0 22px 58px rgba(16, 24, 40, 0.14);
}

.kp-detail__image img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  object-fit: cover;
}

.kp-detail__section {
  padding: 56px 0 84px;
}

.kp-detail__section--subproducts {
  padding-top: 0;
}

.kp-detail__content {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
}

.kp-detail__panel,
.kp-detail__list {
  border: 1px solid rgba(230, 232, 239, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.08);
}

.kp-detail__panel {
  padding: clamp(24px, 4vw, 36px);
}

.kp-detail__panel h2,
.kp-detail__list h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.kp-detail__panel p {
  margin: 0;
  color: #4b5563;
  line-height: 1.75;
}

.kp-detail__list {
  padding: 24px;
}

.kp-detail__list ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kp-detail__list li {
  padding: 13px 14px;
  border-radius: 16px;
  background: #f6f8fc;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

.kp-detail__subheader {
  max-width: 700px;
  margin-bottom: 20px;
}

.kp-detail__subheader h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.kp-detail__subgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.kp-detail-subcard {
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(230, 232, 239, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.08);
}

.kp-detail-subcard__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f3f8;
}

.kp-detail-subcard__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.kp-detail-subcard:hover .kp-detail-subcard__media img {
  transform: scale(1.04);
}

.kp-detail-subcard__button {
  display: block;
  width: 100%;
  padding: 22px 22px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.kp-detail-subcard__button:focus-visible {
  outline: 3px solid rgba(30, 99, 255, 0.34);
  outline-offset: 6px;
  border-radius: 14px;
}

.kp-detail-subcard__tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1e63ff;
  font-size: 12px;
  font-weight: 700;
}

.kp-detail-subcard h3 {
  margin: 14px 0 10px;
  font-size: 18px;
  line-height: 1.25;
}

.kp-detail-subcard p {
  margin: 0;
  padding: 0 22px 22px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.is-modal-open {
  overflow: hidden;
}

.kp-product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  padding: 24px;
  align-items: center;
  justify-content: center;
}

.kp-product-modal.is-open {
  display: flex;
}

.kp-product-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.kp-product-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  border: 1px solid rgba(230, 232, 239, 0.95);
  border-radius: 26px;
  background: #fff;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
}

.kp-product-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid #e6e8ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.kp-product-modal h2 {
  margin: 16px 48px 12px 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.kp-product-modal h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.kp-product-modal p {
  margin: 0 0 22px;
  color: #4b5563;
  line-height: 1.75;
}

.kp-product-modal__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.kp-product-modal__cols > div {
  padding: 18px;
  border-radius: 18px;
  background: #f6f8fc;
}

.kp-product-modal ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kp-product-modal li {
  color: #374151;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .kp-detail__grid,
  .kp-detail__content {
    grid-template-columns: 1fr;
  }

  .kp-detail__subgrid {
    grid-template-columns: 1fr;
  }

  .kp-product-modal {
    padding: 16px;
  }

  .kp-product-modal__dialog {
    max-height: 86vh;
    border-radius: 22px;
  }

  .kp-product-modal__cols {
    grid-template-columns: 1fr;
  }

  .kp-detail__image img {
    min-height: 280px;
  }
}
