:root {
  --coffee-1: #1a120f;
  --coffee-2: #2a1b16;
  --coffee-3: #3b241d;
  --coffee-4: #5d4033;
  --gold: #d2a45e;
  --gold-soft: #f0d6ab;
  --text: #f7f1eb;
  --muted: rgba(255,255,255,0.74);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  --shadow-heavy: 0 28px 70px rgba(0, 0, 0, 0.34);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(210,164,94,0.08), transparent 20%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.04), transparent 18%),
    linear-gradient(180deg, #130d0b 0%, #241712 28%, #3b241d 62%, #2a1b16 100%);
  min-height: 100vh;
}

img { width: 100%; display: block; }

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.stars span {
  position: absolute;
  top: -10%;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 0 6px rgba(255,255,255,0.9), 0 0 12px rgba(255,255,255,0.45);
  animation: starMove linear infinite;
  opacity: .95;
}

.stars span:nth-child(1){left:4%;animation-duration:10s;width:4px;height:4px}
.stars span:nth-child(2){left:10%;animation-duration:13s;animation-delay:1s;width:6px;height:6px}
.stars span:nth-child(3){left:16%;animation-duration:11s;animation-delay:2s;width:5px;height:5px}
.stars span:nth-child(4){left:22%;animation-duration:14s;animation-delay:.5s;width:7px;height:7px}
.stars span:nth-child(5){left:29%;animation-duration:12s;animation-delay:1.5s;width:5px;height:5px}
.stars span:nth-child(6){left:36%;animation-duration:15s;animation-delay:2.5s;width:6px;height:6px}
.stars span:nth-child(7){left:43%;animation-duration:11s;animation-delay:.7s;width:4px;height:4px}
.stars span:nth-child(8){left:51%;animation-duration:14s;animation-delay:1.7s;width:6px;height:6px}
.stars span:nth-child(9){left:58%;animation-duration:10s;animation-delay:2.4s;width:5px;height:5px}
.stars span:nth-child(10){left:65%;animation-duration:13s;animation-delay:1.1s;width:6px;height:6px}

@keyframes starMove {
  0% { transform: translateY(-12vh) translateX(0) scale(.9); opacity: 0; }
  10% { opacity: .95; }
  100% { transform: translateY(110vh) translateX(24px) scale(1.02); opacity: .18; }
}

.topbar {
  width: min(1200px, calc(100% - 32px));
  margin: 18px auto;
  padding: 14px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 16px;
  z-index: 50;
}

.brand-wrap { display: flex; align-items: center; gap: 12px; }

.logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--coffee-3), var(--coffee-4));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
}

.brand-name { font-family: 'Playfair Display', serif; font-size: 1.15rem; }
.brand-tag { font-size: .78rem; opacity: .72; }

#nav-toggle { display: none; }
.hamburger { display: none; }

.navbar { display: flex; flex-wrap: wrap; gap: 10px; }

.navbar a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  transition: .3s ease;
}

.navbar a:hover,
.navbar a.active {
  background: rgba(255,255,255,.14);
  color: #fff;
  transform: translateY(-2px);
}

.payment-page {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 24px;
  position: relative;
  z-index: 2;
}

.payment-hero {
  position: relative;
  overflow: hidden;
  min-height: 38vh;
  margin-top: 8px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  padding: 50px 28px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03)),
    linear-gradient(135deg, #1a120f, #2f1f19 55%, #3d281f);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-heavy);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(210,164,94,.12), transparent 24%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .22;
  animation: floatGlow 8s ease-in-out infinite;
}

.glow-1 {
  width: 220px;
  height: 220px;
  background: rgba(210,164,94,.18);
  top: 30px;
  left: 30px;
}

.glow-2 {
  width: 250px;
  height: 250px;
  background: rgba(255,255,255,.06);
  bottom: 20px;
  right: 40px;
  animation-delay: 1s;
}

.payment-hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.eyebrow {
  color: var(--gold);
  letter-spacing: 4px;
  font-size: .82rem;
  margin-bottom: 12px;
}

.payment-hero-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.05;
  margin-bottom: 18px;
}

.payment-hero-content p {
  color: var(--muted);
  line-height: 1.9;
}

.shop-layout {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 24px;
}

.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  transition: .35s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--gold), #e4bf86);
  color: #2b1d18;
  transform: translateY(-3px);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: .35s ease;
}

