/* CSS Variables for fixed card dimensions */
:root {
  --docked-card-width: 168px;
  --docked-card-height: 132px;
  --docked-card-spacing: 1.1rem;
  --docked-sidebar-width: 210px;
}

/* Shimmer loading effect for sidebar placeholder */
.docked-sidebar.sidebar-loading .product-card.shimmer {
  background: linear-gradient(90deg, #f3f7ff 25%, #e3e9f7 50%, #f3f7ff 75%);
  background-size: 200% 100%;
  animation: shimmerBar 1.2s linear infinite;
  border: none;
  box-shadow: none;
}

@keyframes shimmerBar {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* Docked Product Bar Styles */
/*
  The JS `docked-product-bar.js` can add an `.expanded` class to product cards
  after a short delay to avoid flicker when the mouse grazes the card edges.
  The styles below duplicate :hover/:focus rules for `.expanded`.
*/

  .docked-sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: var(--docked-sidebar-width);
    height: calc(100vh - 70px);
    background: rgba(245, 248, 255, 0.88);
    backdrop-filter: blur(10px) saturate(1.2);
    border-right: 1.5px solid #d0d7e2;
    z-index: 1030;
    padding-top: 2.2rem;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 8px 0 32px 0 rgba(13,110,253,0.13), 0 1.5px 0 #e3e9f7;
    transition: box-shadow 0.2s, background 0.3s;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
  }

  /* Hide scrollbar for WebKit browsers */
  .docked-sidebar::-webkit-scrollbar {
    display: none;
  }
.docked-sidebar .sidebar-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #1a2a3d;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
  padding-left: 1.2rem;
  text-align: center;
  text-shadow: 0 1px 0 #fff, 0 2px 8px #e3e9f7;
}
.docked-sidebar .product-card {
  margin-bottom: var(--docked-card-spacing);
  border-radius: 0.45rem;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 4px 18px 0 rgba(13,110,253,0.10), 0 1.5px 0 #e3e9f7;
  border: 2px solid #e3e9f7;
  transition: border-color 400ms cubic-bezier(.2,.8,.2,1),
              box-shadow 450ms cubic-bezier(.2,.8,.2,1),
              background 400ms cubic-bezier(.2,.8,.2,1),
              transform 500ms cubic-bezier(.2,.8,.2,1),
              height 600ms cubic-bezier(.2,.8,.2,1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: var(--docked-card-width);
  height: var(--docked-card-height);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  z-index: 1;
}
.docked-sidebar .product-card.current {
  border-color: #0d6efd;
  background: linear-gradient(90deg, #e3e9f7 80%, #d0e6ff 100%);
  box-shadow: 0 12px 36px 0 rgba(13,110,253,0.22), 0 1.5px 0 #e3e9f7;
  color: #0d6efd;
  /* Anchor transforms to the top-left so expansion doesn't move the top edge */
  transform-origin: left top;
  /* Avoid pre-scaling here; rely on :hover/:focus expansion to match other cards */
}
.docked-sidebar .product-card.current::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #0d6efd 0%, #3b82f6 100%);
  border-radius: 6px 0 0 6px;
  box-shadow: 0 0 12px 2px rgba(13,110,253,0.13);
  animation: sidebarActivePulse 1.2s infinite alternate;
  z-index: 1;
}
@keyframes sidebarActivePulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}
.docked-sidebar .product-card:hover:not(.current),
.docked-sidebar .product-card:focus:not(.current),
.docked-sidebar .product-card:focus-within:not(.current),
.docked-sidebar .product-card.expanded:not(.current) {
  border-color: #6ea8fe;
  box-shadow: 0 10px 32px 0 rgba(13,110,253,0.18), 0 1.5px 0 #e3e9f7;
  background: linear-gradient(90deg, #f3f7ff 80%, #e3e9f7 100%);
  transform: translateY(-2px);
  /* Extend height to fit content dynamically */
  height: auto;
  min-height: calc(var(--docked-card-height) * 1.5);
  max-height: calc(100vh - 200px);
  z-index: 10;
  will-change: transform, box-shadow, height;
  transition: border-color 400ms cubic-bezier(.2,.8,.2,1),
              box-shadow 450ms cubic-bezier(.2,.8,.2,1),
              background 400ms cubic-bezier(.2,.8,.2,1),
              transform 500ms cubic-bezier(.2,.8,.2,1),
              height 600ms cubic-bezier(.2,.8,.2,1);
}

/* Current card hover effects */
.docked-sidebar .product-card.current:hover,
.docked-sidebar .product-card.current:focus,
.docked-sidebar .product-card.current:focus-within,
.docked-sidebar .product-card.current.expanded {
  /* Extend height to fit content dynamically */
  height: auto;
  min-height: calc(var(--docked-card-height) * 1.5);
  max-height: calc(100vh - 200px);
  z-index: 10;
  will-change: transform, box-shadow, height;
  transition: height 600ms cubic-bezier(.2,.8,.2,1),
              transform 500ms cubic-bezier(.2,.8,.2,1);
}
.docked-sidebar .product-card .card-body {
  padding: 0.6rem 0.7rem 0.5rem 0.7rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.docked-sidebar .product-card .card-body img {
  max-width: 100%;
  height: 54px;
  object-fit: contain;
  margin-bottom: 0.3rem;
  filter: drop-shadow(0 2px 8px #b6c8e6);
  border-radius: 0.2rem;
  background: #f3f7ff;
  transition: filter 160ms cubic-bezier(.2,.8,.2,1), box-shadow 160ms;
  display: block;
}

/* Image positioning in extended layout */
.docked-sidebar .product-card:hover .card-body img,
.docked-sidebar .product-card:focus .card-body img,
.docked-sidebar .product-card:focus-within .card-body img,
.docked-sidebar .product-card.expanded .card-body img,
.docked-sidebar .product-card.current:hover .card-body img,
.docked-sidebar .product-card.current:focus .card-body img,
.docked-sidebar .product-card.current:focus-within .card-body img,
.docked-sidebar .product-card.current.expanded .card-body img {
  grid-area: image;
  width: 50px;
  height: 50px;
  margin: 0;
  align-self: start;
}
.docked-sidebar .product-card.current img {
  filter: drop-shadow(0 4px 16px #0d6efd66);
  box-shadow: 0 0 0 2px #0d6efd33;
}
.docked-sidebar .product-card h6 {
  font-size: 1.09rem;
  font-weight: 700;
  color: #1a2a3d;
  margin-bottom: 0.3rem;
  letter-spacing: 0.1px;
  text-shadow: 0 1px 0 #fff, 0 2px 8px #e3e9f7;
}
.docked-sidebar .product-card .badge {
  font-size: 0.85rem;
  padding: 0.38em 0.9em;
  border-radius: 1em;
  font-weight: 600;
  box-shadow: 0 2px 8px #e3e9f7;
  margin-top: 0.2rem;
  background: linear-gradient(90deg, #0d6efd 60%, #3b82f6 100%);
  color: #fff;
  letter-spacing: 0.01em;
}
.docked-sidebar .product-card.current .badge {
  background: linear-gradient(90deg, #0d6efd 80%, #6ea8fe 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px #0d6efd44;
}
.docked-sidebar .product-card .badge.bg-secondary {
  background: linear-gradient(90deg, #adb5bd 80%, #e3e9f7 100%);
  color: #1a2a3d;
}

/* Additional-info hidden by default so normal card UI is unchanged
   use opacity + max-height to enable a smooth fade/slide reveal on hover */
.docked-sidebar .product-card .additional-info {
  display: block; /* keep in flow but collapsed so default UI doesn't change */
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  visibility: hidden;
  overflow: hidden;
  transition: opacity 500ms cubic-bezier(.2,.8,.2,1),
              transform 500ms cubic-bezier(.2,.8,.2,1),
              max-height 600ms cubic-bezier(.2,.8,.2,1),
              visibility 500ms cubic-bezier(.2,.8,.2,1);
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
}

/* Keep the newly-added name-price markup from changing normal layout
   by making it behave like its children (display: contents) when not hovered.
   Also hide the price by default so normal cards show exactly as before. */
.docked-sidebar .product-card .name-price {
  display: contents;
}
.docked-sidebar .product-card .price {
  display: none;
}

/* Name-price positioning in extended layout */
.docked-sidebar .product-card:hover .name-price,
.docked-sidebar .product-card:focus .name-price,
.docked-sidebar .product-card:focus-within .name-price,
.docked-sidebar .product-card.expanded .name-price,
.docked-sidebar .product-card.current:hover .name-price,
.docked-sidebar .product-card.current:focus .name-price,
.docked-sidebar .product-card.current:focus-within .name-price,
.docked-sidebar .product-card.current.expanded .name-price {
  grid-area: name-price;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
}

.docked-sidebar .product-card:hover .name-price h6,
.docked-sidebar .product-card:focus .name-price h6,
.docked-sidebar .product-card:focus-within .name-price h6,
.docked-sidebar .product-card.expanded .name-price h6,
.docked-sidebar .product-card.current:hover .name-price h6,
.docked-sidebar .product-card.current:focus .name-price h6,
.docked-sidebar .product-card.current:focus-within .name-price h6,
.docked-sidebar .product-card.current.expanded .name-price h6 {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.2;
}

.docked-sidebar .product-card:hover .price,
.docked-sidebar .product-card:focus .price,
.docked-sidebar .product-card:focus-within .price,
.docked-sidebar .product-card.expanded .price,
.docked-sidebar .product-card.current:hover .price,
.docked-sidebar .product-card.current:focus .price,
.docked-sidebar .product-card.current:focus-within .price,
.docked-sidebar .product-card.current.expanded .price {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0d6efd;
  margin: 0;
}

/* Extended card layout - image top-left, name/price top-right, description below */
.docked-sidebar .product-card:hover .card-body,
.docked-sidebar .product-card:focus .card-body,
.docked-sidebar .product-card:focus-within .card-body,
.docked-sidebar .product-card.expanded .card-body,
.docked-sidebar .product-card.current:hover .card-body,
.docked-sidebar .product-card.current:focus .card-body,
.docked-sidebar .product-card.current:focus-within .card-body,
.docked-sidebar .product-card.current.expanded .card-body {
  height: auto;
  min-height: 100%;
  position: relative;
  display: grid;
  grid-template-areas:
    "image name-price"
    "description description";
  grid-template-columns: 60px 1fr;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 0.8rem;
  align-items: start;
}

.docked-sidebar .product-card:hover .additional-info,
.docked-sidebar .product-card:focus .additional-info,
.docked-sidebar .product-card:focus-within .additional-info,
.docked-sidebar .product-card.expanded .additional-info,
.docked-sidebar .product-card.current:hover .additional-info,
.docked-sidebar .product-card.current:focus .additional-info,
.docked-sidebar .product-card.current:focus-within .additional-info,
.docked-sidebar .product-card.current.expanded .additional-info {
  grid-area: description;
  padding: 4px 0;
  font-size: 0.82rem;
  color: #6c757d;
  line-height: 1.4;
  overflow: visible;
  max-height: none;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  position: relative;
  margin: 0;
}

/* Subtle animated highlight for active card */
/* reduced-motion for users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .docked-sidebar .product-card,
  .docked-sidebar .product-card .card-body img {
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 991.98px) {
  .docked-sidebar { display: none !important; }
}
body.with-sidebar {
  margin-left: var(--docked-sidebar-width);
}
@media (max-width: 991.98px) {
  body.with-sidebar { margin-left: 0; }
}
