/* ================================================================
   VDP — inventory-detail.css
   Mobile-first. Breakpoints: 769px (tablet), 1025px (desktop)
   Scoped under .vdp-product for specificity over shared CSS
   ================================================================ */

/* --- Main container --- */
.vdp-product,
.vdp-specs {
  max-width: 1000px;
  margin: 16px auto 0;
  padding: 0 12px;
  overflow: hidden;
}

/* --- Image gallery --- */
.vdp-product .vdp-gallery {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 16px;
}

.vdp-product .vdp-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 350px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.vdp-gallery-main {
  position: relative;
}

.vdp-gallery-main #prevBtn,
.vdp-gallery-main #nextBtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}
.vdp-gallery-main #prevBtn {
  left: 8px;
}
.vdp-gallery-main #nextBtn {
  right: 8px;
}

.vdp-product .vdp-thumb-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  position: relative;
}

.vdp-product .vdp-thumbs {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.vdp-product .vdp-thumbs::-webkit-scrollbar {
  display: none;
}

.vdp-product .vdp-thumb {
  position: relative;
  flex: 0 0 64px;
  height: 50px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  scroll-snap-align: start;
}
.vdp-product .vdp-thumb:hover {
  border-color: var(--accent, #0096d7);
}

/* --- Per-thumb magnifier --- */
.vdp-product .vdp-thumb__zoom {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s,
    background-color 0.15s,
    transform 0.15s;
  padding: 0;
  z-index: 2;
}
.vdp-product .vdp-thumb:hover .vdp-thumb__zoom,
.vdp-product .vdp-thumb__zoom:focus-visible {
  opacity: 1;
}
.vdp-product .vdp-thumb__zoom:hover {
  background: rgba(17, 24, 39, 0.95);
  transform: scale(1.1);
}
@media (hover: none) {
  /* Touch devices: always visible so it's reachable without hover */
  .vdp-product .vdp-thumb__zoom {
    opacity: 0.9;
  }
}

/* --- Thumbnail nav arrows --- */
.thumb-nav {
  flex: 0 0 28px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #374151;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  transition:
    background-color 0.2s,
    opacity 0.2s;
}
.thumb-nav:hover {
  background: #1f2937;
}
.thumb-nav[disabled] {
  opacity: 0.3;
  cursor: default;
}

.vdp-product .vdp-sale-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}

/* --- Zoom button overlay (main image) --- */
.vdp-product .vdp-image {
  position: relative;
}
.vdp-product .vdp-zoom-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.2s,
    background-color 0.2s,
    transform 0.15s;
  z-index: 6;
  padding: 0;
}
.vdp-product .vdp-image:hover .vdp-zoom-btn,
.vdp-product .vdp-zoom-btn:focus-visible {
  opacity: 1;
}
.vdp-product .vdp-zoom-btn:hover {
  background: rgba(17, 24, 39, 0.9);
  transform: scale(1.05);
}
@media (hover: none) {
  .vdp-product .vdp-zoom-btn {
    opacity: 1;
  }
}

/* --- Lightbox modal --- */
.vdp-lightbox[hidden] {
  display: none;
}
.vdp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: vdp-lightbox-fade 0.18s ease-out;
}
@keyframes vdp-lightbox-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.vdp-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  cursor: zoom-out;
}
.vdp-lightbox__close,
.vdp-lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s,
    transform 0.15s;
  z-index: 10;
}
.vdp-lightbox__close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}
.vdp-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  border-radius: 6px;
  font-size: 36px;
  line-height: 1;
}
.vdp-lightbox__nav--prev {
  left: 16px;
}
.vdp-lightbox__nav--next {
  right: 16px;
}
.vdp-lightbox__close:hover,
.vdp-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.25);
}
.vdp-lightbox__nav:hover {
  transform: translateY(-50%) scale(1.05);
}
.vdp-lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
}
@media (max-width: 600px) {
  .vdp-lightbox {
    padding: 8px;
  }
  .vdp-lightbox__close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }
  .vdp-lightbox__nav {
    width: 36px;
    height: 52px;
    font-size: 28px;
  }
  .vdp-lightbox__nav--prev {
    left: 6px;
  }
  .vdp-lightbox__nav--next {
    right: 6px;
  }
}
body.vdp-lightbox-open {
  overflow: hidden;
}

