/* Product detail page */
.royal-product-detail {
  padding: 5.5rem 0 4rem;
  background: #edf2f9;
}

.product-detail-page .container {
  background: #edf2f9;
}

.royal-product-detail-shell {
  flex: 1;
  min-width: 0;
}

.royal-product-detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(22rem, 0.98fr);
  gap: 1.75rem;
  align-items: start;
  margin-bottom: 2rem;
}

.royal-product-detail-gallery,
.royal-product-detail-info,
.royal-product-detail-tabs,
.royal-product-detail-related {
  background: #edf2f9;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.royal-product-detail-gallery {
  position: sticky;
  top: 120px;
  padding: 1.35rem;
}

.royal-product-detail-swiper-main {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
}

.royal-product-detail-image-wrapper {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  background: #edf2f9;
  position: relative;
  cursor: zoom-in;
}

.royal-product-detail-image,
.royal-product-detail-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.royal-product-detail-swiper-main .swiper-wrapper,
.royal-product-detail-swiper-thumbs .swiper-wrapper,
.royal-product-detail-swiper-main .swiper-slide,
.royal-product-detail-swiper-thumbs .swiper-slide {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.royal-product-detail-magnifier {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  border: none;
  box-shadow: none;
  background: #edf2f9;
  display: none;
  z-index: 5;
}

.royal-product-detail-magnifier.is-active {
  display: block;
}

.royal-product-detail-magnifier img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(2.2);
  transform-origin: center center;
}

.royal-product-detail-swiper-thumbs {
  overflow: hidden;
}

.royal-product-detail-thumb-wrapper {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: #edf2f9;
  cursor: pointer;
}

.swiper-slide-thumb-active .royal-product-detail-thumb-wrapper {
  border: none;
  box-shadow: none;
}

.royal-product-detail-swiper-button-prev,
.royal-product-detail-swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0;
  background: transparent;
  color: #153a7a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: none;
  cursor: pointer;
}

.royal-product-detail-swiper-button-prev {
  left: 1rem;
}

.royal-product-detail-swiper-button-next {
  right: 1rem;
}

.royal-product-detail-swiper-button-prev i,
.royal-product-detail-swiper-button-next i {
  font-size: 1.1rem;
}

.royal-product-detail-info {
  padding: 2rem;
}

.royal-product-detail-header {
  margin-bottom: 0.85rem;
}

.royal-product-detail-overline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: transparent;
  color: #153a7a;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.royal-product-detail-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 2.2vw, 2.8rem);
  line-height: 1.15;
  color: #18263f;
}

.royal-product-detail-summary {
  margin: 0 0 1.25rem;
  color: #58657b;
  font-size: 1rem;
  line-height: 1.8;
}

.royal-product-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.royal-product-detail-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #153a7a;
  background: linear-gradient(180deg, rgba(21, 58, 122, 0.08), rgba(255, 122, 24, 0.1));
}

.royal-product-detail-price-box {
  margin: 1.7rem 0 1.2rem;
  padding: 1.4rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #173a79 0%, #1f4d9f 55%, #ff7a18 100%);
  color: #fff;
}

.royal-product-detail-price-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  opacity: 0.78;
  text-transform: uppercase;
}

.royal-product-detail-price {
  margin-top: 0.55rem;
  font-size: clamp(2rem, 2.4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.royal-product-detail-price-tip {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.royal-product-detail-spec-panel {
  margin-bottom: 1.1rem;
}

.royal-product-detail-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0;
  background: #edf2f9;
}

.royal-product-detail-spec-item + .royal-product-detail-spec-item {
  border-top: 1px dashed rgba(91, 105, 128, 0.5);
}

.royal-product-detail-spec-label {
  display: block;
  color: #7a879a;
  font-size: 0.8rem;
}

.royal-product-detail-spec-value {
  display: block;
  color: #1b2b46;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 600;
}

.royal-product-detail-consult {
  margin-top: 1.1rem;
  text-align: left;
}

.royal-product-consult-btn {
  min-width: 10rem;
  display: inline-flex;
  justify-content: center;
}

.royal-product-detail-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.royal-product-detail-btn-large {
  flex: 1;
  min-height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 0.95rem;
  font-weight: 600;
}

.royal-btn-outline {
  border: 1px solid rgba(21, 58, 122, 0.18);
  background: #fff;
  color: #153a7a;
}

.royal-btn-outline:hover {
  background: #f5f8fe;
}

.royal-product-detail-note {
  padding-top: 1.3rem;
  border-top: 1px dashed rgba(91, 105, 128, 0.5);
}

.royal-product-detail-note-title {
  margin-bottom: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1a2943;
}

.royal-product-detail-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.royal-product-detail-bullets li {
  position: relative;
  padding-left: 1.35rem;
  color: #54637a;
  line-height: 1.7;
}

.royal-product-detail-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: #7a879a;
  box-shadow: none;
}

.royal-product-detail-tabs {
  margin-bottom: 2rem;
  overflow: hidden;
}

.royal-product-detail-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0.5rem;
  background: #edf2f9;
  border-bottom: none;
}

