/* Entrance animations */
:root {
  --vcs-enter-duration: 360ms;
  --vcs-enter-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes vcs-slide-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Apply to containers when they enter */
.vcs-anim-enter {
  animation: vcs-slide-fade-up var(--vcs-enter-duration) var(--vcs-enter-ease) both;
  will-change: opacity, transform;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .vcs-anim-enter { animation: none !important; }
}

/* Single Product Styles */
.vcs-single-product {
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--e-global-color-text);
}

/* Breadcrumb styles */
.vcs-sp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(0.75rem, 2.33vw, 0.875rem);
  line-height: 1.5;
}

.vcs-sp-breadcrumb-link {
  color: var(--e-global-color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.vcs-sp-breadcrumb-link:hover {
  color: var(--e-global-color-accent);
  text-decoration: underline;
}

.vcs-sp-breadcrumb-separator {
  color: rgba(0, 0, 0, 0.4);
  font-weight: 400;
  user-select: none;
}

.vcs-sp-breadcrumb-current {
  color: var(--e-global-color-text);
  font-weight: 600;
}

/* Grid layout for media + info */
.vcs-sp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2.33vw, 24px);
  align-items: start;
}
@media (min-width: 1025px) {
  .vcs-sp-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .vcs-sp-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.vcs-sp-star {
  width: clamp(15px, 3.72vw, 20px);
  height: clamp(15px, 3.72vw, 20px);
  display: inline-block;
}
.vcs-sp-star svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Media column */
.vcs-sp-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 12;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  margin-top: 1rem;
}

.vcs-sp-main-img {
  width: 100%;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

/* If there is no gallery thumbs, let the main image grow naturally */
.vcs-sp-media--no-thumbs .vcs-sp-main {
  height: auto;
}
.vcs-sp-media--no-thumbs .vcs-sp-main-img {
  height: auto;
  object-fit: contain;
}

.vcs-sp-zoom {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.vcs-sp-zoom img {
  width: clamp(25px, 3.54vw, 54px);
  height: clamp(25px, 3.54vw, 54px);
  display: block;
}

/* Featured image full-width on phones */
@media (max-width: 480px) {
  .vcs-sp-main {
    width: 100%;
    height: auto;
  }
  .vcs-sp-main-img {
    height: auto;
  }
}

.vcs-sp-thumbs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, clamp(75px, 7.29vw, 112px));
  gap: 10px;
}

.vcs-sp-thumb {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  width: clamp(75px, 7.29vw, 112px);
}

.vcs-sp-thumb img {
  width: 100%;
  height: clamp(70px, 6.82vw, 105px);
  object-fit: cover;
  display: block;
}

.vcs-sp-thumb:hover {
  outline: 2px solid var(--e-global-color-primary);
}

/* Active selected thumb */
.vcs-sp-thumb.active {
  outline: 2px solid var(--e-global-color-primary);
}

/* Info column */
.vcs-sp-cat-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.vcs-sp-cat {
  color: var(--e-global-color-primary);
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  /* 430px -> 0.625rem (10px), 1920px -> 1.25rem (20px) */
  font-size: clamp(0.5rem, 3.8vw, 1.2rem);
}

.vcs-sp-badge {
  background: var(--e-global-color-accent);
  color: #FFFFFF;
  border-radius: 5px;
  padding: 10px 10px;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  /* 430px -> 0.625rem (10px), 1920px -> 0.875rem (14px) */
  font-size: clamp(0.5rem, calc(0.268vw + 0.553rem), 0.7rem);
  font-weight: 700;
  line-height: 1;
}

.vcs-sp-title {
  margin: 6px 0 8px;
  /* 430px -> 1.5rem (24px), 1920px -> 2.5rem (40px) */
  font-size: clamp(0.5rem, calc(1.074vw + 1.211rem), 2rem);
  font-weight: 700;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--e-global-color-text);
}

