/* ================================================================
   FiveMSupply — Product Tabs & Info Section
   Matches the pixel-perfect layout from the design reference.
   ================================================================ */

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --fms-blue:        #1e73be;
  --fms-blue-light:  #2d88d4;
  --fms-border:      #e0e0e0;
  --fms-text:        #333333;
  --fms-text-muted:  #666666;
  --fms-bg:          #ffffff;
  --fms-star-filled: #f5a623;
  --fms-star-empty:  #cccccc;
  --fms-radius:      4px;
  --fms-tab-indent:  0px;
  --fms-transition:  0.3s ease;
}


/* ================================================================
   OUTER WRAPPER  — two-column grid
   ================================================================ */
.fms-product-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 2px solid var(--fms-border);
  border-radius: var(--fms-radius);
  overflow: hidden;
  margin: 0px 0 40px;
  background: var(--fms-bg);
  clear: both;
}


/* ================================================================
   COLUMNS
   ================================================================ */
.fms-col {
  min-width: 0;
}

.fms-col--left {
  border-right: 2px solid var(--fms-border);
  display: flex;
  flex-direction: column;
}

.fms-col--right {
  display: flex;
  flex-direction: column;
}


/* ================================================================
   TABS  (left column — Product Information & Reviews)
   ================================================================ */
.fms-tab {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Divider between the two tabs */
.fms-tab + .fms-tab {
  border-top: 1px solid var(--fms-border);
}

/* ── Tab header ── */
.fms-tab__header {
  display: flex;
  align-items: center;
  padding: 14px 20px 0;
  border-bottom: 2px solid transparent;
  position: relative;
}

.fms-tab__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fms-text);
  padding-bottom: 10px;
  position: relative;
}

/* Blue underline indicator on active tab title */
.fms-tab__title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fms-blue);
}

/* ── Tab body ── */
.fms-tab__body {
  padding: 20px 20px 10px;
  overflow: hidden;
  max-height: 220px; /* collapsed height — shows ~3-4 lines */
  transition: max-height var(--fms-transition);
  position: relative;
}

#fms-info-body{
  max-height: 375px;
}

/* Fade mask at the bottom when collapsed */
.fms-tab__body:not(.fms-is-expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(transparent, var(--fms-bg));
  pointer-events: none;
}

/* When expanded, remove height cap and fade */
.fms-tab__body.fms-is-expanded {
  max-height: 9999px !important;
}
.fms-tab__body.fms-is-expanded::after {
  display: none;
}

/* ── Tab content (product description) ── */
.fms-tab__content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fms-text);
}

.fms-tab__content p { margin: 0 0 12px; }
.fms-tab__content ul { margin: 0 0 12px; padding-left: 18px; }
.fms-tab__content li { margin-bottom: 4px; }

/* ── "No content" placeholder ── */
.fms-no-content {
  font-size: 13px;
  color: var(--fms-text-muted);
  padding: 14px 20px;
  margin: 0;
}

.woocommerce-tabs{
  display: none !important;
}

/* ================================================================
   EXPAND BUTTON  — blue chevron arrow
   ================================================================ */
.fms-expand-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90%;
  padding: 10px 0 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--fms-blue);
  transition: opacity var(--fms-transition);
  flex-shrink: 0;
  margin: 0 auto;
}

.fms-expand-btn:hover {
  opacity: 0.75;
}

.fms-arrow-icon {
  width: 28px;
  height: 28px;
  transition: transform var(--fms-transition);
}

/* Rotate arrow when expanded */
.fms-expand-btn.fms-is-rotated .fms-arrow-icon {
  transform: rotate(180deg);
}

/* Hide expand button when content does NOT overflow */
.fms-expand-btn.fms-btn--hidden {
  display: none;
}


/* ================================================================
   REVIEWS
   ================================================================ */
.fms-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fms-review {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

/* Hidden review (> index 1) */
.fms-review--hidden {
  display: none;
}
.fms-review--hidden.fms-revealed {
  display: flex;
}

/* Avatar */
.fms-review__avatar {
  flex-shrink: 0;
}

.fms-review__avatar img,
.fms-review__avatar .avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50%;
  object-fit: cover;
  background: #e8e8e8;
}

/* Review meta row */
.fms-review__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.fms-review__author {
  font-weight: 700;
  font-size: 13px;
  color: var(--fms-text);
}

.fms-review__verified {
  font-size: 12px;
  color: var(--fms-text-muted);
  font-style: italic;
}

.fms-review__date {
  font-size: 12px;
  color: var(--fms-text-muted);
}

/* Stars — pushed to far right */
.fms-review__stars {
  display: flex;
  gap: 0px;
  margin-left: auto;
}

.fms-star {
  width: 18px;
  height: 18px;
  color: var(--fms-star-empty);
}

.fms-star--filled {
  color: var(--fms-star-filled);
}

/* Review text */
.fms-review__text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--fms-text);
}

.fms-review .fms-review__body{
  flex-grow: 2;
}

/* ================================================================
   RIGHT COLUMN — Information Box
   ================================================================ */
.fms-info-box {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.fms-info-box__header {
  display: flex;
  align-items: center;
  padding: 14px 20px 0;
  border-bottom: 2px solid transparent;
  position: relative;
}

.fms-info-box__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fms-text);
  padding-bottom: 10px;
  position: relative;
}

/* Blue underline on the Information header */
.fms-info-box__title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fms-blue);
}

/* Meta list */
.fms-info-box__list {
  list-style: disc;
  padding: 20px 20px 20px 36px;
  margin: 0;
  flex: 1;
}

.fms-info-box__item {
  font-size: 14px;
  color: var(--fms-text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.fms-info-box__item:last-child {
  margin-bottom: 0;
}

.fms-info-box__label {
  color: var(--fms-text);
}

.fms-info-box__value {
  color: var(--fms-text);
}

.fms-info-box__content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--fms-text);
}

.fms-info-box__content ul {
    padding-left: 18px;
    margin: 0 0 10px;
}

.fms-info-box__content li {
    margin-bottom: 6px;
}

.fms-info-box__content p {
    margin: 0 0 10px;
}

.fms-main__header{
  padding: 14px 20px 0px 0px !important;
  clear: both;
  position: relative;
  top: 2px;
}

.fms-reviews-list hr{
  margin-bottom: 0px;
}
/* ================================================================
   RESPONSIVE
   ================================================================ */
/* Arrow alignment — both columns equal height */
.fms-col--left,
.fms-col--right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fms-col--left .fms-tab,
.fms-info-box {
    flex: 1;
}

.fms-col--left .fms-tab__body,
#fms-reviews-body {
    flex: 1;
}
/* Tablet — stack columns */
@media ( max-width: 768px ) {
  .fms-product-section {
    grid-template-columns: 1fr;
  }

  .fms-col--left {
    border-right: none;
    border-bottom: 1px solid var(--fms-border);
  }

  .fms-review__stars {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
    padding: 10px 0px;
  }
}

/* Mobile */
@media ( max-width: 480px ) {
  .fms-tab__body {
    padding: 16px 16px 10px;
  }

  .fms-tab__header,
  .fms-info-box__header {
    padding: 12px 16px 0;
  }

  .fms-info-box__list {
    padding: 16px 16px 16px 32px;
  }

  .fms-review__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .fms-review__stars {
    margin-left: 0;
  }
}
