:root {
  --ink: #3a332c;
  --ink-soft: #5c5348;
  --pine: #3d4a38;
  --parchment: #e8dcc8;
  --parchment-deep: #d9cbb4;
  --foam: rgba(247, 241, 230, 0.78);
  --glass: rgba(248, 242, 230, 0.62);
  --line: rgba(90, 78, 62, 0.22);
}

:root {
  --nav-bg: rgba(236, 228, 214, 0.78);
}

html[data-season="winter"] {
  --ink: #2b3238;
  --ink-soft: #4d5862;
  --pine: #2f4656;
  --line: rgba(60, 78, 92, 0.22);
  --nav-bg: rgba(232, 238, 242, 0.82);
}

html[data-season="spring"] {
  --pine: #4a6b3a;
  --nav-bg: rgba(240, 242, 226, 0.8);
}

html[data-season="summer"] {
  --pine: #2f5a46;
  --nav-bg: rgba(242, 236, 220, 0.8);
}

html[data-season="fall"] {
  --ink: #3b2a1f;
  --ink-soft: #5e4636;
  --pine: #7a3f1d;
  --line: rgba(110, 66, 36, 0.24);
  --nav-bg: rgba(244, 232, 214, 0.82);
}

html[data-season="winter"] .sky-veil {
  background: linear-gradient(180deg, rgba(30, 44, 58, 0.18) 0%, rgba(30, 44, 58, 0.12) 40%, rgba(22, 32, 44, 0.32) 100%);
}

html[data-season="fall"] .sky-veil {
  background: linear-gradient(180deg, rgba(40, 22, 10, 0.1) 0%, transparent 30%, rgba(30, 16, 8, 0.2) 100%);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(ellipse at 50% 20%, #7a8a6a 0%, transparent 50%),
    linear-gradient(180deg, #cfc6b0 0%, #6d7a5c 42%, #2f382c 100%);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  background:
    radial-gradient(ellipse at 50% 18%, #e8eadc 0 12%, transparent 40%),
    linear-gradient(180deg, #b7c2a8 0%, #4f5d45 55%, #243024 100%);
}

.sky-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(28, 36, 24, 0.12) 0%,
      transparent 28%,
      rgba(20, 26, 18, 0.1) 100%
    );
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 4vw;
  overflow: visible;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
}

.logo img {
  height: 58px;
  width: auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
}

.logo img:not([src]),
.logo img[src=""] {
  display: none;
}

nav {
  display: flex;
  gap: 1.8rem;
}

nav a,
.cart-btn {
  font: inherit;
  color: var(--pine);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 400;
}

nav a:hover,
.cart-btn:hover {
  color: var(--ink);
}

.cart-btn {
  border: 1px solid rgba(61, 74, 56, 0.28);
  background: var(--glass);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  letter-spacing: 0.14em;
}

.collection {
  padding: 2.2rem 5vw 5rem;
  scroll-margin-top: 5.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.card {
  position: relative;
  background: rgba(247, 241, 230, 0.38);
  border: 1px solid rgba(255, 250, 240, 0.4);
  border-radius: 1.2rem;
  overflow: hidden;
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 32px rgba(58, 51, 44, 0.1);
  color: #f7f1e6;
  text-shadow: 0 1px 8px rgba(18, 24, 16, 0.7);
}

.card-candle {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  width: 22px;
  height: 28px;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(40, 36, 24, 0.35));
}

.card img:not(.card-candle) {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.05rem 2.8rem 1.1rem 1.15rem;
}

.card-body h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  font-weight: 600;
}

.sku {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: #efe6d4;
}

.stock {
  margin: 0.2rem 0 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #efe6d4;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.price {
  font-weight: 500;
}

.add,
.remove-card,
.bag-remove,
.bag-qty-btn,
#closeBag {
  font: inherit;
  cursor: pointer;
  color: var(--pine);
  border: 1px solid rgba(61, 74, 56, 0.28);
  background: var(--glass);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.card .add,
.card .remove-card {
  color: var(--pine);
  text-shadow: none;
}

.bag {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  background: rgba(28, 34, 24, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bag.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bag-panel {
  width: min(400px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f7f1e6;
  padding: 1.35rem 1.3rem 1.5rem;
  box-shadow: -16px 0 40px rgba(20, 26, 18, 0.28);
}

.bag-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.bag-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 2rem;
}

#bagList {
  list-style: none;
  flex: 1;
  overflow: auto;
  min-height: 8rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.9rem;
  background: #fffaf1;
  border: 1px solid var(--line);
}

#bagList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

#bagList li:last-child {
  border-bottom: 0;
}

#bagList li:only-child {
  min-height: 7rem;
  justify-content: center;
  color: var(--ink-soft);
}

.bag-info {
  display: grid;
  gap: 0.35rem;
}

.bag-qty,
.bag-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bag-qty-btn {
  min-width: 1.7rem;
  padding: 0.2rem 0.45rem;
}

.remove-card,
.bag-remove {
  color: #8b3a2a;
  border-color: rgba(139, 58, 42, 0.28);
}

.bag-total {
  margin: 1rem 0 0;
  font-weight: 500;
  flex-shrink: 0;
  padding-top: 0.4rem;
}

.pay-note,
.pay-error {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: #8b3a2a;
}

.pay-card,
.pay-paypal {
  width: 100%;
  margin-top: 0.55rem;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.04em;
}

.pay-card {
  border: 0;
  background: var(--pine);
  color: #f7f1e6;
}

.pay-paypal {
  border: 1px solid rgba(61, 74, 56, 0.28);
  background: #ffc439;
  color: var(--ink);
  font-weight: 500;
}

.pay-card:disabled,
.pay-paypal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.receipt-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 600;
  line-height: 0.95;
  color: #f7f1e6;
  text-shadow: 0 2px 12px rgba(18, 24, 16, 0.45);
}

.collection > p,
.receipt-lines {
  max-width: 36rem;
  margin-top: 1rem;
  color: #f7f1e6;
  text-shadow: 0 1px 8px rgba(18, 24, 16, 0.55);
}

.receipt-lines {
  list-style: none;
  padding: 0;
}

.receipt-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(247, 241, 230, 0.35);
}

.receipt-link {
  display: inline-block;
  width: auto;
  margin-top: 1.4rem;
  text-decoration: none;
  text-align: center;
}

.help {
  margin: 0 5vw 4rem;
  padding: 1.4rem 1.5rem;
  max-width: 36rem;
  border-radius: 1.2rem;
  background: rgba(247, 241, 230, 0.82);
  border: 1px solid rgba(255, 250, 240, 0.5);
  color: var(--ink);
  scroll-margin-top: 6rem;
}

.help h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 600;
}

.help p {
  margin-top: 0.35rem;
}

.help a,
.help-line a {
  color: var(--pine);
  font-weight: 500;
}

.help-line {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.collection > .help-line,
.collection > .help-line a {
  color: #f7f1e6;
  text-shadow: 0 1px 8px rgba(18, 24, 16, 0.55);
}

@media (max-width: 720px) {
  nav {
    display: none;
  }

  .logo img {
    height: 46px;
  }
}

html[data-season="winter"] .card {
  background: rgba(34, 50, 66, 0.46);
  border-color: rgba(220, 232, 242, 0.35);
}
