/* =====================================================
   FACETRA — COLLECTION & CATEGORY PAGES (PRODUCTION)
   Luxury Black & Gold Theme | 1:1 Images | Modal Support
   ===================================================== */

/* ---------------- ROOT PALETTE ---------------- */
:root{
  --gold1:#f1d27a;
  --gold2:#c9a24d;
  --gold3:#8f6b2a;
  --dark:#050806;
  --dark2:#0b120f;
  --panel:#0c1310;
  --card:#0f1612;
  --text:#d7dbd8;
  --muted:#9ea4a0;
}

/* ---------------- PAGE HERO ---------------- */
.collection-hero{
  min-height:42vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:120px 20px 70px;
  text-align:center;
  background:
    radial-gradient(circle at top,#142019,#050806 70%);
}

.hero-title{
  font-family:Cinzel,serif;
  font-size:clamp(2.4rem,4vw,3.6rem);
  color:var(--gold2);
  letter-spacing:2px;
}

.hero-description{
  max-width:880px;
  margin:14px auto 0;
  color:#d0d4d1;
  line-height:1.9;
}

/* ---------------- COLLECTION GRID ---------------- */
.collection-section{
  padding:60px 30px 120px;
  background:linear-gradient(to bottom,#050806,#070f0c);
}

.collection-grid{
  max-width:1300px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:44px;
  justify-items:center;
}

/* ---------------- CATEGORY PREVIEW CARD ---------------- */
.collection-card{
  width:100%;
  max-width:420px;
  background:
    radial-gradient(circle at top,rgba(201,162,77,.12),transparent 70%),
    linear-gradient(180deg,#0c1310,#060a08);
  border:1px solid rgba(201,162,77,.28);
  padding:34px 28px 36px;
  text-align:center;
  transition:.45s ease;
  box-shadow:0 14px 40px rgba(0,0,0,.7);
}

.collection-card:hover{
  transform:translateY(-10px);
  box-shadow:0 40px 90px rgba(0,0,0,.85);
}

.collection-card h2{
  font-family:Cinzel,serif;
  color:var(--gold2);
  letter-spacing:1px;
  margin-bottom:18px;
}

/* -------- 1:1 IMAGE BOX -------- */
.auto-image-box,
.item-thumb{
  width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  background:#000;
  border:1px solid rgba(201,162,77,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
  box-shadow:inset 0 0 0 1px rgba(201,162,77,.15);
}

.auto-image-box img,
.item-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform 1.2s ease,opacity .6s ease;
}

.collection-card:hover img,
.item-card:hover img{
  transform:scale(1.08);
}

/* -------- PREVIEW TEXT -------- */
.stone-name{
  font-family:Cinzel,serif;
  color:var(--gold2);
  font-size:1.05rem;
  margin-top:6px;
}

.stone-desc{
  color:#cfd4d1;
  font-size:.95rem;
  margin:10px auto 20px;
  max-width:360px;
}

/* -------- CTA BUTTON -------- */
.btn-category{
  display:inline-block;
  padding:12px 28px;
  border:1px solid var(--gold2);
  color:var(--gold2);
  text-decoration:none;
  letter-spacing:.15em;
  text-transform:uppercase;
  transition:.35s ease;
}

.btn-category:hover{
  background:linear-gradient(135deg,var(--gold1),var(--gold2),var(--gold3));
  color:#111;
  transform:translateY(-3px);
  box-shadow:0 0 24px rgba(201,162,77,.45);
}

/* ---------------- CATEGORY PAGES ---------------- */

.category-page{
  padding:90px 30px 130px;
  background:linear-gradient(180deg,#050806,#07110f);
}

.category-header{
  max-width:1000px;
  margin:0 auto 50px;
  text-align:center;
}

.category-header h2{
  font-family:Cinzel,serif;
  color:var(--gold2);
  font-size:36px;
}

.category-header p{
  color:#d0d4d1;
  max-width:880px;
  margin:14px auto 0;
}

/* -------- ITEM GRID -------- */
.items-grid{
  max-width:1300px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:30px;
  justify-items:center;
}

/* -------- GEM ITEM CARD -------- */
.item-card{
  width:100%;
  max-width:280px;
  background:
    linear-gradient(180deg,#070b09,#020403);
  border:1px solid rgba(201,162,77,.22);
  padding:16px;
  text-align:center;
  transition:.35s ease;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(0,0,0,.65);
}

.item-card:hover{
  transform:translateY(-8px);
  box-shadow:0 30px 70px rgba(0,0,0,.8);
}

.item-title{
  font-family:Cinzel,serif;
  color:var(--gold2);
  font-size:1rem;
  margin:10px 0 4px;
}

.item-desc{
  color:#cfd4d1;
  font-size:.85rem;
}

/* ================= MODAL FIX ================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .35s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #050805;
  max-width: 980px;
  width: 92%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
  border: 1px solid rgba(212,175,55,.25);
  transform: scale(.9);
  opacity: 0;
  transition: all .35s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
  opacity: 1;
}

.modal-left img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* =============================
   MODAL CLOSE — SAPPHIRE STYLE
   ============================= */

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;

  background: transparent;     /* 🔥 no box */
  border: none;                /* 🔥 no border */
  box-shadow: none;

  color: #d4af37;              /* FACETRA gold */
  font-size: 26px;
  font-weight: 400;
  line-height: 1;

  cursor: pointer;
  z-index: 10001;

  padding: 6px;                /* larger tap area */
  transition: opacity .25s ease, transform .25s ease;
}

.modal-close:hover {
  opacity: 0.75;
  transform: scale(1.05);
}

.modal-close:focus {
  outline: none;
}


/* modal text */
.modal-right{
  padding:36px 34px;
  color:#cfd4d1;
}

.modal-title{
  font-family:Cinzel,serif;
  color:var(--gold2);
  font-size:1.45rem;
  margin-bottom:10px;
}

.modal-meta{
  color:#d9d3b4;
  margin-bottom:14px;
}

.modal-desc{
  line-height:1.9;
  margin-bottom:22px;
  max-width:520px;
}

.modal-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

/* buttons */
.btn-ghost{
  padding:10px 20px;
  border:1px solid rgba(201,162,77,.35);
  color:var(--gold2);
  text-decoration:none;
}

.btn-primary{
  padding:10px 22px;
  border:1px solid var(--gold2);
  background:linear-gradient(135deg,var(--gold1),var(--gold2),var(--gold3));
  color:#111;
  text-decoration:none;
}

/* close button */
.modal-close{
  position:absolute;
  top:16px;
  right:20px;
  font-size:28px;
  color:var(--gold2);
  cursor:pointer;
}

/* ---------------- FADE TRANSITION ---------------- */
.fade{
  opacity:0;
  transform:scale(1.02);
  transition:.45s ease;
}

.fade.show{
  opacity:1;
  transform:scale(1);
}

/* ---------------- MOBILE ---------------- */
@media(max-width:900px){

  .collection-hero{
    padding:90px 18px 60px;
  }

  .collection-grid{
    gap:30px;
  }

  .collection-card{
    padding:24px;
  }

  .items-grid{
    grid-template-columns:repeat(2,1fr);
    gap:20px;
  }

  .modal-box{
    grid-template-columns:1fr;
  }

  .modal-right{
    padding:22px;
  }

}

@media(max-width:520px){
  .items-grid{
    grid-template-columns:1fr;
  }
}


.diamonds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

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

@media (max-width: 900px) {
  .diamonds-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .diamonds-grid {
    grid-template-columns: 1fr;
  }
}


.item-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .6s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .6s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-left img {
  transition: transform .4s ease;
}
.modal-left img:hover {
  transform: scale(1.06);
}



/* ================= MODAL MOBILE FIX ================= */
.modal-overlay {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-box {
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .modal-box {
    flex-direction: column;
    width: 92%;
    max-height: 92vh;
  }

  .modal-left img {
    width: 100%;
    height: auto;
  }

  .modal-right {
    padding: 20px;
  }

  .modal-title {
    font-size: 1.4rem;
  }

  .modal-desc {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}


/* ================= IMAGE ZOOM ================= */
.item-thumb img,
.modal-left img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.modal-left img:hover {
  transform: scale(1.08);
}

/* ================= HERO – COLLECTION & DIAMONDS (FINAL) ================= */

.collection-hero {
  min-height: 42vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 90px;
  background: radial-gradient(circle at top, #142019, #050806 70%);
}

.collection-hero .hero-inner {
  max-width: 920px;
  margin: 0 auto;
}

.collection-hero .hero-title {
  font-family: Cinzel, serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: var(--gold2);
  letter-spacing: 2px;
  line-height: 1.15;
}

.collection-hero .hero-description {
  margin-top: 18px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #d0d4d1;
}

/* MOBILE */
@media (max-width: 768px) {
  .collection-hero {
    padding: 90px 18px 60px;
    min-height: auto;
  }

  .collection-hero .hero-title {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .collection-hero .hero-description {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}


/* === MOBILE CARD SHADOW REDUCTION === */
@media (max-width: 768px) {
  .item-card {
    box-shadow: 0 8px 18px rgba(0,0,0,0.55);
    transform: none;
  }

  .item-card:hover {
    transform: none;
    box-shadow: 0 10px 22px rgba(0,0,0,0.6);
  }
}



/* === MOBILE TAP TARGET BOOST === */
@media (max-width: 768px) {
  .item-card {
    padding: 20px;
  }

  .item-title {
    margin-top: 14px;
  }

  .item-desc {
    margin-bottom: 10px;
    line-height: 1.5;
  }
}


/* === DISABLE HOVER ZOOM ON TOUCH DEVICES === */
@media (hover: none) {
  .item-card:hover img,
  .modal-left img:hover {
    transform: none;
  }
}
