/* ======================================================
   CHECKOUT PAGE
====================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --content-width: 1200px;

  --bg: #000000;
  --text: #f4f5f7;
  --muted: rgba(244, 245, 247, 0.72);

  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.30);

  --glass: rgba(6, 7, 10, 0.76);
  --glass-border: rgba(255, 255, 255, 0.10);

  --accent: rgba(199, 170, 145, 0.82);
  --accent-soft: rgba(199, 170, 145, 0.12);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Playfair Display", serif;
  overflow-x: hidden;
}

body.dark {
  background: var(--bg);
  color: var(--text);
}

/* ======================================================
   PARTICLES
====================================================== */

#particles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: #000000;
  display: block;
}

.main-nav,
main,
.contact-footer {
  position: relative;
  z-index: 2;
}

/* ======================================================
   NAVBAR - MATCHES OTHER PAGES
====================================================== */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);

  min-height: 96px;
  padding: 0 36px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;

  transition:
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 460ms ease;
  will-change: transform, opacity;
}

.main-nav.nav-hidden {
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  pointer-events: none;
}

.main-nav.nav-visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.main-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  font-size: 16px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: 16px 0;
  line-height: 1;
}

.main-nav a:hover {
  opacity: 0.85;
}

.main-nav .nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -53%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav .nav-logo img {
  height: 150px;
  width: auto;
  display: block;
}

.main-nav .shopping-cart {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  line-height: 0;
}

.main-nav .shopping-cart img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  opacity: 0.92;
  transition: opacity 180ms ease, transform 180ms ease;
}

.main-nav .shopping-cart:hover img {
  opacity: 1;
  transform: translateY(-1px) scale(1.04);
}

