/* Showroom đàn piano — trang chủ (nền trắng, 1 hàng 4 thẻ, tự chạy) */

#homepage-pianos {
  --hp-accent: #2563eb;
  --hp-accent-soft: #eff6ff;
  --hp-text: #0f172a;
  --hp-muted: #64748b;
  --hp-border: #e2e8f0;
  --hp-card-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --hp-card-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.12);
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: var(--hp-text);
  padding: 4rem 0 4.5rem;
  border-top: 1px solid var(--hp-border);
  border-bottom: 1px solid var(--hp-border);
}

#homepage-pianos::before {
  content: none;
}

/* Khung ngang trùng #homepage-sky-news: container mx-auto px-6 */
.hp-pianos-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
}

html#homepage-html body#homepage-body #homepage-pianos .container.hp-pianos-inner {
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  max-width: none !important;
}

@media (min-width: 640px) {
  html#homepage-html body#homepage-body #homepage-pianos .container.hp-pianos-inner {
    max-width: 640px !important;
  }
}
@media (min-width: 768px) {
  html#homepage-html body#homepage-body #homepage-pianos .container.hp-pianos-inner {
    max-width: 768px !important;
  }
}
@media (min-width: 1024px) {
  html#homepage-html body#homepage-body #homepage-pianos .container.hp-pianos-inner {
    max-width: 1024px !important;
  }
}
@media (min-width: 1280px) {
  html#homepage-html body#homepage-body #homepage-pianos .container.hp-pianos-inner {
    max-width: 1280px !important;
  }
}
@media (min-width: 1536px) {
  html#homepage-html body#homepage-body #homepage-pianos .container.hp-pianos-inner {
    max-width: 1536px !important;
  }
}

.hp-pianos-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hp-pianos-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    text-align: left;
    margin-bottom: 2.25rem;
  }
}

.hp-pianos-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hp-accent);
}

.hp-pianos-title {
  margin-top: 0.45rem;
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--hp-text);
}

.hp-pianos-sub {
  margin-top: 0.65rem;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--hp-muted);
}

.hp-pianos-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid var(--hp-border);
  background: var(--hp-accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hp-accent);
  white-space: nowrap;
}

.hp-pianos-head-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .hp-pianos-head-actions {
    align-items: flex-end;
  }
}

/* Skeleton — 4 ô một hàng */
.hp-pianos-skeleton {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.hp-pianos-skel-card {
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px solid var(--hp-border);
  aspect-ratio: 3 / 4;
  animation: hp-pulse 1.4s ease-in-out infinite;
}

@media (max-width: 1023px) {
  .hp-pianos-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

@media (max-width: 639px) {
  #homepage-pianos {
    padding: 2.5rem 0 3rem;
  }

  .hp-pianos-head {
    margin-bottom: 1.15rem;
  }

  .hp-pianos-title {
    font-size: 1.35rem;
  }

  .hp-pianos-sub {
    font-size: 0.8rem;
  }

  .hp-pianos-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .hp-pianos-skel-card {
    aspect-ratio: 4 / 5;
  }

  .hp-pianos-carousel-wrap::before,
  .hp-pianos-carousel-wrap::after {
    display: none;
  }

  .hp-pianos-viewport {
    overflow: visible;
  }

  .hp-pianos-track.is-mobile-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    animation: none !important;
    justify-content: stretch;
  }

  .hp-pianos-track.is-mobile-grid .hp-piano-card-slot {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
  }

  .hp-piano-card {
    border-radius: 0.65rem;
  }

  .hp-piano-card-media {
    aspect-ratio: 1;
  }

  .hp-piano-card-media img {
    padding: 0.35rem;
  }

  .hp-piano-card-tag {
    top: 0.35rem;
    left: 0.35rem;
    font-size: 0.52rem;
    padding: 0.18rem 0.38rem;
  }

  .hp-piano-card-body {
    padding: 0.45rem 0.5rem 0.55rem;
  }

  .hp-piano-card-name {
    font-size: 0.72rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .hp-piano-card-meta {
    display: none;
  }

  .hp-piano-card-price {
    font-size: 0.78rem;
    padding-top: 0.3rem;
  }

  .hp-piano-card-rental {
    font-size: 0.58rem;
    margin-top: 0.2rem;
    line-height: 1.35;
  }

  .hp-piano-card-cta {
    font-size: 0.62rem;
    margin-top: 0.25rem;
  }

  .hp-piano-card-cta .fa-arrow-right {
    font-size: 0.55rem;
  }
}

@keyframes hp-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* Carousel */
.hp-pianos-carousel-wrap {
  position: relative;
}

.hp-pianos-carousel-wrap::before,
.hp-pianos-carousel-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  z-index: 2;
  pointer-events: none;
}

