@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --fd: var(--mgk-font);
  --fs: var(--mgk-font);

  /* Brand Colors */
  --g: #165DFF;
  --g-h: #0E3B81;
  --g-d: #0A2A5C;
  --g-t: #EEF2FF;
  --g-t2: #F5F8FF;
  --ink: #191817;
  --ink-2: #54524D;
  --ink-3: #8A8780;
  --line: rgba(25, 24, 23, 0.13);
  --line-2: rgba(25, 24, 23, 0.06);
  --line-d: rgba(25, 24, 23, 0.22);
  --red: #D0342C;
  --red-t: #FCEBE9;
  --amb: #D9962A;
  --amb-t: #FCF2DE;
  --green: #15774A;
  --green-t: #E7F1E9;
  --paper: #FFFFFF;
  --wash: #FAF9F7;
  --warm: #FCF2DE;
  --r: 8px;
  --r-b: 8px;
  --r-s: 5px;
  --wrap: 1600px;
  --gut: 28px;
  --e: cubic-bezier(0.25, 0.8, 0.35, 1);
  --t1: 150ms;
  --t2: 260ms;
}

/* Base Scope */
.dealpage {
  background: var(--wash);
  min-height: 100vh;
  font-family: var(--fs);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 60px;
}

.dealpage *,
.dealpage *::before,
.dealpage *::after {
  box-sizing: border-box;
}

.dealpage .wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.dealpage .wrap.pg {
  padding-top: 24px;
  padding-bottom: 40px;
}

/* Typography Helpers */
.dealpage .num {
  font-variant-numeric: tabular-nums;
}

.dealpage .mut {
  color: var(--ink-3);
}

.dealpage .eb {
  font-size: 11.5px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 1.35px;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 4px;
}

/* Breadcrumb */
.dealpage .crumb {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dealpage .crumb a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t1);
}

.dealpage .crumb a:hover {
  color: var(--g);
}

.dealpage .crumb span {
  color: var(--ink);
  font-weight: 600;
}

/* Category Filter Tabs (.fd-tabs) */
.fd-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 24px;
}

.fd-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: var(--paper-2);
  
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--t1);
  box-sizing: border-box;
}

.fd-tab:hover {
  background: var(--line);
  color: var(--ink);
  border-color: var(--line-d);
}

.fd-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
  font-weight: 700;
}

.fd-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 11.5px;
  font-weight: 700;
}

.fd-tab.is-active .fd-tab__count {
  background: #FFFFFF;
  color: var(--ink);
}

/* ==========================================================================
   1. MALL FLASH SALE HERO BAND (.dband) — Exactly 164px Height
   ========================================================================== */
.dband {
  margin-top: 38px;
  height: 164px;
  min-height: 164px;
  max-height: 164px;
  background: var(--g-t);
  border-top: 1px solid rgba(22, 93, 255, 0.14);
  border-bottom: 1px solid rgba(22, 93, 255, 0.14);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 0 20px;
}

.dband .wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
  box-sizing: border-box;
}

.dband-in {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 56px;
}

.dband-lock {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.dband-mall {
  background: var(--g);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
}

.dband-lock b {
  font-size: 22px;
  font-weight: 800;
  color: var(--g);
  letter-spacing: -0.01em;
}

.dband-lock em {
  font-style: normal;
  font-size: 20px;
  font-weight: 500;
  color: var(--g);
}

.dband-m {
  flex: 1;
  min-width: 280px;
}

.dband-m h1 {
  font-family: var(--fd);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}

.dband-m h1 b {
  color: var(--g);
}

.dband-m p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.dband-r {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: auto;
}

.dband-lbl {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--g);
  letter-spacing: 0.08em;
  text-align: right;
  line-height: 1.25;
  width: 34px;
}

.dband-clock {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dband-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dband-cell b {
  min-width: 42px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #B3CBFF;
  border-radius: 7px;
  color: var(--g);
  font-size: 15px;
  font-weight: 800;
}

.dband-cell.solid b {
  background: var(--g);
  border-color: var(--g);
  color: #FFFFFF;
}

.dband-cell em {
  font-style: normal;
  font-size: 7px;
  font-weight: 800;
  color: var(--g);
  letter-spacing: 0.06em;
}

.dband-col {
  color: var(--g);
  font-weight: 800;
  font-size: 15px;
  margin-top: -10px;
}

.dband-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
}

.dband-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--g);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  transition: background var(--t1);
}

.dband-btn:hover {
  background: var(--g-h);
  color: #FFFFFF;
}

.dband-save {
  font-size: 12.5px;
  color: var(--ink-2);
}

.dband-save b {
  color: var(--ink);
}

/* ==========================================================================
   2. SECTION HEADINGS (.sh)
   ========================================================================== */
.sh {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 32px 0 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sh h2 {
  font-family: var(--fd);
  font-size: 22px;
  font-weight: 800 !important;
  color: var(--mgk-text);
  margin: 0;
}

.sh p {
  font-size: 13px;
  color: var(--ink-2);
  margin: 4px 0 0;
}

.sh-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--g);
  text-decoration: none;
  transition: color var(--t1);
  white-space: nowrap;
}

.sh-link:hover {
  color: var(--g-h);
  text-decoration: underline;
}

/* Sort dropdown in section heading */
.sh .mgk-sale__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.sh .mgk-sale__sort-label {
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
}

.sh .mgk-sale__sort-select {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  height: 38px;
  line-height: 20px;
  border: 1px solid var(--line-d);
  color: var(--ink);
  background-color: var(--paper);
  border-radius: 999px;
  padding: 0 36px 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23191817' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  transition: border-color var(--t1);
}

.sh .mgk-sale__sort-select:hover,
.sh .mgk-sale__sort-select:focus {
  border-color: var(--g);
  outline: none;
}