.cart-count {
  position: absolute;
  top: 0;
  right: -14px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.cart-count.show {
  display: inline-flex;
}

/* ======================================================
   CHECKOUT LAYOUT
====================================================== */

main {
  width: 100%;
  padding: 80px 32px 0;
}

.checkout-wrap {
  width: min(var(--content-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: start;
}

.checkout-left,
.checkout-right {
  min-width: 0;
}

.checkout-empty,
.checkout-flow,
.summary-card {
  width: 100%;
}

/* ======================================================
   EMPTY CHECKOUT
====================================================== */

.checkout-title {
  margin: 0 0 22px;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.checkout-empty-text {
  margin: 0 0 30px;
  font-size: 22px;
  line-height: 1.55;
  color: var(--muted);
}

.back-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 32px;
  border-radius: 999px;
  border: 1px solid rgba(199, 170, 145, 0.72);
  background: rgba(199, 170, 145, 0.06);
  color: #f3ede7;
  text-decoration: none;
  font-size: 18px;
}

/* ======================================================
   PANELS
====================================================== */

.checkout-flow {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkout-panel,
.summary-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.panel-toggle {
  width: 100%;
  min-height: 78px;
  padding: 0 28px;
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Playfair Display", serif;
  font-size: 30px;
  cursor: pointer;
  text-align: left;
}

.panel-toggle.is-locked {
  opacity: 0.55;
  cursor: default;
}

.panel-body {
  display: none;
  padding: 0 28px 30px;
}

.panel-body.open {
  display: block;
}

.field-label {
  display: block;
  margin: 0 0 12px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.text-input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 16px;
}

.text-input::placeholder {
  color: rgba(244, 245, 247, 0.42);
}

.helper-text {
  margin: 12px 0 18px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
}

.continue-step-btn,
.purchase-btn {
  margin-top: 24px;
  width: 100%;
  min-height: 60px;
  border-radius: 999px;
  border: 1px solid rgba(199, 170, 145, 0.72);
  background: rgba(199, 170, 145, 0.08);
  color: #f3ede7;
  font-family: "Playfair Display", serif;
  font-size: 18px;
  cursor: pointer;
  transition:
    background 220ms ease,
    border-color 220ms ease,
    transform 220ms ease,
    opacity 220ms ease;
}

.continue-step-btn:hover,
.purchase-btn:hover,
.back-shop-btn:hover {
  background: rgba(199, 170, 145, 0.14);
  border-color: rgba(199, 170, 145, 0.95);
}

.continue-step-btn:active,
.purchase-btn:active,
.back-shop-btn:active {
  transform: scale(0.985);
}

.purchase-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.secure-badge,
.payment-info-box,
.review-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
  margin-bottom: 18px;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 14px;
}

.payment-info-title {
  margin: 0 0 8px;
  font-size: 20px;
}

.payment-info-text,
.purchase-note {
  margin: 0;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.review-box p {
  margin: 8px 0;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 14px;
}

/* ======================================================
   ORDER SUMMARY
====================================================== */

.summary-card {
  padding: 28px;
  position: sticky;
  top: 122px;
}

.summary-title {
  margin: 0 0 24px;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.15;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.summary-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.summary-thumb-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.summary-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.summary-qty-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(199, 170, 145, 0.90);
  color: #000;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.summary-name {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
}

.summary-price {
  font-family: "Inter", sans-serif;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.summary-totals {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 15px;
}

.summary-row.total {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}

.secure-checkout-note {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 14px;
}

/* ======================================================
   FOOTER
====================================================== */

.contact-footer {
  padding: 80px 0 44px;
  overflow: visible;
}

.contact-section {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-right {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  min-height: 64px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
  opacity: 0.78;
  transition: opacity 180ms ease, transform 180ms ease;
}

.social:hover img {
  opacity: 1;
  transform: translateY(-1px) scale(1.04);
}

/* ======================================================
   REVEAL ANIMATION
====================================================== */

.reveal-item,
.reveal-scale {
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
}

.reveal-scale {
  transform: translateY(34px) scale(0.965);
}

.reveal-item.animate {
  animation: checkoutRevealUp 1050ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
}

.reveal-scale.animate {
  animation: checkoutRevealScale 1120ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes checkoutRevealUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes checkoutRevealScale {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.965);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 980px) {
  .checkout-wrap {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }
}

@media (max-width: 768px) {
  main {
    padding: 72px 20px 0;
  }

  .checkout-title {
    font-size: clamp(30px, 8vw, 42px);
  }

  .panel-toggle {
    min-height: 70px;
    padding: 0 22px;
    font-size: 26px;
  }

  .panel-body {
    padding: 0 22px 26px;
  }

  .summary-card {
    padding: 24px;
  }

  .summary-title {
    font-size: 30px;
  }

  .summary-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .summary-price {
    grid-column: 2;
  }

  .main-nav {
    min-height: 84px;
    padding: 10px 18px;
  }

  .main-nav .nav-links {
    gap: 16px;
    max-width: calc(100% - 150px);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .main-nav .nav-links::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    font-size: 12px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .main-nav .nav-logo {
    top: 50%;
    transform: translate(-50%, -54%);
  }

  .main-nav .nav-logo img {
    height: 104px;
  }

  .main-nav .shopping-cart {
    right: 18px;
  }

  .main-nav .shopping-cart img {
    width: 26px;
    height: 26px;
  }

  .cart-count {
    top: -1px;
    right: -12px;
    font-size: 16px;
  }

  .contact-right {
    gap: 20px;
    min-height: 58px;
  }

  .social img {
    width: 48px;
    height: 48px;
  }
}

/* ======================================================
   PHONE NAV FIX - MATCHES OTHER PAGES
====================================================== */

@media (max-width: 560px) {
  .main-nav {
    min-height: 84px;
    padding: 5px 12px 7px;

    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: 42px 24px;
    column-gap: 14px;
    row-gap: 0;

    align-items: center;
    justify-content: center;
    justify-items: center;

    position: sticky;
  }

  .main-nav.nav-hidden {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
    pointer-events: none;
  }

  .main-nav.nav-visible {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav .nav-logo {
    position: static;
    grid-column: 1 / -1;
    grid-row: 1;
    transform: none;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;
    line-height: 0;
  }

  .main-nav .nav-logo img {
    height: 50px;
    width: auto;
  }

  .main-nav .nav-links {
    grid-column: 1;
    grid-row: 2;

    width: auto;
    max-width: none;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 14px;
    overflow: visible;
    padding: 0;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .main-nav .nav-links::-webkit-scrollbar {
    display: none;
  }

  .main-nav .nav-links a {
    font-size: 10.5px;
    letter-spacing: 0.06em;
    padding: 4px 0;
    white-space: nowrap;
    line-height: 1;
  }

  .main-nav .shopping-cart {
    position: static;
    grid-column: 2;
    grid-row: 2;

    transform: translateY(-1px);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 11px;
    height: 11px;
    padding: 0;
    margin: 0;
    line-height: 0;
  }

  .main-nav .shopping-cart img {
    width: 11px;
    height: 11px;
    object-fit: contain;
    display: block;
  }

  .cart-count {
    top: -7px;
    right: -10px;
    font-size: 10px;
  }

  main {
    padding: 44px 16px 0;
  }

  .checkout-wrap {
    gap: 28px;
  }

  .panel-toggle {
    font-size: 24px;
  }

  .summary-card,
  .checkout-panel {
    border-radius: 22px;
  }

  .contact-footer {
    padding: 64px 24px 74px;
  }

  .contact-section {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .contact-right {
    margin-top: 28px;
    margin-bottom: 18px;
    min-height: 56px;
    overflow: visible;
  }
}

/* ======================================================
   EXTRA SMALL PHONE FIX
====================================================== */

@media (max-width: 390px) {
  .main-nav {
    min-height: 80px;
    padding: 4px 9px 6px;
    grid-template-rows: 39px 23px;
    column-gap: 11px;
  }

  .main-nav .nav-logo img {
    height: 47px;
  }

  .main-nav .nav-links {
    gap: 11px;
    padding: 0;
  }

  .main-nav .nav-links a {
    font-size: 9.5px;
    letter-spacing: 0.05em;
  }

  .main-nav .shopping-cart {
    width: 10px;
    height: 10px;
    transform: translateY(-1px);
  }

  .main-nav .shopping-cart img {
    width: 10px;
    height: 10px;
  }

  .checkout-title {
    font-size: 30px;
  }

  .contact-footer {
    padding-left: 26px;
    padding-right: 26px;
    padding-bottom: 78px;
  }
}