.hp-pianos-carousel-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #fff 30%, transparent);
}

.hp-pianos-carousel-wrap::after {
  right: 0;
  background: linear-gradient(270deg, #fff 30%, transparent);
}

@media (max-width: 639px) {
  .hp-pianos-carousel-wrap::before,
  .hp-pianos-carousel-wrap::after {
    width: 1.25rem;
  }
}

.hp-pianos-viewport {
  overflow: hidden;
  width: 100%;
  --hp-slot-width: 280px;
  --hp-visible: 4;
}

.hp-pianos-track {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
  will-change: transform;
}

.hp-pianos-track.is-static {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  flex-wrap: nowrap;
}

.hp-pianos-track.is-marquee {
  animation: hp-marquee var(--hp-marquee-duration, 48s) linear infinite;
}

.hp-pianos-track.is-marquee:hover {
  animation-play-state: paused;
}

@keyframes hp-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-pianos-track.is-marquee {
    animation: none;
  }
}

.hp-piano-card-slot {
  flex: 0 0 var(--hp-slot-width, 280px);
  width: var(--hp-slot-width, 280px);
  max-width: var(--hp-slot-width, 280px);
  min-width: 0;
  box-sizing: border-box;
}

.hp-piano-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100%;
  text-align: left;
  border: 1px solid var(--hp-border);
  cursor: pointer;
  border-radius: 1rem;
  background: #fff;
  color: var(--hp-text);
  overflow: hidden;
  box-shadow: var(--hp-card-shadow);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.hp-piano-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--hp-card-shadow-hover);
}

.hp-piano-card:focus-visible {
  outline: 3px solid var(--hp-accent);
  outline-offset: 2px;
}

.hp-piano-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 100%);
}

.hp-piano-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.65rem;
}

