/* ===== Featured products grid + details modal ===== */

.featured-products {
  background: var(--paper-2);
  padding: clamp(80px, 11vw, 140px) var(--pad-x);
  border-top: 1px solid var(--line);
}

.fp-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.fp-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.fp-heading {
  font-family: var(--font-sans);
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin-top: 16px;
}

.fp-heading em {
  font-style: normal;
  color: var(--sage);
}

.fp-sub {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.7;
  max-width: 66ch;
}

/* Grid */
.fp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Image-only variant (brand pages): cards show just the product photo;
   name & details live in the popup. */
.fp-grid--images .fp-info {
  display: none;
}

.fp-grid--images .fp-card {
  box-shadow: 0 4px 14px rgba(35, 31, 32, 0.05);
}

/* Duo variant — brands with only two products: larger, centered cards */
.fp-grid--duo {
  grid-template-columns: repeat(2, 1fr);
  max-width: 780px;
  gap: 32px;
}

@media (max-width: 560px) {
  .fp-grid--duo {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}

@media (max-width: 1100px) {
  .fp-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .fp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.fp-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
  transition: transform 0.35s var(--ease-out-expo),
    box-shadow 0.35s var(--ease-out-soft), border-color 0.35s;
}

.fp-card:hover {
  transform: translateY(-5px);
  border-color: rgba(236, 28, 58, 0.22);
  box-shadow: 0 18px 34px rgba(35, 31, 32, 0.10);
}

.fp-thumb {
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.fp-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.35s var(--ease-out-expo);
}

.fp-card:hover .fp-thumb img {
  transform: scale(1.05);
}

.fp-info {
  padding: 16px 18px 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fp-brand {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
}

.fp-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.fp-cat {
  font-size: 12px;
  opacity: 0.55;
  margin-top: 2px;
}

/* ===== Modal ===== */
.fp-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.fp-modal.open {
  opacity: 1;
  visibility: visible;
}

body.fp-modal-open {
  overflow: hidden;
}

.fp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 18, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.fp-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 22px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.35s var(--ease-out-expo);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.30);
}

.fp-modal.open .fp-modal-box {
  transform: none;
}

.fp-modal-media {
  background: #fff;
  border-right: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  min-height: 320px;
}

.fp-modal-media img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  object-fit: contain;
}

.fp-modal-body {
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
}

.fp-modal-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}

.fp-modal-title {
  font-family: var(--font-sans);
  font-size: clamp(23px, 3vw, 33px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 10px 0 6px;
}

.fp-modal-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 20px;
}

.fp-modal-detail .fp-d-desc {
  font-size: 15px;
  line-height: 1.65;
  opacity: 0.8;
  margin-bottom: 20px;
}

.fp-modal-detail .fp-d-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
}

.fp-modal-detail .fp-d-list li {
  position: relative;
  padding-left: 24px;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0.82;
}

.fp-modal-detail .fp-d-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sage);
  font-weight: 700;
}

.fp-modal-body .btn {
  align-self: flex-start;
  margin-top: auto;
}

.fp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-out-expo);
}

.fp-modal-close:hover {
  background: var(--ink);
  color: #fff;
  transform: rotate(90deg);
}

@media (max-width: 680px) {
  .fp-modal-box {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .fp-modal-media {
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
    padding: 28px;
    min-height: 0;
  }

  .fp-modal-media img {
    max-height: 220px;
  }
}
