/* ===================================================
   MASK TICKER STRIP — SkinPlanner
   =================================================== */

/* ── Section wrapper ── */
.mask-ticker-section {
  width: 100%;
  background: linear-gradient(135deg, #FDF5F0 0%, #F5EFF8 100%);
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 18px 0 22px;
  overflow: hidden;
  position: relative;
}

.mask-ticker-section::before,
.mask-ticker-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 3;
  pointer-events: none;
}
.mask-ticker-section::before {
  left: 0;
  background: linear-gradient(to right, #FDF5F0 0%, transparent 100%);
}
.mask-ticker-section::after {
  right: 0;
  background: linear-gradient(to left, #FDF5F0 0%, transparent 100%);
}

/* ── Header row ── */
.mask-ticker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 14px;
}
.mask-ticker-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E8A0BF;
  background: rgba(232,160,191,0.12);
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid rgba(232,160,191,0.3);
  white-space: nowrap;
}
.mask-ticker-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(232,160,191,0.3) 0%, transparent 100%);
}

/* ── Viewport ── */
.mask-ticker-viewport {
  overflow: hidden;
  cursor: grab;
  position: relative;
}
.mask-ticker-viewport:active {
  cursor: grabbing;
}

/* ── Scrolling track ── */
.mask-ticker-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: maskTickerScroll 38s linear infinite;
  padding: 4px 2px 6px;
}
.mask-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes maskTickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Individual card ── */
.ticker-card {
  width: 164px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  border: 1px solid rgba(0,0,0,0.06);
}
.ticker-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 28px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
}
.ticker-card:active {
  transform: translateY(-2px) scale(1.01);
}

/* ── Card top (tinted image area) ── */
.ticker-card-top {
  position: relative;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ticker-card-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
  display: block;
}
.ticker-card:hover .ticker-card-top img {
  transform: scale(1.06);
}

/* ── Price badge (top-right corner) ── */
.ticker-price-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 3px 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #2D2D2D;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.8);
  z-index: 2;
  line-height: 1.4;
}

/* ── Type badge (top-left corner) ── */
.ticker-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 6px;
  padding: 2px 7px;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
  line-height: 1.5;
  color: rgba(0,0,0,0.65);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
}

/* ── Card bottom (info area) ── */
.ticker-card-body {
  padding: 10px 10px 12px;
}
.ticker-card-brand {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8A8A8A;
  margin-bottom: 3px;
}
.ticker-card-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: #2D2D2D;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

/* ── View detail hint ── */
.ticker-card-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #E8A0BF;
  letter-spacing: 0.04em;
}
.ticker-card-cta::after {
  content: '→';
  font-size: 11px;
}

/* ======================================================
   MASK MODAL OVERLAY
   ====================================================== */

.mask-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.mask-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.mask-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mask-modal-overlay.is-open .mask-modal {
  transform: translateY(0) scale(1);
}

/* ── Modal image header ── */
.mask-modal-img-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
}
.mask-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.mask-modal-img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.18) 100%);
}

/* ── Close button ── */
.mask-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: #2D2D2D;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.18s ease, transform 0.18s ease;
  z-index: 2;
}
.mask-modal-close:hover {
  background: #fff;
  transform: scale(1.08);
}

/* ── Modal body ── */
.mask-modal-body {
  padding: 22px 26px 28px;
}

.mask-modal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.mask-modal-brand-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(232,160,191,0.15);
  color: #C06090;
  border: 1px solid rgba(232,160,191,0.3);
}
.mask-modal-type-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  color: rgba(0,0,0,0.55);
  background: rgba(0,0,0,0.05);
}

.mask-modal-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #2D2D2D;
  line-height: 1.25;
  margin-bottom: 12px;
}

.mask-modal-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #5A5A5A;
}
.mask-modal-stars {
  color: #F0B429;
  font-size: 14px;
  letter-spacing: 1px;
}

.mask-modal-description {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: #5A5A5A;
  margin-bottom: 20px;
}

/* ── Price + buttons row ── */
.mask-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mask-modal-price {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #2D2D2D;
  letter-spacing: -0.02em;
}
.mask-modal-price-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #8A8A8A;
  display: block;
  margin-top: -2px;
}
.mask-modal-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

.mask-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.mask-modal-btn-ca {
  background: #E8A0BF;
  color: #fff;
  box-shadow: 0 3px 10px rgba(232,160,191,0.35);
}
.mask-modal-btn-ca:hover {
  background: #D88AAD;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(232,160,191,0.45);
  color: #fff;
}
.mask-modal-btn-us {
  background: #f5f5f5;
  color: #2D2D2D;
  border: 1px solid rgba(0,0,0,0.1);
}
.mask-modal-btn-us:hover {
  background: #ebebeb;
  transform: translateY(-1px);
  color: #2D2D2D;
}

/* ======================================================
   DARK MODE OVERRIDES
   ====================================================== */
body.dark-mode .mask-ticker-section {
  background: linear-gradient(135deg, #221820 0%, #1E1A28 100%);
  border-color: rgba(255,255,255,0.06);
}
body.dark-mode .mask-ticker-section::before {
  background: linear-gradient(to right, #221820 0%, transparent 100%);
}
body.dark-mode .mask-ticker-section::after {
  background: linear-gradient(to left, #221820 0%, transparent 100%);
}
body.dark-mode .ticker-card {
  background: #2A2028;
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
body.dark-mode .ticker-card:hover {
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
body.dark-mode .ticker-card-name {
  color: #F0EAEC;
}
body.dark-mode .ticker-card-brand {
  color: #7A7A7A;
}
body.dark-mode .ticker-price-badge {
  background: rgba(42,32,40,0.95);
  color: #F0EAEC;
  border-color: rgba(255,255,255,0.12);
}
body.dark-mode .mask-modal {
  background: #1E1A1C;
}
body.dark-mode .mask-modal-name {
  color: #F0EAEC;
}
body.dark-mode .mask-modal-description {
  color: #A0949A;
}
body.dark-mode .mask-modal-price {
  color: #F0EAEC;
}
body.dark-mode .mask-modal-btn-us {
  background: #2A2428;
  color: #F0EAEC;
  border-color: rgba(255,255,255,0.12);
}
body.dark-mode .mask-modal-btn-us:hover {
  background: #333038;
  color: #F0EAEC;
}
body.dark-mode .mask-modal-close {
  background: rgba(42,36,40,0.92);
  color: #F0EAEC;
}
body.dark-mode .mask-modal-close:hover {
  background: #2A2428;
}

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 768px) {
  .mask-ticker-section::before,
  .mask-ticker-section::after {
    width: 40px;
  }
  .ticker-card {
    width: 148px;
  }
  .ticker-card-top {
    height: 124px;
  }
  .mask-modal-img-wrap {
    height: 210px;
  }
  .mask-modal-body {
    padding: 18px 18px 24px;
  }
  .mask-modal-name {
    font-size: 17px;
  }
  .mask-modal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .mask-modal-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .mask-ticker-header {
    padding: 0 14px 12px;
  }
  .ticker-card {
    width: 140px;
  }
  .ticker-card-top {
    height: 116px;
  }
  .mask-modal-price {
    font-size: 22px;
  }
}
