/*
 * NOWON Band - Shopping Bag page (bag.html)
 * Lines and numbers are rendered by assets/js/pages/bag.js from the real bag.
 *
 * TABLE OF CONTENTS
 *  1. Section heads
 *  2. Your bag: lines
 *  3. Your bag: quantity and price
 *  4. Your bag: summary
 *  5. Your bag: empty state
 *  6. Free shipping
 *  7. Make it a set
 *  8. Before you go
 *  9. Media queries
 */

/* ==========================================================================
   1. Section heads
   ========================================================================== */
.bag .section-head,
.bag-free .section-head,
.bag-set .section-head,
.bag-info .section-head {
  margin-bottom: 48px;
}

/* ==========================================================================
   2. Your bag: lines
   ========================================================================== */
.bag__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  align-items: start;
  gap: 40px clamp(30px, 4vw, 70px);
}

.bag__main {
  min-width: 0;
}

.bag__table {
  border-top: 2px solid var(--cream);
}

.bag__table[hidden] {
  display: none;
}

.bag__thead {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 237, 216, .14);
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .25em;
}

.bag__thead-qp {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 180px;
}

.bag__lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bag__line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 20px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(245, 237, 216, .14);
  transition: background-color .2s ease;
}

.bag__line:hover,
.bag__line:focus-within {
  background: rgba(245, 237, 216, .04);
}

.bag__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
}

/* The frame sits above the photo so the hover colour shows on covers too. */
.bag__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px var(--line);
  pointer-events: none;
  transition: box-shadow .2s ease;
}

.bag__line:hover .bag__thumb::after,
.bag__line:focus-within .bag__thumb::after {
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.bag__info {
  min-width: 0;
}

.bag__cat {
  color: var(--acc);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .25em;
}

.bag__name {
  margin-top: 6px;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  transition: color .2s ease;
}

.bag__line:hover .bag__name,
.bag__line:focus-within .bag__name {
  color: var(--acc);
}

.bag__desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.bag__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.bag__opt {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--line-3);
  font-family: var(--font);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .15em;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.bag__opt:hover {
  box-shadow: inset 0 0 0 1.5px var(--cream);
}

.bag__opt.is-on {
  background: var(--cream);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--cream);
}

.bag__remove {
  display: block;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .15em;
  cursor: pointer;
  transition: color .2s ease;
}

.bag__remove:hover {
  color: var(--error);
}

/* ==========================================================================
   3. Your bag: quantity and price
   ========================================================================== */
.bag__qp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 180px;
}

.bag-qty {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1.5px solid var(--line-3);
  border-radius: 999px;
}

.bag-qty__btn {
  width: 40px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: color .2s ease;
}

.bag-qty__btn:hover {
  color: var(--acc);
}