.hp-piano-card-tag {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  background: var(--hp-accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hp-piano-card-body {
  padding: 0.85rem 0.95rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hp-piano-card-name {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--hp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-piano-card-meta {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hp-muted);
}

.hp-piano-card-price {
  margin-top: auto;
  padding-top: 0.65rem;
  font-size: 1rem;
  font-weight: 800;
  color: #b45309;
}

.hp-piano-card-rental {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  font-weight: 600;
  color: #047857;
}

.hp-piano-card-rental-label {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hp-piano-card-rental-value {
  font-weight: 700;
}

.hp-piano-card-cta {
  margin-top: 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--hp-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hp-pianos-empty,
.hp-pianos-error {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 1rem;
  border: 1px dashed var(--hp-border);
  background: #f8fafc;
  font-size: 0.95rem;
  color: var(--hp-muted);
}

.hp-pianos-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

/* ——— Modal chi tiết (giao diện sáng, rõ ràng) ——— */
.hp-piano-modal {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hp-piano-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .hp-piano-modal {
    align-items: center;
    padding: 1.25rem;
  }
}

.hp-piano-modal-panel {
  position: relative;
  width: 100%;
  max-height: 96vh;
  max-width: min(96vw, 72rem);
  background: #fff;
  color: var(--hp-text);
  border-radius: 1.25rem 1.25rem 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.hp-piano-modal.is-open .hp-piano-modal-panel {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .hp-piano-modal-panel {
    border-radius: 1.35rem;
    max-height: min(94vh, 880px);
    transform: translateY(16px) scale(0.98);
  }

  .hp-piano-modal.is-open .hp-piano-modal-panel {
    transform: translateY(0) scale(1);
  }
}

.hp-piano-modal-close-fab {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.15);
  transition: background 0.2s, transform 0.15s;
}

.hp-piano-modal-close-fab:hover {
  background: #fff;
  transform: scale(1.05);
}

/* Hai cột: trái ảnh cố định, phải chỉ cuộn thông số + mô tả */
.hp-piano-modal-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}


.hp-piano-modal-gallery {
  position: relative;
  background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 100%);
  padding: 0.85rem 0.85rem 0.65rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 900px) {
  .hp-piano-modal-gallery {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: stretch;
  }
}

.hp-piano-modal-side {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}


.hp-piano-modal-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-top: 0.75rem;
  padding: 0 1.15rem 1rem;
}

@media (max-width: 899px) {
  .hp-piano-modal-detail-scroll {
    padding: 1.1rem 1.15rem 1.25rem;
  }
}

@media (min-width: 900px) {
  .hp-piano-modal-detail-scroll {
    padding: 0 1.5rem 1.15rem;
  }
}

.hp-piano-modal-img-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: clamp(220px, 42vh, 420px);
  width: 100%;
  padding: 0.5rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--hp-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 899px) {
  .hp-piano-modal-body {
    --hp-gallery-collapse: 0;
    --hp-hero-full: clamp(148px, 24vh, 200px);
    --hp-hero-img-max-w: min(78vw, 260px);
    --hp-hero-img-max-h: min(20vh, 168px);
  }

  .hp-piano-modal-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-columns: 1fr;
    max-height: min(96dvh, 96vh);
    height: min(96dvh, 96vh);
  }

  .hp-piano-modal-body {
    grid-row: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .hp-piano-modal-footer {
    grid-row: 2;
    flex: none;
    position: relative;
    z-index: 20;
    background: #fff;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
  }

  /* Ảnh full ngang — tên/giá nằm trong sheet trắng phía dưới */
  .hp-piano-modal-hero-shell {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    height: calc(
      (1 - var(--hp-gallery-collapse, 0)) * var(--hp-hero-full) + var(--hp-gallery-collapse, 0) * 4.5rem
    );
    max-height: calc(
      (1 - var(--hp-gallery-collapse, 0)) * var(--hp-hero-full) + var(--hp-gallery-collapse, 0) * 4.5rem
    );
    background: #fff;
    border-bottom: 1px solid var(--hp-border);
    transition:
      height 0.28s ease,
      max-height 0.28s ease;
  }

  .hp-piano-modal-gallery {
    position: absolute;
    inset: 0;
    z-index: 0;
    height: 100%;
    max-height: none;
    padding: 0;
    background: #fff;
    border: none;
  }

  .hp-piano-modal-img-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem 0.85rem;
    box-sizing: border-box;
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: #fff;
    transition: padding 0.28s ease;
  }

  .hp-piano-modal-thumbs {
    display: none !important;
  }

  .hp-piano-modal-main-img {
    display: none;
  }

  /* Nhiều ảnh: carousel full-width — không xếp scroll + main-img cạnh nhau */
  .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-main-img {
    display: none !important;
  }

  .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-img-stage {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0.75rem 0 0.85rem;
  }

  .hp-piano-modal-gallery.is-single-photo .hp-piano-modal-hero-scroll {
    display: none;
  }

  .hp-piano-modal-gallery.is-single-photo .hp-piano-modal-main-img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--hp-hero-img-max-w);
    max-height: var(--hp-hero-img-max-h);
  }

  .hp-piano-modal-hero-scroll {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-hero-scroll {
    align-self: stretch;
  }

  .hp-piano-modal-hero-scroll::-webkit-scrollbar {
    display: none;
  }

  .hp-piano-modal-hero-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    box-sizing: border-box;
  }

  .hp-piano-modal-hero-slide-img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--hp-hero-img-max-w);
    max-height: var(--hp-hero-img-max-h);
    object-fit: contain;
    object-position: center;
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: none;
  }

  .hp-piano-modal-gallery.is-single-photo .hp-piano-modal-main-img {
    object-fit: contain;
    object-position: center;
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: none;
  }

  .hp-piano-modal-close-fab {
    border: 1px solid var(--hp-border);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  }

  .hp-piano-modal-hero-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.65rem;
    z-index: 5;
    padding: 0 1rem;
    text-align: center;
    background: transparent;
    pointer-events: none;
  }

  .hp-piano-modal-hero-meta.hidden {
    display: none !important;
  }

  .hp-piano-modal-hero-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    min-height: 10px;
    pointer-events: auto;
  }

  .hp-piano-modal-hero-dot {
    flex-shrink: 0;
    box-sizing: border-box;
    width: 9px;
    height: 9px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
    cursor: pointer;
    transition:
      width 0.2s ease,
      background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .hp-piano-modal-hero-dot.is-active {
    width: 24px;
    background: #2563eb;
  }

  .hp-piano-modal-header {
    position: static;
    flex: 0 0 auto;
    flex-shrink: 0;
    margin: 0;
    padding: 1rem 1.15rem 0.65rem;
    border: none;
    border-bottom: 1px solid var(--hp-border);
    background: #fff;
  }

  .hp-piano-modal-tag {
    color: var(--hp-accent);
    background: var(--hp-accent-soft);
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hp-piano-modal-title-row {
    margin-top: 0.45rem;
  }

  .hp-piano-modal-name {
    margin-top: 0;
    color: var(--hp-text);
    text-shadow: none;
  }

  .hp-piano-modal-price {
    margin-top: 0.35rem;
    color: #b45309;
    text-shadow: none;
  }

  .hp-piano-modal-body.hp-gallery-collapsed .hp-piano-modal-hero-shell {
    height: 4.5rem;
    max-height: 4.5rem;
  }

  .hp-piano-modal-body.hp-gallery-collapsed .hp-piano-modal-hero-meta {
    display: none !important;
  }

  .hp-piano-modal-body.hp-gallery-collapsed .hp-piano-modal-img-stage {
    flex: 1;
    min-height: 0;
    max-height: none;
    padding: 0;
  }

  .hp-piano-modal-body.hp-gallery-collapsed .hp-piano-modal-thumbs {
    display: none;
    margin: 0;
  }

  .hp-piano-modal-side {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
    padding-top: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .hp-piano-modal-detail-scroll {
    flex: 1 1 0;
    min-height: 0;
    padding-top: 0.85rem;
    padding-bottom: 0.5rem;
  }

  .hp-piano-modal-close-fab {
    z-index: 12;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.28);
  }
}

@media (min-width: 900px) {
  .hp-piano-modal-hero-shell {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .hp-piano-modal-body {
    display: grid;
    grid-template-columns: 52% 48%;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    min-height: min(78vh, 720px);
    max-height: calc(94vh - 0px);
  }

  .hp-piano-modal-gallery {
    position: relative;
    inset: auto;
    flex: 1;
    height: auto;
    min-height: 0;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 100%);
    padding: 1.35rem 1.35rem 1rem;
    border-right: 1px solid var(--hp-border);
  }

  .hp-piano-modal-header {
    position: static;
    flex-shrink: 0;
    padding: 1.35rem 1.5rem 1rem;
    border-bottom: 1px solid var(--hp-border);
    background: #fff;
  }

  .hp-piano-modal-side {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding-top: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
    overflow: hidden;
  }

  .hp-piano-modal-tag {
    color: var(--hp-accent);
    background: var(--hp-accent-soft);
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hp-piano-modal-name {
    color: var(--hp-text);
    text-shadow: none;
  }

  .hp-piano-modal-price {
    color: #b45309;
    text-shadow: none;
  }

  .hp-piano-modal-hero-scroll,
  .hp-piano-modal-hero-meta {
    display: none !important;
  }

  .hp-piano-modal-main-img {
    display: block;
  }

  .hp-piano-modal-img-stage {
    grid-row: 1;
    flex: none;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    min-height: clamp(260px, 42vh, 460px);
    max-height: min(56vh, 520px);
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--hp-border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  }
}

.hp-piano-modal-main-img {
  display: block;
  flex: 0 1 auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
}

.hp-piano-modal-thumbs {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.25rem;
  scrollbar-width: thin;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .hp-piano-modal-thumbs {
    grid-row: 2;
    margin-top: 0.65rem;
  }
}

.hp-piano-modal-thumbs.hidden {
  display: none;
}

#hp-piano-modal-spec-block.hidden {
  display: none;
}

.hp-piano-modal-thumb {
  flex: 0 0 4.25rem;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 0.65rem;
  border: 2px solid transparent;
  background: #fff;
  padding: 0.15rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}

.hp-piano-modal-thumb.is-active {
  border-color: var(--hp-accent);
}

.hp-piano-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hp-piano-modal-header {
  flex-shrink: 0;
  padding: 1.15rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--hp-border);
  background: #fff;
}