.vcs-sp-rating {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Star rating container */
.vcs-sp-stars {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.vcs-sp-rating-meta {
  color: var(--e-global-color-text);
  margin-left: 6px;
  font-size: clamp(0.5rem, 2.56vw, 1rem);
  font-weight: 700;
}

/* Reviews tab rating: inherit spacing, but primary color for meta text */
.vcs-sp-rating-reviews {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vcs-sp-rating-reviews .vcs-sp-rating-meta {
  color: var(--e-global-color-primary);
}

/* Reviews list under rating */
.vcs-sp-reviews-list {
  margin-top: clamp(8px, 2.33vw, 16px);
  display: grid;
  gap: clamp(8px, 1.86vw, 12px);
}
.vcs-sp-review-item {
  background: #fff;
  border: none;
  border-radius: 8px;
  padding: clamp(10px, 2.33vw, 14px);
}
.vcs-sp-review-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.vcs-sp-review-item-avatar {
  width: clamp(23px, 5.81vw, 28px);
  height: clamp(23px, 5.81vw, 28px);
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.vcs-sp-review-item-name {
  font-weight: 700;
  color: var(--e-global-color-primary);
  font-size: clamp(0.625rem, 2.1vw, 0.7rem);
}
.vcs-sp-review-item-date {
  color: rgba(0,0,0,0.6);
  font-weight: 400;
  margin-top: 4px;
  font-size: clamp(0.625rem, 2.1vw, 0.7rem);
}
.vcs-sp-review-item-content {
  color: var(--e-global-color-text);
  line-height: 1.5;
  font-size: clamp(0.5rem, 2.33vw, 0.8rem);
}

.vcs-sp-row {
  margin: 4px 0;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  /* 430px -> 0.625rem (10px), 1920px -> 1.25rem (20px) */
  font-size: clamp(0.5rem, 3.2vw, 1rem);
  color: var(--e-global-color-text);
}

.vcs-sp-label {
  font-weight: 600;
}

.vcs-sp-desc {
  margin-top: 8px;
}

.vcs-sp-desc-label {
  font-weight: 600;
  margin-bottom: 6px;
}

.vcs-sp-desc-content {
  line-height: 1.6;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  /* 430px -> 0.625rem (10px), 1920px -> 1.25rem (20px) */
  font-size: clamp(0.5rem, 3.2vw, 1rem);
  color: var(--e-global-color-text);
}

.vcs-sp-actions {
  display: flex;
  gap: 1rem;
  margin-top: 14px;
}

@media (max-width: 1025px) {
  .vcs-sp-actions {
    flex-direction: column;
  }
  .vcs-single-product .vcs-sp-btn {
    width: 100%;
  }
}

.vcs-single-product .vcs-sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* 430px -> 210px, 1920px -> 359px */
  width: clamp(180px, calc(8vw + 150px), 340px);
  /* 430px -> 46px, 1920px -> 66px (approximate linear fit) */
  height: clamp(40px, calc(1vw + 36px), 44px);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  flex: 0 0 auto;
  flex-shrink: 0;
  max-width: none;
  line-height: 1;
}

@media (max-width: 768px) {
  .vcs-single-product .vcs-sp-btn {
    width: 100%;
  }
}

.vcs-single-product .vcs-sp-btn-primary {
  background: linear-gradient(180deg, #1972AA 0%, #1C5880 100%);
  color: #fff;
  border: none;
}

/* Outline (request quote) button */
.vcs-single-product .vcs-sp-btn-outline {
  background: #ffffff;
  color: var(--e-global-color-primary);
  border: none;
  box-shadow: 0 0 4px #00000040; /* blur 4, 25% black */
}

.vcs-single-product .vcs-sp-btn-outline .vcs-sp-btn-text {
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(0.5rem, 3.77vw, 1.2rem);
  line-height: 1.6875rem; /* 27px */
  color: var(--e-global-color-primary);
}

/* Outline icon size: 430px -> 20px, 1920px -> 30px */
.vcs-single-product .vcs-sp-btn-outline .vcs-sp-btn-icon img {
  width: clamp(20px, calc(0.671vw + 17.1px), 24px);
  height: clamp(20px, calc(0.671vw + 17.1px), 24px);
}

/* Phone layout: stack text vertically on outline button */
@media (max-width: 480px) {
  .vcs-single-product .vcs-sp-btn-outline .vcs-sp-btn-text {
    flex-direction: column;
    align-items: center;
  }
}

.vcs-single-product .vcs-sp-btn .vcs-sp-btn-icon img {
  width: clamp(14px, 1.7vw, 16px);
  height: clamp(14px, 1.7vw, 16px);
  display: block;
}

/* Call button text weights */
.vcs-single-product .vcs-sp-btn-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  /* 430px -> 0.625rem (10px), 1920px -> 1.25rem (20px) */
  font-size: 1rem;
}

.vcs-single-product .vcs-sp-btn-text-label {
  font-weight: 400;
}

.vcs-single-product .vcs-sp-btn-text-number {
  font-weight: 700;
}

/* Lightbox */
.vcs-sp-lightbox[hidden] {
  transition: box-shadow 0.2s ease, filter 0.2s ease;
  display: none;
}

.vcs-sp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

/* Hover/active/focus states */
.vcs-single-product .vcs-sp-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 16px rgba(28, 88, 128, 0.35);
}
.vcs-single-product .vcs-sp-btn:active {
  filter: brightness(0.98);
  box-shadow: 0 2px 8px rgba(28, 88, 128, 0.25);
}
.vcs-single-product .vcs-sp-btn:focus-visible {
  outline: 2px solid rgba(28, 88, 128, 0.7);
  outline-offset: 2px;
}

.vcs-sp-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.vcs-sp-lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 85vh;
}

.vcs-sp-lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
}

