/* Portfolio Product Page (premium + minimal)
   Scoped to .portfolio-product and pp-* classes.
*/

.portfolio-product {
  padding-top: 32px;
}

/* When we promote breadcrumbs into a full-width page-title bar, align section spacing
   with other pages that use the Page Title pattern. */
.c3p-breadcrumb-bar + section.portfolio-product {
  padding-top: 60px;
}

/* Breadcrumb bar (matches Portfolio / Quote breadcrumb styling) */
.page-title.c3p-breadcrumb-bar {
  /* Match the global page-title sizing used on Quote/Cart/Checkout */
  padding: 80px 0;
  text-align: center;
}

.page-title.c3p-breadcrumb-bar .breadcrumbs ol {
  justify-content: center;
}

/* Breadcrumbs */
/* Breadcrumb row includes the back button */
.portfolio-product .pp-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.portfolio-product .pp-breadcrumbs {
  margin-bottom: 0;
}

.portfolio-product .pp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.portfolio-product .pp-back-btn:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.14);
}

.portfolio-product .pp-back-btn:active {
  transform: translateY(0);
}

.portfolio-product .pp-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
}

.portfolio-product .pp-breadcrumbs ol a {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  text-decoration: none;
}

.portfolio-product .pp-breadcrumbs ol a:hover {
  text-decoration: underline;
}

.portfolio-product .pp-breadcrumbs ol li+li {
  padding-left: 10px;
}

.portfolio-product .pp-breadcrumbs ol li+li::before {
  content: "/";
  display: inline-block;
  padding-right: 10px;
  color: color-mix(in srgb, var(--default-color), transparent 70%);
}

/* Hero */
.portfolio-product .pp-hero {
  padding-top: 10px;
}

.portfolio-product .pp-media {
  position: relative;

  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.6);

  /* Gallery layout */
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
}

/* Main image frame: keep a consistent display aspect ratio regardless of source image size */
.portfolio-product #ppMainLink {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.06);

  /* Change this if you ever want a different frame ratio */
  aspect-ratio: var(--pp-main-ar, 4 / 3);
}

.portfolio-product #ppMainImg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Thumbnails + scroll arrows */
.portfolio-product .pp-thumbs-wrap {
  order: 1;
  flex: 0 0 auto;
  width: 92px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
}

/* Overlay thumbnail strip on top of the main image (desktop) */
.portfolio-product .pp-thumbs-wrap.pp-thumbs-overlay {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 88px;
  padding: 10px 8px;
  border-radius: 16px;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.10);
}

.portfolio-product .pp-thumbs-btn {
  height: 30px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.portfolio-product .pp-thumbs-btn:hover {
  transform: translateY(-1px);
  background: rgba(0,0,0,0.04);
}

.portfolio-product .pp-thumbs-btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.portfolio-product .pp-thumbs-viewport {
  overflow: hidden;
  overscroll-behavior: contain;
  border-radius: 12px;
}

.portfolio-product .pp-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
  background: transparent;
  will-change: transform;

}

@media (max-width: 991.98px) {
  .portfolio-product .pp-thumbs-wrap {
    width: auto;
    flex-direction: row;
    gap: 10px;
    order: 2;
  }

  .portfolio-product .pp-thumbs-wrap.pp-thumbs-overlay {
    position: static;
    transform: none;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .portfolio-product .pp-thumbs-btn {
    display: none;
  }

  .portfolio-product .pp-thumbs-viewport {
    height: auto !important;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .portfolio-product .pp-thumbs {
    flex-direction: row;
    padding-top: 10px;
  }

  .portfolio-product .pp-media {
    flex-direction: column;
  }

  .portfolio-product #ppMainLink {
    order: 1;
  }
}

@media (max-width: 575.98px) {
  .portfolio-product .pp-thumbs {
    gap: 8px;
  }
}

.portfolio-product .pp-thumb {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  line-height: 0;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.portfolio-product .pp-thumb img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  display: block;
}

.portfolio-product .pp-thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.portfolio-product .pp-thumb:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-color), transparent 55%);
  outline-offset: 2px;
}

.portfolio-product .pp-thumb.active {
  border-color: var(--accent-color);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* Make horizontal thumbnail strip on tablet/mobile feel native */
@media (max-width: 991.98px) {
  .portfolio-product .pp-thumb img {
    width: 92px;
    height: 72px;
  }

  .portfolio-product .pp-thumb {
    flex: 0 0 auto;
  }
}

/* Copy */
.portfolio-product .pp-title {
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.portfolio-product .pp-summary {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.92;
  margin-bottom: 16px;
}

/* Chips */
.portfolio-product .pp-chips {
  display: none;
}

.portfolio-product .pp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  white-space: nowrap;
}

.portfolio-product .pp-chip i {
  opacity: 0.8;
}

/* Sections */
.portfolio-product .pp-section {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  padding: 20px;
  background: rgba(255,255,255,0.6);
}

.portfolio-product .pp-section h2 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.portfolio-product .pp-body {
  max-width: 72ch;
  line-height: 1.7;
}

/* Specs */
.portfolio-product .pp-specs {
  display: grid;
  gap: 12px;
}

.portfolio-product .pp-spec {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  padding: 12px 14px;
  background: rgba(0,0,0,0.02);
}

.portfolio-product .pp-spec-k {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  margin-bottom: 4px;
}

.portfolio-product .pp-spec-v {
  font-size: 0.98rem;
  line-height: 1.45;
}

/* Buy links inside specs */
.portfolio-product .pp-buy-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
}

