.page-content {
  padding: 30px 0;
}

.penci-slider {
  position: relative;
  margin-top: 20px;
}

.penci-slider-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Ẩn scrollbar tùy UI */
.penci-slider-viewport::-webkit-scrollbar {
  height: 6px;
}

.penci-slider-viewport::-webkit-scrollbar-thumb {
  border-radius: 3px;
}

.penci-slider-track {
  display: flex;
  align-items: stretch;
  gap: 12px;
  /* khoảng cách item */
  padding: 4px 0 10px 0;
}

.template-item {
  flex: 0 0 auto;
  /* auto width theo nội dung */
  min-width: 180px;
  /* optional: giữ không quá nhỏ */
}

.template-item img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* Nút điều hướng */
.penci-slider-arrow {
  border: 1px solid #ccc;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: #000;
}

.penci-slider-prev {
  left: 10px;
  /* tuỳ chỉnh theo layout */
}

.penci-slider-next {
  right: 10px;
}

.penci-slider-arrow i {
  font-size: 12px;
  line-height: 28px;
}

.hero-content {
  min-height: 330px;
}

.product-image {
  padding-top: 330px;
}

.product-image img {
  max-height: 370px;
  object-position: center;
  margin: 0 auto;
}

.box-relation {
  margin: 60px 0;
  padding: 0;
  background: white;
}

.box-relation img {
  max-height: 240px;
}

.penci-slider-arrow-hidden {
  opacity: 0;
  pointer-events: none;
  /* hoặc: display: none; */
}

.grid-info {
  display: grid;
  grid-template-columns: 40px auto;
  gap: 5px;
  align-items: center;
}

.grid-info .avatar {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
}

.grid-info .info-content {
  font-size: 16px;
}

.grid-info .txt .sub {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
font-weight: 700;
font-size: 16px;
color: #5e6278;
  text-overflow: ellipsis;
}

.grid-info .txt .sub1 {
  font-size: 14px;
  color: #A1A5B7;
  text-shadow: none;
  margin: 0;
}

/* Product Sizes Section */
.product-sizes-section {
  background-color: #fff;
  border-radius: 15px;
  margin: 60px 0;
}

.page-size-detail-section {
  background-color: #fff;
  border-radius: 15px;
  margin: 60px 0;
}

.section-title {
  /* font-size: 1.5rem; */
  font-weight: 600;
  color: #333;
  margin-bottom: 1.5rem;
  position: relative;
}


/* Size Diagram */
.size-diagram-container {
  background: white;
  border-radius: 12px;
  height: 100%;
}

.size-diagram {
  text-align: center;
  /* background: #f8f9fc; */
  /* border: 1px solid #5E6278; */
  overflow: hidden;
}

/* Paper Sizes Diagram */
.paper-sizes-diagram {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.paper-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paper {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #333;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.paper:hover {
  background: rgba(33, 150, 243, 0.9);
  color: white;
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}


.paper:hover .size-label {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.size-diagram-image {
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}

/* Size Table */
.size-table-container {
  height: 100%;
}

.size-table {
  /* max-height: 400px; */
  /* overflow-y: auto; */
  padding-right: 10px;
}

.size-table::-webkit-scrollbar {
  width: 6px;
}

.size-table::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.size-table::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.size-table::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.size-table-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  color: #5E6278 !important;
}

.size-table-item:hover {
  transform: translateX(4px);
  color: #07A7CC !important;
}

.size-table-item.recommended {
  background: #e3f2fd;
  border-left-color: #2196f3;
}

.size-table-item.recommended:hover {
  background: #bbdefb;
}

.size-info {
  display: grid;
  grid-template-columns: 3fr 2fr 1fr;
  align-items: center;
  width: 100%;
}

.size-name {
  display: flex;
  align-items: center;
  font-weight: 400;
  min-width: 120px;
  flex: 1;
}

.size-bullet {
  font-size: 6px;
  margin-right: 8px;
}

.size-dimensions {
  font-weight: 600;
  /* color: #007bff; */
  font-size: 1.1em;
  min-width: 80px;
  text-align: center;
}

.size-unit {
  font-size: 16px;
  min-width: 30px;
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {

  .page-content {
    padding: 0px 0;
  }

  .size-table{
    padding: unset;
  }

  .product-sizes-section {
    margin: 30px 0;
  }

  .section-title {
    font-size: 1.3rem;
    text-align: center;
  }

  .size-diagram-container,
  .size-table-container {
    margin-bottom: 0px;
  }


  .size-table-item {
    padding: 10px 12px;
  }

  .size-name {
    color: #5e6278 !important;
    min-width: auto;
    flex: 1;
    font-size: 16px;
  }

  .size-dimensions {
    font-size: 1em;
    min-width: 70px;
  }

  .size-unit {
    font-size: 0.8em;
    min-width: 25px;
  }

  .page-size-detail-section {
    margin: 30px 0;
  }

  .box-relation {
    margin: 30px 0;
    padding: 0;
  }

  .product-image img{
    max-height: 300px;
  }

  .penci-slider-next{
    right: 5px;
  }

  .penci-slider-prev{
    left: 5px;
  }

}

@media (max-width: 480px) {
  .size-table-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .size-info {
    grid-template-columns: 2fr 1fr 20px;
    gap: 5px;
    width: 100%;
  }

  .size-name,
  .size-dimensions,
  .size-unit {
    min-width: auto;
    font-size: 13px;
  }
}

/* Animation */
.size-table-item {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.size-table-item:nth-child(1) {
  animation-delay: 0.1s;
}

.size-table-item:nth-child(2) {
  animation-delay: 0.2s;
}

.size-table-item:nth-child(3) {
  animation-delay: 0.3s;
}

.size-table-item:nth-child(4) {
  animation-delay: 0.4s;
}

.size-table-item:nth-child(5) {
  animation-delay: 0.5s;
}

.size-table-item:nth-child(n+6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.treemap-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.treemap-rect {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
  border: 2px solid #cccccc;
  font-family: inherit;
}

.treemap-rect--largest {
  /* border-color: #90cdf4; */
}

.treemap-rect--largest .treemap-label {
  /* opacity: 1; */
}


.treemap-label {
  text-align: center;
  color: #3b4252;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: all 0.1s ease-in-out;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.treemap-label small {
  display: block;
  font-size: 0.8em;
  color: #5e6278;
  font-weight: 400;
  margin-top: 2px;
}

.treemap-rect--highlight .treemap-label {
  opacity: 1;
}

.treemap-rect--highlight {
  z-index: 100 !important;
  background: #e0f7fa !important;
  border-color: #07A7CC !important;
}

.size-table-item--highlight {
  background: #e0f7fa;
  color: #07A7CC;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.2s;
}

.size-table-item--highlight .size-name,
.size-table-item--highlight .size-dimensions,
.size-table-item--highlight .size-unit {
  color: #07A7CC;
}

.grid-info .txt-cirle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  padding: 2px;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  background: linear-gradient(90deg, #0eb1bd 0, #03c6d5 35%, rgba(4, 164, 225, .8799894957983193) 100%);
}