/* ============================================
   PRODUCT DETAIL PAGE - DUCATI PANIGALE V2
   ============================================ */

:root {
  --theme-color: #e30613;
  --off-white: #f5f5f5;
  --deep-black: #1a1a1a;
  --text-gray: #888;
  --card-bg: #1e1e1e;
  --border: rgba(255, 255, 255, 0.06);
  --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--deep-black);
  color: white;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  z-index: 10000;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
}

.logo span {
  color: var(--theme-color);
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--theme-color);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-cart {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.nav-cart:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-cart svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: var(--theme-color);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Hero Product Section --- */
.product-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 60px 60px;
  gap: 60px;
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 120%;
  background: var(--theme-color);
  pointer-events: none;
}

.product-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.product-image {
  width: 100%;
  z-index: 99;
  max-width: 650px;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.5));
  transition: transform 0.8s ease;
  animation: productFloat 10s ease-in-out infinite;
}

@keyframes productFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateX(15px);
  }
}

.product-image:hover {
  transform: scale(1.03);
}

.product-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--theme-color);
  color: white;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 3;
}

.product-info {
  z-index: 2;
}

.product-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--theme-color);
  margin-bottom: 15px;
}

.product-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.product-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 450px;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 35px;
}

.product-price {
  font-size: 42px;
  font-weight: 900;
  color: white;
}

.product-price-old {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: line-through;
}

.product-price-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-left: auto;
}

.product-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--theme-color);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: white;
  color: var(--deep-black);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(227, 6, 19, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 35px;
  background: transparent;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--theme-color);
  color: var(--theme-color);
  transform: translateY(-3px);
}

/* Color Selector */
.color-selector {
  display: flex;
  align-items: center;
  gap: 15px;
}

.color-selector-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
}

.color-options {
  display: flex;
  gap: 10px;
}

.color-opt {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.color-opt:hover {
  transform: scale(1.2);
}
.color-opt.active {
  border-color: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* --- Specs Grid --- */
.specs-section {
  padding: 80px 60px;
  background: linear-gradient(180deg, var(--deep-black) 0%, #111 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--theme-color);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.spec-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.spec-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--theme-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.spec-card:hover::before {
  transform: scaleX(1);
}

.spec-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.spec-icon {
  width: 50px;
  height: 50px;
  background: rgba(227, 6, 19, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.spec-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--theme-color);
  stroke-width: 1.5;
}

.spec-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
}

.spec-value {
  font-size: 24px;
  font-weight: 900;
  color: white;
  margin-bottom: 8px;
}

.spec-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

/* --- Why This Build Section --- */
.why-build {
  padding: 100px 60px;
  background: var(--deep-black);
  position: relative;
}

.why-build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.why-build-image {
  position: relative;
}

.why-build-image img {
  width: 100%;
  border-radius: 20px;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
}

.why-build-content {
}

.why-build-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 25px;
}

.why-build-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
  margin-bottom: 30px;
}

.why-build-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.why-feature {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.why-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(227, 6, 19, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--theme-color);
}

.why-feature-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.why-feature-text strong {
  color: white;
  font-weight: 700;
}

/* --- Related Products --- */
.related-section {
  padding: 100px 60px;
  background: #111;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: white;
}

.related-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.related-card-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  padding: 20px;
  transition: transform 0.5s ease;
}

.related-card:hover .related-card-img {
  transform: scale(1.05);
}

.related-card-body {
  padding: 25px;
}

.related-card-title {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.related-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--theme-color);
  margin-bottom: 10px;
}

.related-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* --- Sidebar / Pricing Panel --- */
.pricing-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 380px;
  height: 100vh;
  background: #151515;
  border-left: 1px solid var(--border);
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
}

.pricing-sidebar.active {
  transform: translateX(0);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  padding: 30px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.sidebar-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.sidebar-close:hover {
  background: var(--theme-color);
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
}

.sidebar-body {
  padding: 30px;
}

.sidebar-product {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.sidebar-product-img {
  width: 100px;
  height: 70px;
  object-fit: contain;
  border-radius: 10px;
  background: #1e1e1e;
}

.sidebar-product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-product-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sidebar-product-price {
  font-size: 20px;
  font-weight: 900;
  color: var(--theme-color);
}

.sidebar-search {
  margin-bottom: 25px;
}

.sidebar-search input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: white;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.sidebar-search input:focus {
  border-color: var(--theme-color);
}

.sidebar-search input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.sidebar-specs {
  margin-bottom: 30px;
}

.sidebar-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-spec-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-spec-value {
  font-size: 10px;
  font-weight: 700;
}

.sidebar-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.sidebar-total-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-total-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--theme-color);
}

/* --- Purchase Modal --- */
.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.purchase-modal.active {
  opacity: 1;
  visibility: visible;
}

.purchase-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.purchase-content {
  position: relative;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 50px;
  width: 90%;
  max-width: 480px;
  z-index: 2;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.purchase-modal.active .purchase-content {
  transform: scale(1) translateY(0);
}

.purchase-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.purchase-close:hover {
  background: var(--theme-color);
}

.purchase-close svg {
  width: 20px;
  height: 20px;
}

.purchase-title {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.purchase-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 30px;
}

.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.purchase-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.purchase-form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
}

.purchase-form-group input {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: white;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease;
}

.purchase-form-group input:focus {
  border-color: var(--theme-color);
}

.purchase-form-group input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.purchase-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--theme-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.purchase-submit:hover {
  background: white;
  color: var(--deep-black);
  transform: translateY(-2px);
}

.purchase-success {
  text-align: center;
  padding: 30px 0;
}

.purchase-success-icon {
  width: 70px;
  height: 70px;
  background: var(--theme-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.purchase-success-icon svg {
  width: 32px;
  height: 32px;
  stroke: white;
  stroke-width: 3;
}

.purchase-success h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.purchase-success p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* --- Footer --- */
.product-footer {
  padding: 40px 60px;
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-footer-left {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.product-footer-right {
  display: flex;
  gap: 25px;
}

.product-footer-right a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-footer-right a:hover {
  color: var(--theme-color);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .product-hero {
    grid-template-columns: 1fr;
    padding: 100px 30px 50px;
    text-align: center;
  }
  .product-info {
    order: 2;
  }
  .product-image-wrap {
    order: 1;
  }
  .product-subtitle {
    margin: 0 auto 30px;
  }
  .product-price-row {
    justify-content: center;
  }
  .product-actions {
    justify-content: center;
  }
  .color-selector {
    justify-content: center;
  }
  .why-build-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pricing-sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 15px 20px;
  }
  .specs-section,
  .why-build,
  .related-section {
    padding: 60px 20px;
  }
  .specs-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .product-footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .purchase-content {
    padding: 30px 20px;
  }
}