.vcs-sp-lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

/* Tabs */
.vcs-sp-tabs {
  margin-top: 24px;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Tab buttons container */
.vcs-sp-tablist {
  position: relative;
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
}

/* Tabs */
.vcs-sp-tab {
  text-align: center;
  background: transparent;
  border: none;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  /* Make tabs share the available width equally (two tabs => 50% each) */
  flex: 1 1 50%;
  min-width: 0; /* allow text truncation instead of overflow */
  /* Requested clamp for headings: 430px -> 0.5rem, scalable, up to 1.25rem */
  font-size: clamp(0.5rem, 3.765vw, 1rem);
  line-height: 1.25rem;
  color: var(--e-global-color-primary);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

/* Active tab with blue underline */
.vcs-sp-tab.active {
  color: var(--e-global-color-primary);
}

.vcs-sp-tab.active::after {
  /* Replaced by a shared moving indicator element for smooth sliding */
  content: none;
}

/* Tab content box */
.vcs-sp-tabpanel {
  background: #fff;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
  padding: 24px;
  margin-top: 0;
  border-radius: 2px;
  border-top: 2px solid var(--e-global-color-primary);;
}

vcs-sp-specs-content {
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(0.5rem, 2.33vw, 1rem);
  line-height: 1.5rem;
  color: #000;
}

.vcs-sp-specs-content p {
  margin-bottom: 10px;
  line-height: clamp(1rem, 4.84vw, 2rem);
  padding-left: clamp(0.9rem, 3.72vw, 2rem);
  /* paragraph font size (scaled, max reduced) */
  font-size: clamp(0.5rem, 3.2vw, 1rem);
}

.vcs-sp-specs-content span{
  font-size: clamp(0.5rem, 3.2vw, 1rem);
}

.vcs-sp-specs-content ul li{
  font-size: clamp(0.5rem, 3.2vw, 1rem);
}

.vcs-divider {
  display: inline-block;
  font-family: "Georgia", "Times New Roman", serif; /* hoặc font bạn muốn */
  font-size: clamp(0.5rem, 3.2vw, 1rem);
  font-weight: bold;
  color: #000;
  line-height: clamp(1rem, 4.84vw, 2rem);
}

.vcs-sp-reviews-panel{
  padding-left: clamp(0.9rem, 3.72vw, 2rem);
}

/* Optional: keep the second tab hidden initially */
.vcs-sp-tabpanel[hidden] {
  display: none;
}

/* Sliding tab indicator */
.vcs-sp-tablist {
  position: relative;
}

.vcs-sp-tab-indicator {
  position: absolute;
  left: 0;
  width: 0;
  bottom: clamp(-6px, -0.47vw, -2px);
  height: clamp(3px, 0.93vw, 8px);
  background: var(--e-global-color-primary);
  border-radius: 2px;
  pointer-events: none;
  transition: left 280ms ease, width 280ms ease;
}

/* Review box */
.vcs-sp-review-box {
  position: relative;
  background: #fff;
  border: 1px solid var(--e-global-color-primary);
  border-radius: 10px;
  padding: clamp(10px, 2.33vw, 16px) clamp(12px, 2.91vw, 20px) clamp(12px, 2.91vw, 20px) clamp(46px, 8.37vw, 64px);
  margin-top: clamp(8px, 2.33vw, 16px);
}

.vcs-sp-review-avatar {
  position: absolute;
  left: clamp(12px, 2.91vw, 20px);
  top: clamp(12px, 2.91vw, 20px);
  width: clamp(23px, 5.81vw, 28px);
  height: clamp(23px, 5.81vw, 28px);
  border-radius: 50%;
  object-fit: cover;
}

.vcs-sp-review-textarea {
  width: 100%;
  min-height: clamp(64px, 9.3vw, 120px);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: clamp(8px, 2.33vw, 12px);
  resize: vertical;
  outline: none;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(0.5rem, 2.33vw, 0.8rem);
  color: var(--e-global-color-text);
}

.vcs-sp-review-name {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: clamp(8px, 2.33vw, 12px);
  outline: none;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(0.5rem, 2.33vw, 0.8rem);
  color: var(--e-global-color-text);
  margin-bottom: clamp(8px, 2.33vw, 12px);
}

.vcs-sp-review-actions {
  margin-top: clamp(8px, 2.33vw, 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vcs-sp-review-stars {
  display: inline-flex;
  gap: 6px;
}

@media (max-width: 768px) {
  .vcs-sp-review-stars {
    gap: 0;
  }
}

.vcs-sp-review-star {
  width: clamp(23px, 5.81vw, 28px);
  height: clamp(23px, 5.81vw, 28px);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}
.vcs-sp-review-star svg {
  width: 100%;
  height: 100%;
  display: block;
}
.vcs-sp-review-star svg path {
  fill: rgba(0,0,0,0.35);
}
.vcs-sp-review-star.active svg path,
.vcs-sp-review-star.hovered svg path {
  fill: #FDC800;
}

.vcs-sp-review-submit {
  background: var(--e-global-color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: clamp(8px, 2.33vw, 12px) clamp(12px, 2.91vw, 16px);
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(0.4rem, 2.33vw, 0.8rem);
  cursor: pointer;
}
.vcs-sp-review-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}
.vcs-sp-review-submit:active {
  filter: brightness(0.98);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.vcs-sp-review-msg {
  margin-top: clamp(6px, 1.86vw, 10px);
  font-size: clamp(0.625rem, 2.33vw, 0.7rem);
  color: var(--e-global-color-text);
}

/* Reviews loading spinner */
.vcs-sp-reviews-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: var(--e-global-color-primary);
  border-radius: 50%;
  animation: vcs-sp-spin 0.9s linear infinite;
  margin: 12px auto;
}
@keyframes vcs-sp-spin {
  to { transform: rotate(360deg); }
}
