/* ══════════════════════════════════════════
   Inventory Detail Page — Full Redesign
   ══════════════════════════════════════════ */

/* ── Breadcrumb bar ── */
.invd-crumb {
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  padding: .85rem 2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.invd-crumb a,
.invd-crumb span {
  font-size: .8rem;
  font-weight: 500;
  color: var(--slate-400);
  text-decoration: none;
  transition: color .15s;
}
.invd-crumb a:hover { color: var(--blue); }
.invd-crumb .sep {
  color: var(--slate-300);
  font-size: .75rem;
  user-select: none;
}
.invd-crumb .current {
  color: var(--slate-700);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* ── Page wrapper ── */
.invd-page {
  max-width: 1280px;
  margin: 2.5rem auto 0;
  padding: 0 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2.5rem;
  align-items: start;
}

/* ══ LEFT COLUMN ══ */
.invd-left { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }

/* Gallery */
.invd-gallery { display: flex; flex-direction: column; gap: .75rem; }

.invd-main-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--slate-100);
  box-shadow: 0 4px 30px rgb(0 0 0 / .09);
}
.invd-main-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform .35s ease;
}
.invd-main-wrap:hover img { transform: scale(1.025); }

.invd-img-count {
  position: absolute;
  bottom: .85rem;
  right: .85rem;
  background: rgba(15, 23, 42, .65);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .3rem .7rem;
  border-radius: 999px;
  pointer-events: none;
}
.invd-zoom-hint {
  position: absolute;
  bottom: .85rem;
  left: .85rem;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.85);
  font-size: .68rem;
  font-weight: 500;
  padding: .28rem .65rem;
  border-radius: 999px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.invd-thumbs {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}
.invd-thumb {
  width: 80px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  outline: none;
  background: var(--slate-100);
  flex-shrink: 0;
  transition: border-color .15s, box-shadow .15s;
}
.invd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.invd-thumb:hover { border-color: var(--blue-300); }
.invd-thumb.active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }

/* Add-ons card (left column, below gallery) */
.invd-addons-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--slate-100);
  box-shadow: 0 2px 14px rgb(0 0 0 / .05);
  overflow: hidden;
}
.invd-addons-card__head {
  padding: 1.1rem 1.5rem .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.invd-addons-card__head-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-400);
}
.invd-addons-card__count {
  font-size: .68rem;
  font-weight: 700;
  background: var(--blue-100);
  color: var(--blue);
  padding: .15rem .55rem;
  border-radius: 999px;
}
.invd-addons-list { padding: .4rem 1.5rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.invd-addon {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: 10px;
}
.invd-addon__name { flex: 1; font-size: .875rem; font-weight: 500; color: var(--slate-700); }
.invd-addon__qty {
  font-size: .72rem;
  font-weight: 700;
  color: var(--slate-500);
  background: var(--slate-200);
  padding: .2rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.invd-addon__price { font-weight: 700; color: var(--blue); font-size: .9rem; white-space: nowrap; min-width: 60px; text-align: right; }

/* ══ RIGHT COLUMN (sticky panel) ══ */
.invd-panel {
  position: sticky;
  top: calc(var(--header-offset) + 1.25rem);
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--slate-100);
  box-shadow: 0 6px 40px rgb(0 0 0 / .08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.invd-panel__top {
  background: linear-gradient(135deg, #1a2e7a 0%, #1E40AF 60%, #2563eb 100%);
  padding: 1.75rem 1.75rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.invd-panel__top::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 0%, rgba(255,255,255,.08) 0%, transparent 65%);
  pointer-events: none;
}
.invd-panel__model {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: .3rem;
  position: relative;
}
.invd-panel__sub {
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  font-weight: 500;
  position: relative;
}
.invd-panel__price-wrap {
  margin-top: 1.1rem;
  display: flex;
  align-items: flex-end;
  gap: .6rem;
  position: relative;
}
.invd-panel__price {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1;
}
.invd-panel__price-label {
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  margin-bottom: .25rem;
}

.invd-panel__badges {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  padding: 1rem 1.75rem .75rem;
  border-bottom: 1px solid var(--slate-100);
}
.invd-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .3rem .85rem;
  border-radius: 999px;
}
.invd-badge--green { background: #dcfce7; color: #15803d; }
.invd-badge--blue  { background: var(--blue-100); color: var(--blue); }
.invd-badge--slate { background: var(--slate-100); color: var(--slate-600); }

/* Specs inside panel */
.invd-panel__body { padding: 1.25rem 1.75rem; flex: 1; }

.invd-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--slate-300);
  margin-bottom: .9rem;
}

.invd-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 1.25rem;
}
.invd-spec { display: flex; flex-direction: column; gap: .18rem; }
.invd-spec__label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.invd-spec__value {
  font-size: .875rem;
  font-weight: 600;
  color: var(--slate-800);
}

