/* ======================================================
   SHOPPING CART PAGE
====================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --content-width: 1240px;
  --hero-gap: 56px;

  --bg: #ffffff;
  --text: #0b0b0b;
  --muted: rgba(0, 0, 0, 0.62);
  --border: rgba(0, 0, 0, 0.18);
  --border-strong: rgba(0, 0, 0, 0.40);

  --glass: rgba(255, 255, 255, 0.86);
  --glass-border: rgba(0, 0, 0, 0.08);

  --btn-bg: #e6e6e6;

  --accent: rgba(199, 170, 145, 0.82);
  --accent-soft: rgba(199, 170, 145, 0.14);
}

body.dark {
  --bg: #05060a;
  --text: #f4f5f7;
  --muted: rgba(244, 245, 247, 0.74);
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.30);

  --glass: rgba(10, 12, 18, 0.65);
  --glass-border: rgba(255, 255, 255, 0.10);

  --btn-bg: rgba(255, 255, 255, 0.10);

  font-family: "Playfair Display", serif;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ======================================================
   PARTICLES
====================================================== */

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: #000000;
}

.main-nav,
main,
.contact-footer {
  position: relative;
  z-index: 2;
}

/* ======================================================
   NAVBAR
====================================================== */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(6, 7, 10, 0.76);
  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-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;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
}

.cart-count.show {
  display: inline-flex;
}

.shopping-cart.bump img {
  animation: cartBump 320ms ease;
}

@keyframes cartBump {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

/* ======================================================
   MAIN
====================================================== */

main {
  width: 100%;
  min-height: calc(100vh - 96px);
  padding: var(--hero-gap) 0 0;
}

.content-wrap {
  width: min(var(--content-width), calc(100% - 108px));
  margin: 0 auto;
  display: block;
}

.cart-section {
  width: 100%;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.cart-title {
  margin: 0 0 28px;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(34px, 3vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text);
}

#cartEmptyState {
  max-width: 520px;
}

.cart-empty-text {
  margin: 0 0 34px;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.6;
  color: var(--text);
}

.continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;

  min-width: 208px;
  min-height: 64px;
  padding: 0 34px;

  border-radius: 999px;
  border: 2px solid rgba(199, 170, 145, 0.75);
  background: transparent;
  color: #f3ede7;

  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.continue-btn:hover {
  background: rgba(199, 170, 145, 0.08);
  border-color: rgba(199, 170, 145, 0.95);
}

.continue-btn:active {
  transform: scale(0.985);
}

/* ======================================================
   FILLED CART
====================================================== */

.cart-filled {
  width: 100%;
  max-width: 1120px;
  display: block;
}

.cart-filled[hidden] {
  display: none !important;
}

.cart-items {
  width: 100%;
  border-top: 1px solid transparent;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 150px 44px;
  align-items: center;
  column-gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(199, 170, 145, 0.34);
}

.cart-item-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.cart-item-image-wrap {
  width: 106px;
  height: 106px;
  flex: 0 0 106px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.cart-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-name {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-meta {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: 0;
}

.cart-item-qty,
.cart-item-price {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  justify-self: end;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
}

.cart-item-remove {
  justify-self: end;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-item-remove:hover {
  opacity: 0.78;
  transform: scale(1.08);
}

.cart-summary {
  width: min(380px, 100%);
  margin-left: auto;
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
}

.cart-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 30px;
  line-height: 1.1;
  color: var(--text);
}

.cart-subtotal-row span:last-child {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
}

.checkout-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(199, 170, 145, 0.52);
  background: transparent;
  color: #f3ede7;
  text-decoration: none;
  overflow: hidden;

  transition:
    border-color 0.25s ease,
    transform 0.22s ease,
    background 0.25s ease;
}

.checkout-btn span {
  position: relative;
  z-index: 2;
  font-size: 20px;
  line-height: 1;
}

.checkout-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(199, 170, 145, 0.16), rgba(199, 170, 145, 0.03) 52%, transparent 72%);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.checkout-btn:hover {
  border-color: rgba(199, 170, 145, 0.86);
  background: rgba(199, 170, 145, 0.04);
}

.checkout-btn:hover::before {
  opacity: 1;
  transform: scale(1);
}

.checkout-btn:active {
  transform: scale(0.988);
}

/* ======================================================
   FOOTER
====================================================== */

.contact-footer {
  padding: 70px 0 40px;
}

.contact-section {
  width: min(var(--content-width), calc(100% - 108px));
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.contact-right {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  opacity: 0.82;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social:hover img {
  opacity: 1;
  transform: translateY(-1px) scale(1.04);
}

/* ======================================================
   RELOAD ANIMATION
====================================================== */

.cart-reveal {
  opacity: 1;
  transform: translateY(0);
}

body.cart-js-ready .cart-reveal {
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
}

body.cart-js-ready .cart-reveal-scale {
  transform: translateY(36px) scale(0.972);
}

body.cart-js-ready .cart-reveal.cart-animate {
  animation: cartRevealUp 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--cart-delay, 0ms);
}

body.cart-js-ready .cart-reveal-scale.cart-animate {
  animation: cartRevealScale 950ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--cart-delay, 0ms);
}

@keyframes cartRevealUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cartRevealScale {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.972);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 980px) {
  .cart-item {
    grid-template-columns: minmax(0, 1fr) 80px 120px 36px;
    column-gap: 18px;
  }

  .cart-item-name {
    font-size: 22px;
  }

  .cart-item-qty,
  .cart-item-price {
    font-size: 21px;
  }
}