.product-card:hover {
  transform: translateY(-8px);
}

.product-card img {
  height: 220px;
  object-fit: cover;
  transition: .45s ease;
}

.product-card:hover img {
  transform: scale(1.06);
}

.product-content {
  padding: 18px;
}

.product-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--gold-soft);
  font-size: .78rem;
  margin-bottom: 10px;
}

.product-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  margin-bottom: 6px;
}

.product-content p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
  min-height: 48px;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.product-bottom strong {
  color: var(--gold-soft);
}

.add-cart-btn {
  border: none;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), #e4bf86);
  color: #2b1d18;
  font-weight: 700;
  transition: .3s ease;
}

.add-cart-btn:hover {
  transform: translateY(-2px);
}

.cart-panel,
.checkout-panel {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 22px;
}

.shop-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
  align-self: start;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-header h3,
.checkout-panel h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

.empty-cart {
  color: var(--muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
}

.cart-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.cart-item p {
  color: var(--gold-soft);
  font-size: .9rem;
}

.qty-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255,255,255,.12);
  color: #fff;
}

.remove-btn {
  margin-top: 6px;
  background: transparent;
  border: none;
  color: #ffb9b9;
  cursor: pointer;
  font-size: .84rem;
}

.cart-summary {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-row strong {
  color: var(--gold-soft);
  font-size: 1.1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.input-group label {
  color: var(--gold-soft);
  font-size: .92rem;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.08);
  color: #fff;
  outline: none;
  font-family: 'Poppins', sans-serif;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: rgba(255,255,255,.45);
}

.checkout-btn,
.clear-btn {
  width: 100%;
  border: none;
  padding: 14px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: .3s ease;
}

.checkout-btn {
  background: linear-gradient(135deg, var(--gold), #e4bf86);
  color: #2b1d18;
  margin-top: 8px;
}

.clear-btn {
  margin-top: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.10);
}

.checkout-btn:hover,
.clear-btn:hover {
  transform: translateY(-2px);
}

@keyframes floatGlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-16px) scale(1.04); }
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-right {
    position: static;
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: auto;
  }

  .hamburger span {
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 99px;
  }

  .navbar {
    width: 100%;
    display: none;
    flex-direction: column;
  }

  #nav-toggle:checked ~ .navbar {
    display: flex;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .payment-hero-content h2 {
    font-size: 2rem;
  }
}

.advanced-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.total-row {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.checkout-block {
  margin-bottom: 16px;
}

.block-label {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-soft);
  font-size: .92rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.payment-options {
  grid-template-columns: repeat(2, 1fr);
}

.option-btn {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 12px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: .3s ease;
  font-weight: 600;
}

.option-btn:hover,
.option-btn.active {
  background: linear-gradient(135deg, var(--gold), #e4bf86);
  color: #2b1d18;
  transform: translateY(-2px);
}

.checkout-info-box {
  margin: 14px 0 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.info-line strong {
  color: var(--gold-soft);
}

.secondary-btn {
  width: 100%;
  border: none;
  padding: 14px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: .3s ease;
  margin-top: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.10);
}

.secondary-btn:hover {
  transform: translateY(-2px);
}

.success-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.success-modal.active {
  display: block;
}

.success-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
}

.success-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 540px);
  border-radius: 30px;
  background: linear-gradient(180deg, #fffaf6, #f1e4d8);
  color: #2b1d18;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  animation: popIn .35s ease;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--gold), #e4bf86);
  color: #2b1d18;
  font-weight: 800;
  margin-bottom: 16px;
}

.success-mini {
  color: #8a6252;
  letter-spacing: 2px;
  font-size: .8rem;
  margin-bottom: 8px;
}

.success-box h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 10px;
}

.success-box p {
  line-height: 1.8;
}

.success-summary {
  margin: 16px 0 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.success-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.success-actions .checkout-btn,
.success-actions .secondary-btn {
  flex: 1;
  margin-top: 0;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 600px) {
  .option-grid,
  .payment-options {
    grid-template-columns: 1fr;
  }

  .success-actions {
    flex-direction: column;
  }
}

.music-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ambient-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  animation: floatAmbient 12s ease-in-out infinite;
}