@media (min-width: 900px) {
  .hp-piano-modal-header {
    padding: 1.35rem 1.5rem 1rem;
  }
}

.hp-piano-modal-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-accent);
  background: var(--hp-accent-soft);
  padding: 0.25rem 0.55rem;
  border-radius: 0.35rem;
}

.hp-piano-modal-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--hp-text);
}

.hp-piano-modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.55rem;
}

.hp-piano-modal-warranty {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  margin: 0;
  padding-top: 0.1rem;
  max-width: 7.5rem;
  text-align: right;
}

.hp-piano-modal-warranty.hidden {
  display: none !important;
}

.hp-piano-modal-warranty-label {
  margin: 0;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #94a3b8;
}

.hp-piano-modal-warranty-value-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-wrap: nowrap;
  max-width: 100%;
}

.hp-piano-modal-warranty-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--hp-accent);
  white-space: nowrap;
}

.hp-piano-warranty-help {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--hp-accent-soft);
  color: var(--hp-accent);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hp-piano-warranty-help.hidden {
  display: none !important;
}

.hp-piano-warranty-help:active {
  opacity: 0.85;
  transform: scale(0.96);
}

.hp-piano-modal-price {
  margin-top: 0.55rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #b45309;
}

.hp-piano-modal-rental {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: linear-gradient(165deg, #ecfdf5 0%, #f8fafc 100%);
}

.hp-piano-modal-rental.hidden {
  display: none !important;
}

.hp-piano-modal-rental-title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #047857;
}