@media (max-width: 768px) {
  :root {
    --hero-gap: 44px;
  }

  .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;
  }

  main {
    min-height: calc(100vh - 84px);
  }

  .content-wrap,
  .contact-section {
    width: calc(100% - 40px);
  }

  .cart-section {
    max-width: 100%;
  }

  .cart-title {
    font-size: clamp(30px, 8vw, 42px);
    margin-bottom: 18px;
  }

  .cart-empty-text {
    font-size: 18px;
    margin-bottom: 26px;
  }

  .continue-btn {
    min-width: 190px;
    min-height: 58px;
    font-size: 17px;
    padding: 0 28px;
  }

  .cart-item {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "main remove"
      "qty price";
    row-gap: 16px;
    column-gap: 16px;
    padding: 20px 0;
  }

  .cart-item-main {
    grid-area: main;
    align-items: flex-start;
  }

  .cart-item-remove {
    grid-area: remove;
    align-self: start;
  }

  .cart-item-qty {
    grid-area: qty;
    justify-self: start;
    font-size: 18px;
  }

  .cart-item-price {
    grid-area: price;
    justify-self: end;
    font-size: 18px;
  }

  .cart-item-image-wrap {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
  }

  .cart-item-name {
    font-size: 18px;
    white-space: normal;
  }

  .cart-summary {
    width: 100%;
    padding-top: 20px;
  }

  .cart-subtotal-row {
    font-size: 22px;
  }

  .cart-subtotal-row span:last-child {
    font-size: 18px;
  }

  .checkout-btn {
    min-height: 58px;
  }

  .checkout-btn span {
    font-size: 18px;
  }

  .contact-footer {
    padding: 56px 0 34px;
  }

  .contact-right {
    gap: 18px;
  }

  .social img {
    width: 46px;
    height: 46px;
  }
}

/* ======================================================
   PHONE NAV FIX
====================================================== */

@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-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-top: 44px;
  }

  .content-wrap,
  .contact-section {
    width: calc(100% - 32px);
  }

  .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;
  }

  .cart-title {
    font-size: 30px;
  }

  .contact-footer {
    padding-left: 26px;
    padding-right: 26px;
    padding-bottom: 78px;
  }
}