.royal-product-detail-tab-nav {
  flex: 0 0 auto;
  min-width: 12rem;
  border: none;
  background: transparent;
  color: #5b6980;
  padding: 1rem 1.2rem;
  border-radius: 0.9rem;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}

.royal-product-detail-tab-nav.royal-product-detail-tab-active {
  background: #edf2f9;
  color: #173a79;
  box-shadow: none;
}

.royal-product-detail-tabs-content {
  padding: 1.8rem 2rem 2rem;
}

.royal-product-detail-tab-panel {
  display: none;
}

.royal-product-detail-tab-panel.royal-product-detail-tab-active {
  display: block;
}

.royal-product-detail-richtext {
  color: #33435b;
  line-height: 1.9;
  font-size: 1rem;
}

.royal-product-detail-richtext p {
  margin: 0;
  padding: 0;
}

.royal-product-detail-richtext p + p {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(91, 105, 128, 0.5);
}

.royal-product-detail-richtext img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.royal-product-detail-richtext table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.royal-product-detail-richtext table td,
.royal-product-detail-richtext table th {
  border: none;
  padding: 0.8rem;
}

.royal-product-detail-fallback p {
  margin-bottom: 1rem;
}

.royal-product-detail-demo {
  margin-bottom: 1.5rem;
}

.royal-product-detail-demo h3 {
  margin: 0 0 0.9rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(91, 105, 128, 0.5);
  color: #1a2943;
  font-size: 1.05rem;
}

.royal-product-detail-demo h3:first-child {
  padding-top: 0;
  border-top: none;
}

.royal-product-detail-demo-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.1rem 0 1.4rem;
}

.royal-product-detail-demo-card {
  margin: 0;
  background: #edf2f9;
  overflow: hidden;
}

.royal-product-detail-demo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.royal-product-detail-demo table th {
  width: 9rem;
  color: #1a2943;
  font-weight: 700;
  text-align: left;
  vertical-align: top;
}

.royal-product-detail-demo table td {
  color: #54637a;
}

.royal-product-detail-demo table tr + tr {
  border-top: 1px dashed rgba(91, 105, 128, 0.5);
}

.royal-product-detail-bullets-block {
  margin-top: 1rem;
}

.royal-product-detail-related {
  padding: 2rem;
}

.royal-product-detail-related .royal-section-title {
  margin-bottom: 1.6rem;
}

.royal-product-detail-related .royal-section-title p {
  color: #738099;
}

.royal-product-detail-related .royal-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.royal-product-detail-related .royal-product-card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  background: #edf2f9;
  box-shadow: none;
}

.royal-product-detail-related .royal-product-image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.royal-product-detail-related .royal-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.royal-product-detail-related .royal-product-card-content {
  padding: 1.15rem 1.15rem 1.25rem;
}

.royal-product-detail-related .royal-product-card-content h3 {
  margin-bottom: 0.55rem;
  font-size: 1.06rem;
}

.royal-product-detail-related .royal-product-card-content h3 a {
  color: #1d2a43;
}

.royal-product-detail-related .royal-product-card-content p {
  color: #6b7890;
  line-height: 1.7;
  min-height: 3rem;
}

.royal-consult-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.royal-consult-modal.is-open {
  display: block;
}

.royal-consult-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 41, 0.45);
}

.royal-consult-dialog {
  position: relative;
  width: min(92vw, 40rem);
  margin: 6vh auto 0;
  max-height: 88vh;
  overflow: auto;
  background: #edf2f9;
  border-radius: 1rem;
  padding: 1.25rem;
}

.royal-consult-close {
  position: absolute;
  top: 0.65rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: #5b6980;
  font-size: 1.4rem;
  line-height: 1;
}

.royal-consult-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.75rem 0.5rem 0.25rem;
}

@media (max-width: 1200px) {
  .royal-product-detail-main {
    grid-template-columns: 1fr;
  }

  .royal-product-detail-gallery {
    position: static;
  }

  .royal-product-detail-related .royal-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .royal-product-detail {
    padding-top: 4.5rem;
    overflow-x: hidden;
  }

  .royal-product-detail-info,
  .royal-product-detail-gallery,
  .royal-product-detail-tabs-content,
  .royal-product-detail-related {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .royal-product-detail-tabs-nav,
  .royal-product-detail-related .royal-products-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .royal-product-detail-gallery,
  .royal-product-detail-swiper-main,
  .royal-product-detail-image-wrapper,
  .royal-product-detail-swiper-main .swiper-slide {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .royal-product-detail-swiper-thumbs {
    display: none;
  }

  .royal-product-detail-demo-gallery {
    grid-template-columns: 1fr;
  }

  .royal-product-detail-title {
    font-size: 1.7rem;
  }

  .royal-product-detail-image-wrapper {
    cursor: default;
  }

  .royal-product-detail-magnifier {
    display: none !important;
  }

  .royal-product-detail-tabs-content {
    padding-top: 1.2rem;
    padding-bottom: 1.35rem;
  }

  .royal-consult-dialog {
    width: calc(100vw - 1.5rem);
    margin-top: 3vh;
    padding: 1rem 0.85rem;
  }
}