.hp-piano-modal-rental-grid {
  display: grid;
  gap: 0.4rem;
}

.hp-piano-modal-rental-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.8125rem;
}

.hp-piano-modal-rental-label {
  color: #64748b;
  font-weight: 600;
}

.hp-piano-modal-rental-value {
  color: #047857;
  font-weight: 800;
  text-align: right;
}

.hp-piano-modal-policies {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hp-piano-modal-policies.hidden {
  display: none !important;
}

.hp-piano-modal-warranty-row {
  display: none !important;
}

.hp-piano-policy-acc.hidden {
  display: none !important;
}

.hp-piano-policy-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 0.65rem;
  background: #f8fafc;
  color: var(--hp-accent-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.hp-piano-policy-toggle.hidden {
  display: none !important;
}

.hp-piano-policy-toggle-label {
  flex: 1;
  min-width: 0;
}

.hp-piano-policy-chevron {
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.22s ease;
}

.hp-piano-policy-toggle.is-open .hp-piano-policy-chevron {
  transform: rotate(180deg);
}

.hp-piano-policy-toggle:hover {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.4);
}

.hp-piano-policy-body {
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #334155;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hp-piano-policy-body.hidden {
  display: none !important;
}

.hp-piano-policy-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.35rem;
}

.hp-piano-spec-title {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-muted);
  margin: 0 0 0.55rem;
  padding-top: 0.12rem;
}

.hp-piano-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.hp-piano-spec-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (min-width: 480px) {
  .hp-piano-spec-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hp-piano-spec-item {
  padding: 0.6rem 0.7rem;
  border-radius: 0.55rem;
  background: #f8fafc;
  border: 1px solid var(--hp-border);
  font-size: 0.8rem;
}

.hp-piano-spec-label {
  display: block;
  color: var(--hp-muted);
  font-weight: 600;
  margin-bottom: 0.1rem;
  font-size: 0.65rem;
}

.hp-piano-spec-value {
  font-weight: 800;
  color: var(--hp-text);
  font-size: 0.78rem;
}

.hp-piano-modal-detail-scroll .hp-piano-modal-spec-block:first-child {
  margin-top: 0;
  padding-top: 0.15rem;
}

.hp-piano-modal-desc-wrap {
  margin-top: 1rem;
  padding-bottom: 0.25rem;
}

.hp-piano-modal-desc-wrap.hidden {
  display: none;
}

.hp-piano-modal-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #475569;
}

.hp-piano-modal-desc p {
  margin-bottom: 0.6em;
}

.hp-piano-modal-desc img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.hp-piano-modal-video-wrap {
  position: relative;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  padding-bottom: 56.25%;
  height: 0;
  min-height: 11rem;
  flex-shrink: 0;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--hp-border);
}

.hp-piano-modal-video-wrap.hidden {
  display: none !important;
  padding-bottom: 0;
  height: 0;
  margin: 0;
  border: none;
}

.hp-piano-modal-video-wrap iframe,
#hp-piano-modal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.hp-piano-modal-footer {
  flex-shrink: 0;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hp-border);
  background: #fff;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  position: relative;
  z-index: 7;
}

@media (min-width: 900px) {
  .hp-piano-modal-footer {
    padding: 0.9rem 1.5rem 1rem;
  }
}

