﻿/* 
   product_info.css    MANTA Parts
   Premium, minimal, performance-focused aesthetic
    */

/*  Base  */
html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/*  Breadcrumb  */
.breadcrumb {
  background: #fff;
  padding: 12px 24px;
  border-bottom: 1px solid #ebebeb;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: #888;
}

.breadcrumb a {
  color: #555;
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: #111;
}

.breadcrumb span {
  color: #aaa;
}

/*  Main  */
main {
  flex: 1;
  padding: 28px 20px 48px;
}

main .container {
  max-width: 1260px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

/*  Product layout grid  */
.product-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
}

/*  Image section  */
.product-image-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px 36px 40px 40px;
  border-right: 1px solid #f0f0f0;
}

.main-image-container {
  position: relative;
  aspect-ratio: 1;
  background: #fafafa;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: none;
  transition: box-shadow 0.2s ease;
}

.main-image-container:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
}

/*  Carousel nav arrows  */
button.image-nav-btn,
.image-nav-btn,
button.image-nav-btn.prev-btn,
button.image-nav-btn.next-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(255,255,255,0.4) !important;
  border-radius: 50% !important;
  background: rgba(20, 20, 20, 0.38) !important;
  color: #fff !important;
  font-size: 1.1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.18s ease, opacity 0.18s ease !important;
  z-index: 100 !important;
  opacity: 0.72 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

button.image-nav-btn:hover,
.image-nav-btn:hover {
  background: rgba(20, 20, 20, 0.72) !important;
  opacity: 1 !important;
}

button.image-nav-btn.prev-btn,
.image-nav-btn.prev-btn {
  left: 12px !important;
}

button.image-nav-btn.next-btn,
.image-nav-btn.next-btn {
  right: 12px !important;
}

/*  Main product image  */
#main-image {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
  padding: 8px;
  box-sizing: border-box;
}

#main-image:hover {
  transform: scale(1.03);
}

/*  Thumbnails  */
.thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.thumbnails img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f5f5f5;
}

.thumbnails img:hover {
  border-color: #444;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/*  Product details panel  */
.product-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 40px 40px 40px 40px;
}

/*  Title  */
#product-name {
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 600;
  color: #111;
  margin: 0 0 20px 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/*  Price & stock meta block  */
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

/*  Price  */
.price {
  font-size: clamp(30px, 3vw, 36px);
  font-weight: 700;
  color: #111;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1;
}

/*  Stock status  minimal dot  */
.stock-status {
  display: flex;
  align-items: center;
}

.in-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3d9e6e;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: none;
  padding: 0;
  border-radius: 0;
}

.stock-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
}

.out-of-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c0392b;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: none;
  padding: 0;
  border-radius: 0;
}

/*  Divider between meta and actions  */
.product-details-divider {
  width: 100%;
  height: 1px;
  background: #ebebeb;
  margin-bottom: 28px;
}

/* ── Actions block ── */
.product-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

/* ── Primary CTA – Add to Cart ── */
.add-to-cart-button {
  background: #111;
  color: #fff;
  border: none;
  padding: 0 28px;
  height: 56px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.17s ease, transform 0.17s ease, box-shadow 0.17s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  text-transform: none;
}