/* --- Info panel --- */
.vdp-product .vdp-info {
  width: 100%;
  padding: 0 4px;
  background-color: #fff;
  border-radius: 12px;
}

.vdp-product .vdp-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #222;
}

.vdp-product .vdp-msrp {
  display: inline-block;
  background-color: #333;
  color: #fff;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 3px;
  margin-bottom: 4px;
}

.vdp-product .vdp-price-row {
  display: block;
  width: 100%;
  font-size: inherit;
  color: #222;
}

.vdp-product .vdp-price {
  font-size: 22px;
  font-weight: 700;
  color: #222;
}

.vdp-product .vdp-price--sale {
  color: var(--accent, #0096d7);
}

.vdp-product .vdp-price-strike {
  font-size: 15px;
}

.vdp-product .vdp-savings {
  font-size: 14px;
  color: var(--accent, #0096d7);
  font-weight: 600;
  margin-top: 2px;
  min-height: 0;
}

/* --- Inline description (right panel, between price and quick specs) --- */
.vdp-product .vdp-inline-desc {
  margin-bottom: 12px;
}
.vdp-product .vdp-inline-desc-text {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vdp-product .vdp-inline-desc-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
}
.vdp-product .vdp-inline-desc-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: var(--accent, #0096d7);
  cursor: pointer;
  font-weight: 500;
}
.vdp-product .vdp-inline-desc-toggle:hover {
  text-decoration: underline;
}

/* --- Quick specs row --- */
.vdp-product .vdp-quick-specs {
  display: flex;
  gap: 16px;
  width: 100%;
  margin: 12px 0;
  font-size: 12px;
  color: #222;
}

.vdp-product .vdp-quick-spec {
  flex: 1;
}

.vdp-product .vdp-quick-spec-label {
  padding: 4px 0;
  font-weight: 600;
  color: #666;
  font-size: 11px;
}

.vdp-product .vdp-quick-spec-value {
  padding: 4px 0;
  font-size: 13px;
}
.vdp-product .vdp-quick-spec-value:first-letter {
  text-transform: uppercase;
}

/* --- CTA buttons --- */
.vdp-product .vdp-cta {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  background-color: var(--accent, #0096d7);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s;
}
.vdp-product .vdp-cta:hover {
  opacity: 0.9;
}
.vdp-product .vdp-cta.cta-100 {
  background: var(--accent, #0096d7);
  color: #fff;
}
.vdp-product .vdp-cta.cta-80 {
  background: color-mix(in srgb, var(--accent, #0096d7) 80%, #fff);
  color: #fff;
}
.vdp-product .vdp-cta.cta-40 {
  background: color-mix(in srgb, var(--accent, #0096d7) 40%, #fff);
  color: #0e2947;
}
.vdp-product .vdp-cta.cta-20 {
  background: color-mix(in srgb, var(--accent, #0096d7) 20%, #fff);
  color: #0e2947;
}

.vdp-product .vdp-cta-outline {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border: 2px solid var(--accent, #0096d7);
  color: var(--accent, #0096d7);
  text-align: center;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.vdp-product .vdp-cta-outline:hover {
  background-color: var(--accent, #0096d7);
  color: #fff;
}

.vdp-product .vdp-calc-link,
.vdp-product .vdp-qual-link {
  color: var(--accent, #0096d7);
  text-decoration: underline;
}
.vdp-product .vdp-calc-link {
  display: inline-block;
  width: 100%;
  text-align: center;
}

.vdp-product .vdp-cta-group {
  margin-left: 0;
}

/* --- Action icons --- */
.vdp-product .vdp-actions {
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  text-align: center;
  height: auto;
}

.vdp-product .vdp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  text-decoration: none;
}
.vdp-product .vdp-action:hover {
  color: var(--accent, #0096d7);
}

.vdp-product .vdp-action-icon {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto;
}

.vdp-product .vdp-actions-wrap {
  clear: none;
  margin-bottom: 0;
}

/* --- Specifications --- */
.vdp-specs {
  background-color: #fff;
  border-radius: 12px;
  color: #222;
  padding: 16px 12px 24px;
  margin-top: 16px;
}

.vdp-specs h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.vdp-specs .vdp-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  width: 100%;
  margin-bottom: 0;
}
.vdp-specs .vdp-spec-row:last-child {
  border-bottom: none;
}

.vdp-specs .vdp-spec-label {
  font-weight: 600;
  color: #666;
  padding: 0;
}

.vdp-specs .vdp-spec-value {
  color: #222;
  text-align: right;
  padding: 0;
}
.vdp-specs .vdp-spec-value:first-letter {
  text-transform: uppercase;
}

/* --- Sale overlay --- */
.vdp-product .vdp-sale-holder {
  display: none;
}

.vdp-product .vdp-sale-badge {
  background-color: #fff;
  color: var(--accent, #0096d7);
  font-size: 20px;
  text-align: center;
}

/* --- Disclaimer --- */
.vdp-disclaimer {
  max-width: 1000px;
  margin: 16px auto;
  padding: 8px 12px;
  font-size: 12px;
  font-style: italic;
  color: #888;
  line-height: 1.5;
}

/* --- SVG icons --- */
.vdp-product svg {
  display: block;
  vertical-align: middle;
}

/* --- Visitor debug --- */
.vdp-debug {
  padding: 10px;
  background-color: #ddffff;
  color: #000;
  border: 2px solid black;
  width: 100%;
}

/* ================================================================
   TABLET+ (min-width: 769px)
   ================================================================ */
@media (min-width: 769px) {
  .vdp-product {
    display: flex;
    gap: 0;
    padding: 0;
  }

  .vdp-product .vdp-gallery {
    flex: 1 1 60%;
    margin-bottom: 0;
  }

  .vdp-product .vdp-info {
    flex: 0 0 36%;
    padding: 24px;
  }

  .vdp-product .vdp-thumb {
    flex: 0 0 80px;
    height: 60px;
  }

  .thumb-nav {
    height: 60px;
  }

  .vdp-specs {
    padding: 20px;
  }
}

/* ================================================================
   DESKTOP (min-width: 1025px)
   ================================================================ */
@media (min-width: 1025px) {
  .vdp-product {
    gap: 0;
  }

  .vdp-product .vdp-thumb {
    flex: 0 0 90px;
    height: 68px;
  }

  .thumb-nav {
    height: 68px;
  }

  .vdp-product .vdp-title {
    font-size: 24px;
  }

  .vdp-product .vdp-price {
    font-size: 26px;
  }

  .vdp-specs h2 {
    font-size: 22px;
  }
}

/* --- VDP Nav Buttons --- */
.vdp-nav-btn {
  background: #374151;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
}
.vdp-nav-btn:hover {
  background: #1f2937;
}

/* --- Feature Accordion (Design/Performance/Technology categories) --- */
.vdp-feature-category {
  border-bottom: 1px solid #e9eaeb;
}
.vdp-feature-category:last-child {
  border-bottom: none;
}
.vdp-feature-category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #181d27;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  margin-top: 8px;
  border-radius: 2px;
}
.vdp-feature-category-title::-webkit-details-marker {
  display: none;
}
.vdp-feature-category-title::after {
  content: "▾";
  font-size: 16px;
  transition: transform 0.2s;
}
details[open] > .vdp-feature-category-title::after {
  transform: rotate(-180deg);
}
.vdp-feature-list {
  list-style: none;
  padding: 12px 14px 14px;
  margin: 0;
}
.vdp-feature-item {
  margin-bottom: 10px;
  font-size: 14px;
  color: #181d27;
  line-height: 1.6;
}
.vdp-feature-item:last-child {
  margin-bottom: 0;
}
.vdp-feature-item strong {
  font-weight: 700;
}