.portfolio-product .pp-buy-link::after {
  content: "↗";
  font-weight: 700;
  opacity: 0.7;
}

/* Side CTA */
.portfolio-product .pp-side-cta {
  margin-top: 14px;
  position: sticky;
  top: 110px;
}

@media (max-width: 991.98px) {
  .portfolio-product .pp-side-cta {
    position: static;
  }
}

.portfolio-product .pp-side-cta-inner {
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 18px;
  background: rgba(0,0,0,0.02);
}

.portfolio-product .pp-side-cta-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.portfolio-product .pp-side-cta-text {
  opacity: 0.9;
  line-height: 1.55;
  margin-bottom: 12px;
}

/* Divider */
.portfolio-product .pp-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 28px 0;
}

/* Related */
.portfolio-product .pp-related-card {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.6);
  text-decoration: none;
}

.portfolio-product .pp-related-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.portfolio-product .pp-related-body {
  padding: 14px;
}

.portfolio-product .pp-related-title {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 4px;
}

.portfolio-product .pp-related-meta {
  font-size: 0.95rem;
  opacity: 0.8;
}

.portfolio-product .pp-related-card:hover {
  border-color: rgba(0,0,0,0.20);
}


/* Licence chooser */
.portfolio-product .pp-lic-form { margin: 0; }
.portfolio-product .pp-lic-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.portfolio-product .pp-lic-options.pp-lic-options--single {
  grid-template-columns: 1fr;
}
.portfolio-product .pp-lic-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
}
.portfolio-product .pp-lic-option input { margin-top: 0; }
.portfolio-product .pp-lic-price { font-weight: 600; margin-left: auto; }

@media (max-width: 420px) {
  .portfolio-product .pp-lic-options {
    grid-template-columns: 1fr;
  }
}

/* Buy section (when embedded in description via [[BUY_NOW]]) */
.portfolio-product .pp-buy-cta {
  display: grid;
  gap: 10px;
}

/* Checkout card (for sellable portfolio items) */
.portfolio-product .pp-checkout-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.portfolio-product .pp-checkout-head {
  min-height: 44px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.portfolio-product .pp-checkout-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.portfolio-product .pp-checkout-sub {
  font-size: 0.92rem;
  opacity: 0.8;
  margin-top: 2px;
}

.portfolio-product .pp-checkout-body {
  padding: 0;
}

.portfolio-product .pp-checkout-actions {
  padding: 10px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* Make checkout actions feel premium */
.portfolio-product .c3p-buy-btn,
.portfolio-product .c3p-view-cart-btn,
.portfolio-product .c3p-checkout-btn,
.portfolio-product .c3p-buy-btn {
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

.portfolio-product .c3p-buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.14);
}

.portfolio-product .c3p-view-cart-btn:hover,
.portfolio-product .c3p-checkout-btn:hover,
.portfolio-product .c3p-cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.portfolio-product .c3p-checkout-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}


/* Cart action button (replaces checkout button on item page) */
.portfolio-product .c3p-cart-btn {
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 10px 14px;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
  background: #198754;
  border-color: #198754;
  color: #fff;
}

.portfolio-product .c3p-cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  background: color-mix(in srgb, #198754, #000 12%);
  border-color: color-mix(in srgb, #198754, #000 12%);
}

.portfolio-product .c3p-cart-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}

.portfolio-product .pp-checkout-actions .c3p-cart-btn {
  display: none; /* JS toggles visibility when cart has items */
}
/* Button colours */
.portfolio-product .c3p-checkout-btn {
  background: #198754;
  border-color: #198754;
  color: #fff;
}

.portfolio-product .c3p-checkout-btn:hover {
  background: color-mix(in srgb, #198754, #000 12%);
  border-color: color-mix(in srgb, #198754, #000 12%);
}

.portfolio-product .c3p-view-cart-btn {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.18);
  color: var(--default-color);
}

.portfolio-product .c3p-view-cart-btn:hover {
  border-color: rgba(0,0,0,0.28);
  background: rgba(0,0,0,0.02);
}

.portfolio-product .pp-checkout-actions .c3p-view-cart-btn {
  display: none; /* JS toggles visibility when cart has items */
}