.ambient-1 {
  width: 280px;
  height: 280px;
  top: 8%;
  left: -60px;
  background: radial-gradient(circle, rgba(255, 194, 122, 0.8), rgba(255, 194, 122, 0));
}

.ambient-2 {
  width: 340px;
  height: 340px;
  right: -80px;
  top: 30%;
  background: radial-gradient(circle, rgba(170, 120, 80, 0.65), rgba(170, 120, 80, 0));
  animation-delay: 2s;
}

.ambient-3 {
  width: 260px;
  height: 260px;
  left: 30%;
  bottom: -70px;
  background: radial-gradient(circle, rgba(255, 228, 196, 0.5), rgba(255, 228, 196, 0));
  animation-delay: 4s;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 35px 35px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
  opacity: 0.25;
}

@keyframes floatAmbient {
  0%, 100% {
    transform: translateY(0px) translateX(0px) scale(1);
  }
  50% {
    transform: translateY(-18px) translateX(12px) scale(1.06);
  }
}

.premium-music-player {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 330px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 9999;
  overflow: hidden;
}

.music-glow {
  position: absolute;
  inset: auto;
  width: 180px;
  height: 180px;
  right: -60px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 140, 0.26), transparent 70%);
  pointer-events: none;
}

.music-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}

.music-disc {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #f6d1a7, #8d5d38 55%, #3f2616 100%);
  box-shadow:
    inset 0 0 0 6px rgba(255,255,255,0.07),
    0 6px 18px rgba(0,0,0,0.28);
  position: relative;
  animation: spinDisc 10s linear infinite;
  animation-play-state: running;
}

.music-disc.paused {
  animation-play-state: paused;
}

.disc-center {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #f4e2cf;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.12);
}

@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-info {
  flex: 1;
  min-width: 0;
}

.music-info h4 {
  margin: 0;
  color: #fff5ea;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.music-info p {
  margin: 4px 0 0;
  color: rgba(255, 245, 234, 0.75);
  font-size: 12px;
  letter-spacing: 0.2px;
}

.music-main-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(135deg, #9a6a46, #d2a173);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.22),
    inset 0 1px 2px rgba(255,255,255,0.25);
  transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
}

.music-main-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.06);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.26),
    0 0 16px rgba(210, 161, 115, 0.35);
}

.music-middle {
  position: relative;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}

/* Equalizer */
.eq-wrap {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 32px;
  min-width: 34px;
}

.eq-wrap span {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(to top, #eec08f, #fff1de);
  animation: eqMove 1s ease-in-out infinite;
  transform-origin: bottom;
}

.eq-wrap span:nth-child(1) { height: 10px; animation-delay: 0s; }
.eq-wrap span:nth-child(2) { height: 22px; animation-delay: 0.15s; }
.eq-wrap span:nth-child(3) { height: 16px; animation-delay: 0.3s; }
.eq-wrap span:nth-child(4) { height: 26px; animation-delay: 0.45s; }
.eq-wrap span:nth-child(5) { height: 13px; animation-delay: 0.6s; }

.eq-wrap.paused span {
  animation-play-state: paused;
  opacity: 0.5;
}

@keyframes eqMove {
  0%, 100% {
    transform: scaleY(0.65);
    opacity: 0.65;
  }
  50% {
    transform: scaleY(1.25);
    opacity: 1;
  }
}

.music-progress-area {
  flex: 1;
}

.music-status-text {
  color: rgba(255, 248, 240, 0.85);
  font-size: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.music-volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-label {
  color: rgba(255, 245, 234, 0.8);
  font-size: 12px;
  min-width: 45px;
}

#volumeSlider {
  flex: 1;
  height: 6px;
  cursor: pointer;
  accent-color: #d9a777;
  background: transparent;
}

.premium-music-player::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.18),
    rgba(255,255,255,0.03),
    rgba(255,215,170,0.16)
  );
  -webkitmask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* Optional elegant entrance */
.premium-music-player {
  animation: musicFloatIn 1s ease;
}

@keyframes musicFloatIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .premium-music-player {
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
    max-width: 340px;
    padding: 16px;
  }

  .music-info h4 {
    font-size: 15px;
  }

  .music-info p,
  .music-status-text,
  .volume-label {
    font-size: 11px;
  }

  .music-main-btn {
    width: 44px;
    height: 44px;
  }

  .music-disc {
    width: 52px;
    height: 52px;
  }
}