.add-to-cart-button:hover {
  background: #1f1f1f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.add-to-cart-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.add-to-cart-button:disabled {
  background: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

/* ── Secondary CTA – Buy Now ── */
.buy-now-button {
  background: #fff;
  color: #111;
  border: 1.5px solid #d0d0d0;
  padding: 0 28px;
  height: 52px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.17s ease, background 0.17s ease, transform 0.17s ease, box-shadow 0.17s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-transform: none;
}

.buy-now-button:hover {
  border-color: #888;
  background: #f9f9f9;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.09);
}

.buy-now-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.buy-now-button:disabled {
  background: #f5f5f5;
  color: #aaa;
  border-color: #e0e0e0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

/* ── Express checkout divider ── */
.express-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 4px 0;
}

.express-divider-line {
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.express-divider-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #bbb;
  white-space: nowrap;
  text-transform: uppercase;
}

/* ── Express payment button container ── */
.express-payment-wrapper {
  width: 100%;
  border-radius: 11px;
  overflow: hidden;
  /* Stripe's iframe fills this; min-height keeps layout stable */
  min-height: 48px;
}

/*  Secondary eBay text link  */
.ebay-text-link {
  font-size: 0.82rem;
  color: #888;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
  text-align: center;
}

.ebay-text-link:hover {
  color: #333;
  text-decoration: underline;
}

.ebay-text-link.hidden {
  display: none;
}

/*  Trust row  */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 20px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.trust-item svg {
  width: 14px;
  height: 14px;
  stroke: #aaa;
  flex-shrink: 0;
}

.trust-divider {
  width: 1px;
  height: 20px;
  background: #e0e0e0;
  flex-shrink: 0;
}

/*  Product info section (tabs)  */
.product-info-section {
  border-top: 1px solid #ebebeb;
}

.tabs {
  display: flex;
  background: #fafafa;
  border-bottom: 1px solid #ebebeb;
}

.tab {
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 18px 28px;
  cursor: pointer;
  color: #999;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
  flex: 1;
  letter-spacing: 0.01em;
}

.tab:hover {
  background: #fff;
  color: #333;
}

.tab.active {
  background: #fff;
  color: #111;
  border-bottom-color: #111;
}

.tab-content {
  min-height: 280px;
}

.tab-pane {
  display: none;
  padding: 36px 40px;
}

.tab-pane.active {
  display: block;
}

.content-wrapper h3 {
  font-size: 1.1rem;
  color: #111;
  margin: 0 0 18px 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.content-wrapper p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #555;
  margin: 0 0 14px 0;
}

/*  Formatted description  */
.formatted-description {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #555;
  word-wrap: break-word;
}

.formatted-description p {
  margin: 0 0 8px 0;
}

.formatted-description ul,
.formatted-description ol {
  margin: 8px 0;
  padding-left: 24px;
}

.formatted-description li {
  margin: 4px 0;
}

.formatted-description h1,
.formatted-description h2,
.formatted-description h3,
.formatted-description h4 {
  color: #222;
  margin: 12px 0 6px 0;
}

.formatted-description strong,
.formatted-description b {
  font-weight: 700;
  color: #222;
}

/*  Guarantee section  */
.guarantee-info {
  display: grid;
  gap: 18px;
}

.guarantee-item {
  padding: 18px 20px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #ebebeb;
}

.guarantee-item h4 {
  font-size: 1rem;
  color: #111;
  margin: 0 0 6px 0;
  font-weight: 600;
}

.guarantee-item p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

/*  Footer  */
footer {
  background-color: #0d0d0d;
  color: #aaa;
  text-align: center;
  padding: 16px 0;
  font-size: 0.85rem;
  margin-top: auto;
}

footer a {
  color: #aaa;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.15s;
}

footer a:hover {
  color: #fff;
}

/*  Responsive  tablet  */
@media (max-width: 900px) {
  .product-wrapper {
    grid-template-columns: 1fr;
  }

  .product-image-section {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 28px 24px;
  }

  .product-details {
    padding: 28px 24px;
  }

  .trust-row {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
  }

  .trust-divider {
    display: none;
  }

  .tab-pane {
    padding: 24px;
  }
}

/*  Responsive  mobile  */
@media (max-width: 768px) {
  /* Strip outer spacing so image bleeds edge-to-edge */
  main {
    padding: 0;
  }

  main .container {
    border-radius: 0;
    box-shadow: none;
  }

  /* Image section – no padding, no boxed background */
  .product-image-section {
    padding: 0;
    gap: 0;
    max-height: none;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border-bottom: 1px solid #ebebeb;
    background: #fff;
  }

  .main-image-container {
    aspect-ratio: auto;
    height: 72vh;
    max-height: 72vh;
    border-radius: 0;
    box-shadow: none;
    background: #f8f8f8;
    overflow: hidden;
  }

  #main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
    margin: 0;
    display: block;
    transform: none !important;
  }

  #main-image:hover {
    transform: none !important;
  }

  /* Carousel arrows – smaller and more subtle on mobile */
  button.image-nav-btn,
  .image-nav-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
    opacity: 0.5 !important;
    background: rgba(0,0,0,0.45) !important;
  }

  button.image-nav-btn.prev-btn,
  .image-nav-btn.prev-btn {
    left: 8px !important;
  }

  button.image-nav-btn.next-btn,
  .image-nav-btn.next-btn {
    right: 8px !important;
  }

  /* Thumbnails – compact horizontal scroll strip */
  .thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 10px 14px;
    justify-content: flex-start;
    max-height: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .thumbnails::-webkit-scrollbar {
    display: none;               /* Chrome/Safari */
  }

  .thumbnails img {
    width: 46px !important;
    height: 46px !important;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid transparent;
    opacity: 0.55;
    transition: opacity 0.15s ease, border-color 0.15s ease;
    background: #f0f0f0;
  }

  .thumbnails img:hover,
  .thumbnails img.active {
    opacity: 1;
  }

  /* Product detail panel */
  .product-details {
    padding: 20px 18px 28px;
    background: #fff;
  }

  #product-name {
    font-size: 1.4rem;
  }

  .price {
    font-size: 2rem;
  }

  .breadcrumb {
    padding: 10px 14px;
  }

  .tabs {
    flex-direction: column;
  }

  .tab {
    padding: 14px 20px;
    text-align: left;
  }

  .tab-pane {
    padding: 18px 16px;
  }
}

@media (max-width: 480px) {
  .main-image-container {
    height: 62vh;
    max-height: 62vh;
  }

  #product-name {
    font-size: 1.25rem;
  }

  .price {
    font-size: 1.75rem;
  }

  .add-to-cart-button {
    height: 52px;
    font-size: 0.95rem;
  }

  .thumbnails img {
    width: 40px !important;
    height: 40px !important;
  }
}