/* ==========================================================================
   3. PRODUCT DEALS GRID (.grid.g4) & CANONICAL CARDS (.mgk-prod)
   ========================================================================== */
.grid {
  display: grid;
  gap: 20px;
}

.grid.g4 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
}

.mgk-sale__deal-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mgk-sale__deal-wrap .mgk-prod {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  
  border-radius: var(--r);
  transition: transform var(--t2) var(--e), border-color var(--t1), box-shadow var(--t2);
}


/* Remove faint grey borders from sale progress in cards */
.mgk-sale__progress {
  border-top: none !important;
  border-bottom: none !important;
  padding: 4px 0 6px !important;
}

/* Media / Image */
.pc-img {
  position: relative;
  height: 154px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-s);
  overflow: hidden;
  margin-bottom: 10px;
  background: #F8F7F4;
}

.pc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t2) var(--e);
}

.pc:hover .pc-img img {
  transform: scale(1.05);
}

/* Wishlist Heart Button */
.wish {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all var(--t1);
}

.wish:hover {
  background: #FFFFFF;
  color: var(--red);
  transform: scale(1.1);
}

/* Badges Stack */
.bgs {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chip-g { background: var(--green-t); color: var(--green); }
.chip-a { background: var(--amb-t); color: var(--amb); }
.chip-r { background: var(--red-t); color: var(--red); }

/* Details */
.pc-cat {
  font-size: 11.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.pc h3 {
  font-family: var(--fs);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.32;
  margin: 4px 0 6px;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.64em;
}

.pc h3 a {
  color: var(--ink);
  text-decoration: none;
}

.pc h3 a:hover {
  color: var(--g);
}

/* Stars */
.stars {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--amb);
  font-size: 11.5px;
  margin-bottom: 6px;
}

.stars svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.stars .count {
  color: var(--ink-3);
  margin-left: 4px;
}

.pc-by {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.pc-by b {
  color: var(--g);
  font-weight: 600;
}

/* Burn Meter */
.burn {
  margin-bottom: 12px;
}

.burn-r {
  width: 100%;
  height: 5px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}

.burn-f {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.4s var(--e);
}

.burn.hot .burn-f {
  background: var(--red);
}

.burn-t {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  margin-top: 4px;
}

.burn-t span {
  color: var(--ink-3);
}

.burn-t b {
  color: var(--ink-2);
}

/* Footer / Price & Add CTA */
.pc-ft {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
}

.pz {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.pz.sale {
  color: var(--red);
}

.s {
  font-size: 12px;
  color: var(--ink-3);
  text-decoration: line-through;
  font-weight: 400;
}

.ex {
  font-size: 10.5px;
  color: var(--ink-3);
  display: block;
}

/* Add Button */
.add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-b);
  border: 1px solid var(--line-d);
  background: var(--paper);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t1);
  white-space: nowrap;
}

.add:hover {
  background: var(--g);
  border-color: var(--g);
  color: #FFFFFF;
}

.add:active {
  transform: scale(0.97);
}

.add.added {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #FFFFFF !important;
}

.add.dis {
  opacity: 0.5;
  pointer-events: none;
  background: var(--wash);
}

/* ==========================================================================
   4. RECENTLY ENDED SECTION (.ended)
   ========================================================================== */
.ended {
  margin-top: 48px;
  padding-top: 12px;
}

.ended .pc {
  opacity: 0.85;
}

.ended .pc:hover {
  opacity: 1;
}

/* ==========================================================================
   5. SEASONAL COLLECTIONS TILES (.coll)
   ========================================================================== */
.coll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.coll {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink);
  text-decoration: none;
  transition: transform var(--t2) var(--e), box-shadow var(--t2);
}

.coll:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(25, 24, 23, 0.35);
}

.coll > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--e);
}

.coll:hover > img {
  transform: scale(1.06);
}

.coll::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 20, 12, 0.9) 0%, rgba(12, 20, 12, 0.45) 45%, rgba(12, 20, 12, 0.05) 80%);
}

.coll-c {
  position: relative;
  z-index: 2;
  padding: 20px;
  color: #FFFFFF;
}

.coll-c b {
  display: block;
  font-family: var(--fd);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.coll-c em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

.coll-l {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 1px;
}

/* Spinner */
.fd-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: fdSpin 0.6s linear infinite;
}

@keyframes fdSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   5. PAGINATION (.fd-pagination) — Clean & Borderless
   ========================================================================== */
.fd-pagination {
  margin: 36px 0 20px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.fd-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fd-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: var(--r-s);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: all var(--t1);
  box-sizing: border-box;
}

.fd-pagination a.page-numbers:hover {
  background: var(--paper-2);
  color: var(--g);
}

.fd-pagination .page-numbers.current {
  background: var(--g);
  color: #FFFFFF;
  font-weight: 700;
}

.fd-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: var(--ink-3);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .grid.g4 {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .grid.g4 {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
  }
  .coll-grid {
    grid-template-columns: 1fr;
  }
  .dband-in {
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .dealpage .wrap.pg {
    padding-top: 16px;
  }
  .dband {
    height: auto;
    min-height: 164px;
    max-height: none;
    padding: 16px 0;
  }
  .dband-in {
    padding: 0 var(--gut);
    height: auto;
    flex-wrap: wrap;
    gap: 12px;
  }
  .dband-lock b {
    font-size: 18px;
  }
  .dband-lock em {
    font-size: 16px;
  }
  .dband-cta {
    padding: 10px var(--gut) 0;
    height: auto;
    flex-wrap: wrap;
  }
  .grid.g4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .pc {
    padding: 8px;
  }
  .pc-img {
    height: 120px;
  }
  .pc h3 {
    font-size: 12.5px;
  }
  .add {
    height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }
}
