/*
  Page-specific styles for Frontend Product Details page.
*/

.card-glass {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
}

.product-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(59,130,246,0.12), 0 4px 16px rgba(0,0,0,0.06);
  border-color: #93C5FD;
}

.badge-primary {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.blue-icon-box {
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
}

.badge-outline {
  background: #F1F5F9;
  color: #64748B;
}

.input-field {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3B82F6;
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-img-footer {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* Gallery */
.thumb-btn {
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
}

.thumb-btn:hover {
  opacity: 0.85;
}

.thumb-btn.active {
  border-color: #3B82F6;
  opacity: 1;
}

/* Tabs */
.tab-btn {
  position: relative;
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94A3B8;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #3B82F6;
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tab-btn:hover {
  color: #64748B;
}

.tab-btn.active {
  color: #2563EB;
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-panel {
  display: none;
  animation: tabFadeIn 0.4s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Spec table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid #F1F5F9;
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  vertical-align: top;
}

.spec-table td:first-child {
  color: #64748B;
  font-weight: 500;
  white-space: nowrap;
  width: 180px;
}

.spec-table td:last-child {
  color: #1E293B;
}

/* Download row */
.download-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.download-row:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
}

/* Description Content Styles */
.description-content {
  font-size: 0.95rem;
  line-height: 1.7;
}

.description-content p:last-child {
  margin-bottom: 0;
}

.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4 {
  color: #0F172A;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.description-content h1 { font-size: 1.6rem; }
.description-content h2 { font-size: 1.35rem; }
.description-content h3 { font-size: 1.15rem; }
.description-content h4 { font-size: 1rem; }

.description-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.description-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.description-content li {
  margin-bottom: 0.5rem;
}

.description-content strong,
.description-content b {
  font-weight: 600;
  color: #0F172A;
}

.description-content a {
  color: #2563EB;
  text-decoration: underline;
  transition: color 0.15s;
}

.description-content a:hover {
  color: #1D4ED8;
}

.description-content blockquote {
  border-left: 4px solid #CBD5E1;
  padding-left: 1rem;
  color: #475569;
  font-style: italic;
  margin: 1.25rem 0;
}

/* Table styling for description — override Quill's inline pixel widths */
.description-content table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  table-layout: auto !important;
}

.description-content col,
.description-content colgroup {
  width: auto !important;
}

.description-content th,
.description-content td {
  width: auto !important;
  border: 1px solid #E2E8F0;
  padding: 0.75rem 1rem;
  text-align: left;
}

.description-content th {
  background-color: #F8FAFC;
  font-weight: 600;
  color: #0F172A;
}

.description-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Hide Quill Table Better internal wrapper tags leaked into saved content */
.description-content temporary,
.description-content [data-class="ql-table-better"] {
  display: none;
}


/* Horizontal scrollers (thumbnails, tab bar): smooth momentum, hidden scrollbar */
.scroll-touch {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-touch::-webkit-scrollbar {
  display: none;
  height: 0;
}

/* ==========================================================
   MOBILE RESPONSIVE  (≤640px)  — desktop layout unchanged
   ========================================================== */
@media (max-width: 640px) {
  /* Spec tables: stack each row (label above value) so the long
     technical values never get crushed by the fixed label column. */
  .spec-table tr {
    display: block;
    padding: 0.6rem 0;
    border-bottom: 1px solid #F1F5F9;
  }

  .spec-table tr:last-child {
    border-bottom: none;
  }

  .spec-table td {
    display: block;
    width: 100%;
    padding: 0;
  }

  .spec-table td:first-child {
    width: 100%;
    white-space: normal;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 0.25rem;
  }

  .spec-table td:last-child {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #1E293B;
  }

  /* Tabs: a touch tighter so more fit before the row needs scrolling. */
  .tab-btn {
    padding: 0.7rem 0.95rem;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Download rows: a hair tighter and keep the label readable. */
  .download-row {
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  /* Gallery thumbnails: slightly smaller so more peek into view. */
  .thumb-btn {
    width: 4rem !important;
    height: 4rem !important;
  }
}