.hp-piano-btn-primary {
  display: flex !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1.25rem;
  border-radius: 0.65rem;
  border: none;
  background: var(--hp-accent);
  color: #fff !important;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
  opacity: 1 !important;
  visibility: visible !important;
  transition: background 0.2s;
}

.hp-piano-btn-primary:hover {
  background: #1d4ed8;
}

.hp-piano-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--hp-border);
  background: #fff;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.hp-piano-btn-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* Override trang chủ */
html#homepage-html body#homepage-body #homepage-pianos,
html#homepage-html body#homepage-body #homepage-pianos * {
  box-sizing: border-box;
}

html#homepage-html body#homepage-body #homepage-pianos .hp-piano-card,
html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-panel {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html#homepage-html body#homepage-body #hp-piano-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100020 !important;
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-panel {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0 !important;
  overflow: hidden !important;
}

@media (min-width: 900px) {
  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-panel {
    max-height: min(94vh, 880px) !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-body {
    display: grid !important;
    grid-template-columns: 52% 48% !important;
    grid-template-rows: minmax(0, 1fr) !important;
    flex: 1 1 auto !important;
    min-height: min(78vh, 720px) !important;
    max-height: calc(94vh - 4.5rem) !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-hero-shell {
    display: flex !important;
    flex-direction: column !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-side {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery {
  overflow: hidden !important;
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-side {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

@media (max-width: 899px) {
  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-panel {
    display: flex !important;
    flex-direction: column !important;
    height: min(96dvh, 96vh) !important;
    max-height: min(96dvh, 96vh) !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-side {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-detail-scroll {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    padding-top: 0.85rem !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-footer {
    flex: 0 0 auto !important;
    display: flex !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
    background: #fff !important;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12) !important;
  }
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-detail-scroll {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-footer {
  display: flex !important;
  width: 100% !important;
  flex-shrink: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 7 !important;
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-btn-primary {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: #fff !important;
  background: #2563eb !important;
  pointer-events: auto !important;
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-close-fab {
  position: absolute !important;
}

html#homepage-html body#homepage-body #homepage-pianos .hp-piano-card-tag {
  position: absolute !important;
}

#homepage-pianos .hp-is-hidden,
#homepage-pianos .hidden,
#hp-piano-modal .hidden {
  display: none !important;
}

html#homepage-html body#homepage-body #homepage-pianos .hp-piano-card {
  display: flex !important;
}

html#homepage-html body#homepage-body #homepage-pianos .hp-pianos-track:not(.is-mobile-grid) {
  display: flex !important;
}

html#homepage-html body#homepage-body #homepage-pianos .hp-pianos-track.is-mobile-grid {
  display: grid !important;
}

html#homepage-html body#homepage-body #homepage-pianos .hp-piano-card-media {
  position: relative !important;
}

html#homepage-html body#homepage-body #homepage-pianos .hp-piano-card-media img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

@media (max-width: 899px) {
  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-hero-shell {
    position: relative !important;
    overflow: hidden !important;
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
    max-height: none !important;
    padding: 0 !important;
    background: #fff !important;
    border: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-img-stage {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0.75rem 1rem 0.85rem !important;
    box-sizing: border-box !important;
    border: none !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-header {
    position: static !important;
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-hero-meta {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0.65rem !important;
    z-index: 5 !important;
    background: transparent !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-name {
    color: #0f172a !important;
    text-shadow: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-price {
    color: #b45309 !important;
    text-shadow: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-tag {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-hero-slide-img,
  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery.is-single-photo .hp-piano-modal-main-img {
    width: auto !important;
    height: auto !important;
    max-width: min(78vw, 260px) !important;
    max-height: min(20vh, 168px) !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #fff !important;
    border-radius: 0.25rem !important;
    box-shadow: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-hero-dot {
    background: rgba(15, 23, 42, 0.22) !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-hero-dot.is-active {
    background: #2563eb !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-close-fab {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08) !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-main-img {
    display: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery.is-single-photo .hp-piano-modal-main-img {
    display: block !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-img-stage {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 0.75rem 0 0.85rem !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-main-img {
    display: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-hero-scroll {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-hero-slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: start !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-hero-scroll {
    display: flex !important;
    height: 100% !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-gallery.is-single-photo .hp-piano-modal-hero-scroll {
    display: none !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-side {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-video-wrap {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 56.25% !important;
    min-height: 11rem !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-video-wrap.hidden {
    display: none !important;
    min-height: 0 !important;
    padding-bottom: 0 !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-video-wrap iframe,
  html#homepage-html body#homepage-body #hp-piano-modal #hp-piano-modal-video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    display: block !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-spec-block,
  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-desc-wrap {
    flex-shrink: 0 !important;
    width: 100% !important;
  }
}

@media (min-width: 900px) {
  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-img-stage {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    aspect-ratio: 4 / 3 !important;
    min-height: clamp(260px, 42vh, 460px) !important;
    max-height: min(56vh, 520px) !important;
    height: auto !important;
  }

  html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-main-img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}

html#homepage-html body#homepage-body #hp-piano-modal .hp-piano-modal-thumb img {
  object-fit: contain !important;
}

/* ——— Trang danh sách đầy đủ /dan-piano.html ——— */
#piano-catalog-page {
  --hp-accent: #2563eb;
  --hp-accent-soft: #eff6ff;
  --hp-text: #0f172a;
  --hp-muted: #64748b;
  --hp-border: #e2e8f0;
  --hp-card-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --hp-card-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.12);
  color: var(--hp-text);
}

.hp-catalog-hero {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 1.75rem;
  border: 1px solid var(--hp-border);
  background: #fff;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 24px 70px -28px rgba(15, 23, 42, 0.15);
}

@media (min-width: 768px) {
  .hp-catalog-hero {
    text-align: left;
    padding: 2.5rem 2.25rem 2rem;
  }
}

.hp-catalog-count-badge {
  margin-top: 1.25rem;
  display: inline-flex;
}

.hp-catalog-search-wrap {
  margin-bottom: 1.25rem;
}

.hp-catalog-search-wrap.hidden {
  display: none !important;
}

.hp-catalog-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 1rem;
  border: 1px solid var(--hp-border);
  background: #fff;
  padding: 0.65rem 0.85rem 0.65rem 1rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hp-catalog-search:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.hp-catalog-search-icon {
  flex-shrink: 0;
  color: #64748b;
  font-size: 1rem;
}

.hp-catalog-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--hp-text);
  outline: none;
}

.hp-catalog-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.hp-catalog-search-input::-webkit-search-cancel-button {
  display: none;
}

.hp-catalog-search-clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.hp-catalog-search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.hp-catalog-search-clear.hidden {
  display: none !important;
}

.hp-catalog-search-empty {
  grid-column: 1 / -1;
  border-radius: 1rem;
  border: 1px dashed var(--hp-border);
  background: #fff;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hp-muted);
}

.hp-catalog-search-empty.hidden {
  display: none !important;
}

.hp-pianos-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hp-accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.hp-pianos-view-all:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tailwind `.hidden` bị override bởi display:grid/flex bên dưới (home-pianos load sau neiht-tailwind) */
.hp-pianos-skeleton.hidden,
#hp-pianos-skeleton.hidden,
.hp-catalog-skeleton.hidden,
#hp-catalog-skeleton.hidden,
.hp-catalog-grid.hidden,
#hp-catalog-grid.hidden {
  display: none !important;
}

.hp-catalog-skeleton {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .hp-catalog-skeleton {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hp-catalog-skeleton {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .hp-catalog-skel-extra:nth-child(n + 5) {
    display: none;
  }
}

.hp-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .hp-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

@media (min-width: 1024px) {
  .hp-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

#piano-catalog-page .hp-catalog-grid .hp-piano-card-slot {
  flex: none;
  width: 100%;
  max-width: 100%;
}

#piano-catalog-page .hp-piano-card-meta {
  display: block;
}

.hp-catalog-empty,
.hp-catalog-error {
  margin-top: 1.5rem;
  padding: 2.5rem 1.5rem;
  border-radius: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.hp-catalog-empty {
  border: 1px dashed var(--hp-border);
  background: #fff;
  color: var(--hp-muted);
}

.hp-catalog-error {
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fef2f2, #fff);
  color: #b91c1c;
}

/* Modal — rule chung (trang chủ + /dan-piano.html, không phụ thuộc #homepage-html) */
#hp-piano-modal {
  position: fixed;
  inset: 0;
  z-index: 100020;
}

@media (min-width: 900px) {
  #hp-piano-modal .hp-piano-modal-panel {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    max-height: min(94vh, 880px) !important;
  }

  #hp-piano-modal .hp-piano-modal-body {
    display: grid !important;
    grid-template-columns: 52% 48% !important;
    grid-template-rows: minmax(0, 1fr) !important;
    flex: 1 1 auto !important;
    min-height: min(78vh, 720px) !important;
    max-height: calc(94vh - 4.5rem) !important;
    overflow: hidden !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-shell {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  #hp-piano-modal .hp-piano-modal-side {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #hp-piano-modal .hp-piano-modal-footer {
    flex: 0 0 auto !important;
    grid-row: unset !important;
    grid-column: unset !important;
  }
}

#hp-piano-modal .hp-piano-modal-footer {
  display: flex !important;
  flex-shrink: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#hp-piano-modal .hp-piano-modal-footer .hp-piano-btn-primary,
#hp-piano-modal #hp-piano-modal-contact {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  color: #fff !important;
  background: #2563eb !important;
  text-decoration: none !important;
}

@media (max-width: 899px) {
  #hp-piano-modal .hp-piano-modal-panel {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    height: min(96dvh, 96vh) !important;
    max-height: min(96dvh, 96vh) !important;
  }

  #hp-piano-modal .hp-piano-modal-body {
    grid-row: 1 !important;
    grid-column: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #hp-piano-modal .hp-piano-modal-side {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #hp-piano-modal .hp-piano-modal-detail-scroll {
    flex: 1 1 0 !important;
    min-height: 0 !important;
  }

  #hp-piano-modal .hp-piano-modal-footer {
    grid-row: 2 !important;
    grid-column: 1 !important;
    display: flex !important;
    flex: none !important;
    position: relative !important;
    z-index: 30 !important;
    background: #fff !important;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.14) !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-shell,
  #hp-piano-modal .hp-piano-modal-gallery,
  #hp-piano-modal .hp-piano-modal-img-stage {
    background: #fff !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-shell {
    border-bottom: 1px solid #e2e8f0 !important;
  }

  #hp-piano-modal .hp-piano-modal-img-stage {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem 1rem 0.85rem !important;
    box-sizing: border-box !important;
  }

  #hp-piano-modal .hp-piano-modal-close-fab {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08) !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-dot {
    background: rgba(15, 23, 42, 0.22) !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-dot.is-active {
    background: #2563eb !important;
  }

  #hp-piano-modal .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-img-stage {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 0.75rem 0 0.85rem !important;
  }

  #hp-piano-modal .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-main-img {
    display: none !important;
  }

  #hp-piano-modal .hp-piano-modal-gallery.hp-has-multi-photo .hp-piano-modal-hero-scroll {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    scroll-snap-align: start !important;
    padding: 0 0.75rem !important;
    box-sizing: border-box !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-scroll {
    box-sizing: border-box !important;
  }

  #hp-piano-modal .hp-piano-modal-hero-slide-img,
  #hp-piano-modal .hp-piano-modal-gallery.is-single-photo .hp-piano-modal-main-img {
    width: auto !important;
    height: auto !important;
    max-width: min(78vw, 260px) !important;
    max-height: min(20vh, 168px) !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #fff !important;
    border-radius: 0.25rem !important;
    box-shadow: none !important;
  }
}

body.hp-piano-modal-open {
  overflow: hidden !important;
}

/* ——— Phóng to ảnh: PC hover, mobile lightbox ——— */
@media (min-width: 900px) {
  .hp-piano-modal-img-stage.hp-img-stage-zoom {
    cursor: crosshair;
    overflow: hidden;
  }

  .hp-piano-modal-img-stage.hp-img-stage-zoom.is-zoom-active .hp-piano-modal-main-img {
    transition: transform 0.1s ease-out;
    will-change: transform;
  }
}

@media (max-width: 899px) {
  .hp-piano-modal-img-stage.hp-img-stage-zoom .hp-piano-modal-main-img,
  .hp-piano-modal-img-stage.hp-img-stage-zoom .hp-piano-modal-hero-slide-img {
    cursor: zoom-in;
  }
}

.hp-piano-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  touch-action: none;
}

.hp-piano-lightbox.is-open {
  display: flex;
}

.hp-piano-lightbox-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.hp-piano-lightbox-viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  padding: max(3.5rem, env(safe-area-inset-top, 0px)) 0.75rem
    max(1rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.hp-piano-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

body.hp-piano-lightbox-open {
  overflow: hidden !important;
}
