/* ======================================================
   SHOP PAGE CSS
====================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --content-width: 1100px;
  --hero-gap: 80px;
  --section-gap: 80px;
  --card-gap: 28px;
  --title-to-content-gap: 64px;

  --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.72);
  --glass-border: rgba(255, 255, 255, 0.10);
  --btn-bg: rgba(255, 255, 255, 0.10);
}

body {
  min-height: 100vh;
  background: #000000;
  color: var(--text);
  font-family: "Playfair Display", serif;
  overflow-x: hidden;
}

body.dark {
  background: #000000;
  color: var(--text);
}

/* ======================================================
   PARTICLE BACKGROUND
====================================================== */

#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
====================================================== */

.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;
}

.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;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.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);
  }
}

/* ======================================================
   TOAST
====================================================== */

.cart-toast {
  position: fixed;
  top: 106px;
  right: 28px;
  z-index: 2000;
  max-width: 320px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(12, 14, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
}

.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ======================================================
   MAIN LAYOUT
====================================================== */

main {
  width: 100%;
  padding: var(--hero-gap) 32px 0;
}

.content-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ======================================================
   SHOP HERO
====================================================== */

.shop-hero {
  width: min(var(--content-width), 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  width: min(var(--content-width), 100%);
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 var(--hero-gap);
  text-align: center;
}

.shop-subtitle {
  width: min(780px, 100%);
  margin: 0 0 var(--section-gap);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}

/* ======================================================
   SECTIONS
====================================================== */

.shop-section {
  width: min(var(--content-width), 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.featured-section {
  padding: 70px 0 0;
}

.shop-heading {
  width: 100%;
  margin: 0 0 var(--title-to-content-gap);
  text-align: center;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* ======================================================
   SHOP PRODUCTS
====================================================== */

.shop-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 28px;
  align-items: start;
  margin-top: 18px;
}

.shop-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  position: relative;
  isolation: isolate;
}

.shop-image-wrapper {
  display: flex;
  width: 100%;
  text-decoration: none;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.shop-product-image {
  width: 100%;
  height: 560px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.shop-product-image-lambo {
  transform: translateX(18px);
}

.shop-product-image-motorama {
  transform: translateX(36px);
}

.shop-product-image-ferrari {
  object-fit: contain;
  transform: scale(1.48) translateY(-18px);
  transform-origin: center center;
}

.shop-product-image-srt {
  object-fit: contain;
  transform: scale(1.38) translateY(-34px);
  transform-origin: center center;
}

.shop-product-footer {
  width: 100%;
  padding: 18px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 50;
  pointer-events: auto;
}

.shop-product-meta {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 51;
}

.shop-product-title {
  margin: 0 0 7px;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
  color: var(--text);
  text-align: center;
}

.shop-product-price {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: lining-nums tabular-nums;
}

.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 218px;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  text-decoration: none;
  cursor: pointer;

  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);

  font-family: "Playfair Display", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;

  position: relative;
  z-index: 100;
  pointer-events: auto;

  transition: opacity 200ms ease, transform 200ms ease, background 200ms ease;
}

.shop-btn:hover {
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.04);
}

.shop-btn:active {
  transform: scale(0.985);
}

/* ======================================================
   INFO SECTION
====================================================== */

.why-section {
  padding: 95px 0 0;
}

.info-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
}

.info-card {
  padding: 32px 30px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.info-card h3 {
  margin: 0 0 14px;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  text-align: center;
}

.info-card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  text-align: left;
}

/* ======================================================
   FOOTER
====================================================== */

.contact-footer {
  padding: 70px 0 44px;
  overflow: visible;
}

.contact-section {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.contact-right {
  margin-top: 8px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  overflow: visible;
  min-height: 64px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  visibility: visible;
}

.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);
}

/* ======================================================
   CONSISTENT REVEAL ANIMATION
====================================================== */

.shop-reveal {
  opacity: 1;
  transform: translateY(0);
}

body.shop-js-ready .shop-reveal {
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
}

body.shop-js-ready .shop-reveal-scale {
  transform: translateY(64px) scale(0.93);
}

body.shop-js-ready .shop-reveal.shop-animate {
  animation: shopRevealUp 850ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.shop-js-ready .shop-reveal-scale.shop-animate {
  animation: shopRevealScale 1050ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes shopRevealUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shopRevealScale {
  from {
    opacity: 0;
    transform: translateY(64px) scale(0.93);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 950px) {
  .shop-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.15;
    text-align: center;
    margin-bottom: 72px;
  }

  .shop-heading {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.15;
  }

  .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;
  }

  .cart-toast {
    top: 92px;
    right: 16px;
    left: 16px;
    max-width: none;
  }

  main {
    padding: 72px 20px 0;
  }

  .shop-subtitle {
    margin-bottom: 72px;
  }

  .featured-section,
  .why-section {
    padding-top: 42px;
  }

  .contact-footer {
    padding-top: 48px;
  }

  .shop-product-image {
    height: 420px;
  }

  .shop-product-image-lambo {
    transform: translateX(10px);
  }

  .shop-product-image-motorama {
    transform: translateX(18px);
  }

  .shop-product-image-ferrari {
    object-fit: contain;
    transform: scale(1.26) translateY(-10px);
    transform-origin: center center;
  }

  .shop-product-image-srt {
    object-fit: contain;
    transform: scale(1.18) translateY(-14px);
    transform-origin: center center;
  }

  .shop-product-title {
    font-size: 19px;
    line-height: 1.35;
  }

  .shop-product-price {
    font-size: 19px;
    line-height: 1.35;
  }

  .shop-btn {
    width: 200px;
    min-height: 46px;
    padding: 11px 22px;
    font-size: 15.5px;
  }

  .info-card {
    padding-left: 24px;
    padding-right: 24px;
  }

  .info-card h3 {
    font-size: 26px;
  }

  .contact-right {
    gap: 20px;
    min-height: 58px;
  }

  .social img {
    width: 48px;
    height: 48px;
  }
}

/* ======================================================
   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-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;
  }

  .cart-toast {
    top: 90px;
    right: 14px;
    left: 14px;
    max-width: none;
  }

  main {
    padding: 44px 16px 0;
  }

  .hero-title {
    margin-bottom: 44px;
  }

  .shop-subtitle {
    margin-bottom: 54px;
  }

  .featured-section,
  .why-section {
    padding-top: 38px;
  }

  .shop-heading {
    margin-bottom: 44px;
  }

  .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;
  }

  .hero-title,
  .shop-heading {
    font-size: 30px;
  }

  .contact-footer {
    padding-left: 26px;
    padding-right: 26px;
    padding-bottom: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav,
  .main-nav .shopping-cart img,
  .social img,
  .shop-btn {
    transition: none;
  }

  .shopping-cart.bump img {
    animation: none;
  }
}