/* ===== CloudCloset: Outfit Result Page ===== */

/* Variables */
:root {
  --cc-ribbon: #D1E5F4;
  --cc-shadow: 0 6px 18px rgba(0,0,0,.06);
  --cc-shadow-lg: 0 10px 26px rgba(0,0,0,.10);
}

/* Base */
#cc-outfit-root,
#cc-loading,
.cc-loading,
.cc-collage,
.cc-outfit,
.cc-outfit-buttons {
  font-family: 'Titillium Web', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- Loader (works for #cc-loading and .cc-loading) ---------- */
#cc-loading,
.cc-loading {
  position: fixed;
  top: 40px;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-size: 14pt;
  z-index: 9999;
}
#cc-loading .cc-hourglass { /* legacy hourglass */
  display: inline-block;
  font-size: 22px;
  animation: cc-spin 1s linear infinite;
  transform-origin: 50% 55%;
}
.cc-loading .spinner {           /* new spinner used by JS */
  display:inline-block; width:1em; height:1em;
  border:.18em solid #ddd; border-top-color:#111;
  border-radius:50%; animation: cc-spin .9s linear infinite;
  margin-right:.5em; vertical-align:-.12em;
}
@keyframes cc-spin { to { transform: rotate(360deg); } }


/* ---------- Moodboard section ---------- */
.cc-collage-wrap {
  max-width: 1100px;
  margin: 8px auto 24px;
  padding: 0 12px;
  text-align: center;
}
.cc-collage-title {
  font-size: 30px;
  font-weight: 700;
  margin: 10px 0 12px;
}
.cc-collage {
  display: flex;
  justify-content: center;
}
.cc-collage img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ---------- Product grid: centered & responsive ---------- */
.cc-outfit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto 28px;
  padding: 0 12px;
}

/* ---------- Card ---------- */
.cc-outfit-item {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--cc-shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cc-outfit-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--cc-shadow-lg);
}

/* Image area (square, clickable) */
.cc-thumb {
  position: relative;
  width: 100%;
  padding-top: 100%;        /* 1:1 square */
  background: #f8fafc;
}
.cc-thumb a,
.cc-thumb img,
.cc-thumb .cc-missing {
  position: absolute;
  inset: 10px;
}
.cc-thumb a { display: block; }
.cc-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.cc-thumb a,
.cc-info a {
  color: inherit;
  text-decoration: none;
}
.cc-thumb a:hover,
.cc-info a:hover {
  text-decoration: underline;
}
.cc-missing {
  display: grid; place-items: center;
  background: #f2f4f8; color: #6b7280;
  font-size: 12px; border-radius: 10px;
}

/* Diagonal store ribbon */
.cc-ribbon {
  position: absolute;
  top: 14px; left: -44px;
  width: 160px; text-align: center;
  transform: rotate(-45deg);
  background: var(--cc-ribbon); color: #111;
  font-weight: 600; font-size: 11px; letter-spacing: .2px;
  padding: 6px 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  pointer-events: none;
}

/* Text under image: “Name: $Price (Retry Image)” */
.cc-info {
  padding: 12px 14px 10px;
  text-align: left;
}
.cc-info .cc-line {
  font-size: 15px;
  font-weight: 600;
}
.cc-info .cc-line .cc-price { margin-left: 6px; }
.cc-retry {
  margin-left: 6px;
  font-size: 12px;
  color: #6b7280;
  text-decoration: underline;
  background: transparent;
  border: none;
  cursor: pointer;
}
.cc-retry:hover { color: #111; }

/* ---------- Buttons row ---------- */
.cc-outfit-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 10px auto 36px;
}
#cc-email-fit, #cc-start-over {
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid #111;
  background: #fff;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
#cc-email-fit:hover, #cc-start-over:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  background: #f8fafc;
}

/* ---------- Small screens polish ---------- */
@media (max-width: 520px){
  .cc-collage-title { font-size: 22px; }
  .cc-outfit { grid-template-columns: repeat(2, 1fr); }
}
.cc-accuracy{
  font-family: 'Titillium Web', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14pt;
  text-align: center;
  margin: 8px 0 6px;
  color: #111;
}
.cc-grid-title { text-align: center; } /* ensure centered grid heading */