/* CTA area */
.invd-panel__cta {
  padding: 1.25rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  border-top: 1px solid var(--slate-100);
  background: var(--slate-50);
}
.invd-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.5rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .18s;
  letter-spacing: .01em;
  border: none;
}
.invd-btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 16px rgb(30 64 175 / .28);
}
.invd-btn--primary:hover {
  background: var(--blue-700);
  box-shadow: 0 6px 20px rgb(30 64 175 / .38);
  transform: translateY(-1px);
}
.invd-btn--secondary {
  background: #fff;
  color: var(--slate-600);
  border: 1.5px solid var(--slate-200);
}
.invd-btn--secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-50);
}

/* ── Other Buildings ── */
.inv-other {
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  padding: 4rem 2rem 5rem;
}
.inv-other__inner { max-width: 1280px; margin: 0 auto; }
.inv-other__heading { display: flex; align-items: baseline; gap: .9rem; margin-bottom: .35rem; }
.inv-other__heading h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--slate-900);
}
.inv-other__heading-count {
  font-size: .78rem;
  font-weight: 700;
  background: var(--blue-100);
  color: var(--blue);
  padding: .2rem .65rem;
  border-radius: 999px;
}
.inv-other__sub {
  font-size: .875rem;
  color: var(--slate-400);
  margin-bottom: 2rem;
}
.inv-other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.inv-other-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--slate-100);
  box-shadow: 0 2px 10px rgb(0 0 0 / .05);
  transition: box-shadow .22s, transform .22s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.inv-other-card:hover {
  box-shadow: 0 10px 28px rgb(0 0 0 / .1);
  transform: translateY(-4px);
}
.inv-other-card__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--slate-100);
  position: relative;
}
.inv-other-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .32s; display: block; }
.inv-other-card:hover .inv-other-card__img img { transform: scale(1.05); }
.inv-other-card__body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.inv-other-card__model { font-size: .9rem; font-weight: 700; color: var(--slate-800); margin-bottom: .15rem; }
.inv-other-card__meta { font-size: .78rem; color: var(--slate-400); margin-bottom: .85rem; }
.inv-other-card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inv-other-card__price { font-size: 1.15rem; font-weight: 800; color: var(--blue); }
.inv-other-card__cta {
  font-size: .75rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-50);
  border: 1.5px solid var(--blue-200);
  padding: .4rem .8rem;
  border-radius: 8px;
  transition: all .18s;
  text-decoration: none;
}
.inv-other-card:hover .inv-other-card__cta { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── Lightbox ── */
.invd-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.invd-lightbox.open { display: flex; }
.invd-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 25px 60px rgb(0 0 0 / .5);
}
.invd-lightbox__close {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s;
  line-height: 1;
}
.invd-lightbox__close:hover { background: rgba(255,255,255,.25); }

/* Add-ons visibility: desktop shows in left col, mobile shows in panel */
.invd-addons--mobile { display: none; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .invd-page {
    grid-template-columns: 1fr;
    padding: 0 1.25rem 4rem;
    margin-top: 1.75rem;
    gap: 1.75rem;
  }
  .invd-panel { position: static; }
  .invd-left { order: 1; }
  .invd-panel { order: 2; }
  .invd-crumb { padding: .75rem 1.25rem; }
  .invd-addons--desktop { display: none; }
  .invd-addons--mobile { display: block; }
}
@media (max-width: 540px) {
  .invd-panel__price { font-size: 2rem; }
  .invd-panel__model { font-size: 1.3rem; }
  .invd-specs-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .inv-other-grid { grid-template-columns: 1fr; }
  .inv-other { padding: 3rem 1.25rem 4rem; }
  .invd-thumb { width: 68px; height: 52px; }
}