.bag-qty__n {
  display: block;
  min-width: 20px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bag__price {
  display: block;
  text-align: right;
}

.bag__total {
  display: block;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.bag__each {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

/* ==========================================================================
   4. Your bag: summary
   ========================================================================== */
.bag__sum {
  position: sticky;
  top: 124px;
  padding: 28px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.bag__rows {
  margin: 16px 0 0;
  border-top: 2px solid var(--cream);
}

.bag__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.bag__row dd {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.bag__row.is-acc {
  color: var(--acc);
}

.bag__promo {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.bag__code {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .2);
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .1em;
  outline: none;
  transition: box-shadow .2s ease;
}

.bag__code::placeholder {
  color: var(--faint);
}

.bag__code:focus {
  box-shadow: inset 0 0 0 1.5px var(--cream);
}

.bag__code.is-on {
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.bag__code.is-bad {
  box-shadow: inset 0 0 0 1.5px var(--error);
}

.bag__apply {
  height: 46px;
  padding: 0 18px;
  font-size: 11px;
  letter-spacing: .2em;
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .35);
}

.bag__msg {
  min-height: 16px;
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
}

.bag__msg.is-on {
  color: var(--acc);
}

.bag__msg.is-bad {
  color: var(--error);
}

.bag-tick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .14);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.bag__gift {
  margin-top: 8px;
}

.bag-tick__box {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--acc);
  font-size: 13px;
}

.bag-tick[aria-pressed="true"] {
  background: var(--acc-10);
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.bag-tick[aria-pressed="true"] .bag-tick__box {
  background: var(--acc);
}

.bag-tick[aria-pressed="true"] .bag-tick__box::before {
  content: "✓";
}

.bag__grand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.bag__grand-label {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .25em;
}

.bag__grand-value {
  display: block;
  font-weight: 900;
  font-size: clamp(48px, 4.4vw, 64px);
  line-height: .85;
  letter-spacing: -.05em;
  white-space: nowrap;
}

.bag__checkout {
  height: 60px;
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: .2em;
}

.bag__checkout.is-off {
  background: rgba(245, 237, 216, .12);
  color: var(--faint);
}

.bag__continue {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .2em;
  text-align: center;
  text-decoration: none;
}

.bag__continue:hover {
  color: var(--cream);
}

/* ==========================================================================
   5. Your bag: empty state
   ========================================================================== */
.bag__empty {
  padding: 60px 0;
  border-top: 2px solid var(--cream);
  border-bottom: 1px solid rgba(245, 237, 216, .14);
}

.bag__empty[hidden] {
  display: none;
}

.bag__empty-word {
  font-size: clamp(48px, 6vw, 96px);
  line-height: .95;
}

.bag__empty-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.bag__empty-btn {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .2em;
}

/* ==========================================================================
   6. Free shipping
   ========================================================================== */
.bag-free__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}

.bag-free__fill {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: 4px;
  background: var(--acc);
  transition: width .5s ease;
}

.bag-free__scale {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.bag-free__addons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.bag-add {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .14);
  transition: background-color .2s ease, box-shadow .2s ease;
}

.bag-add.is-gets,
.bag-add:hover,
.bag-add:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.bag-add:hover,
.bag-add:focus-within {
  background: var(--surface);
}

.bag-add__thumb {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.bag-add__body {
  min-width: 0;
}

.bag-add__name {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
}

.bag-add__note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.bag-add__btn {
  max-width: 100%;
  height: 36px;
  margin-top: 10px;
  padding: 0 14px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--acc);
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .2em;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.bag-add.is-in .bag-add__btn,
.bag-add:hover .bag-add__btn,
.bag-add:focus-within .bag-add__btn {
  background: var(--acc);
  color: var(--ink);
}

/* ==========================================================================
   7. Make it a set
   ========================================================================== */
.bag-set__box {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  padding: clamp(22px, 2.6vw, 36px);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .3s ease;
}

.bag-set__box.is-on {
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.bag-set__items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bag-set__item {
  min-width: 0;
}

.bag-set__media {
  position: relative;
}

.bag-set__img {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  opacity: .55;
  transition: opacity .3s ease;
}

.bag-set__img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(245, 237, 216, .14);
  pointer-events: none;
}

.bag-set__item.is-have .bag-set__img {
  opacity: 1;
}

.bag-set__item.is-have .bag-set__img::after {
  box-shadow: inset 0 0 0 2px var(--acc);
}

.bag-set__mark {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--acc);
  box-shadow: inset 0 0 0 2px var(--acc);
  font-weight: 800;
  font-size: 14px;
}

.bag-set__item.is-have .bag-set__mark {
  background: var(--acc);
  color: var(--ink);
}

.bag-set__name {
  margin-top: 10px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
}

.bag-set__state {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.bag-set__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-top: 12px;
}

.bag-set__was {
  color: var(--muted);
  font-size: 18px;
}

.bag-set__now {
  font-weight: 900;
  font-size: clamp(56px, 5vw, 80px);
  line-height: .85;
  letter-spacing: -.05em;
}

.bag-set__line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.bag-set__cta {
  width: 100%;
  height: 58px;
  margin-top: 22px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--acc);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--acc);
  font-family: var(--font);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .2em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.bag-set__cta:hover {
  transform: translateY(-2px);
}

.bag-set__cta.is-on {
  background: transparent;
  color: var(--acc);
}

/* ==========================================================================
   8. Before you go
   ========================================================================== */
.bag-info__chips {
  gap: 8px;
}

.bag-info__chip {
  min-height: 44px;
  letter-spacing: .2em;
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .25);
}

.bag-info__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.bag-info__card {
  min-width: 0;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bag-info__label {
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .25em;
}

.bag-info__value {
  margin-top: 12px;
  font-weight: 900;
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: .95;
  letter-spacing: -.04em;
}

.bag-info__value.is-acc {
  color: var(--acc);
}

.bag-info__note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   9. Media queries
   ========================================================================== */
@media (max-width: 1199px) {
  .bag-free__addons,
  .bag-info__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1099px) {
  .bag__grid,
  .bag-set__box {
    grid-template-columns: minmax(0, 1fr);
  }

  .bag__sum {
    position: static;
  }
}

@media (max-width: 759px) {
  .bag__thead,
  .bag__line {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .bag__thead-qp {
    display: none;
  }

  .bag__qp {
    grid-column: 1 / -1;
    min-width: 0;
  }
}

@media (max-width: 639px) {
  .bag-free__addons,
  .bag-info__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 479px) {
  .bag__sum {
    padding: 22px 18px;
  }

  .bag-set__items {
    gap: 8px;
  }

  .bag-set__mark {
    right: 6px;
    top: 6px;
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .bag-set__name {
    font-size: 13px;
  }

  .bag-set__cta {
    letter-spacing: .12em;
  }
}
