/* ====== Fluid scales (không cần media queries) ====== */

/* Header */
.idl-product-detail .idl-title {
  font-family: "Geist", sans-serif; /* dùng Geist */
  font-weight: 700;                 /* bold */
  font-size: 1.875rem;              /* 30px */
  line-height: 2.375rem;            /* 38px */
}
/* Price */
.idl-product-detail .idl-price {
  font-family: "Geist", sans-serif;
  font-weight: 600;       /* semibold */
  font-size: 1.5rem;      /* 24px */
  line-height: 2rem;      /* 32px */
}
/* Badge */
.idl-product-detail .idl-badge {
  display: inline-block;
  font-family: "Geist", sans-serif;
  font-weight: 500;       /* medium */
  font-size: 0.75rem;     /* 12px */
  line-height: 1rem;      /* 16px */
  padding: 4px 8px;
  border-radius: 6px;
  background-color: #BEBEBE;
  color: #000000; /* chữ vẫn tối cho dễ đọc */
}

/* Description Title */
.idl-product-detail .idl-desc h3 {
  font-family: "Geist", sans-serif;
  font-weight: 600;        /* semibold */
  font-size: 1.125rem;     /* 18px */
  line-height: 1.75rem;    /* 28px */
}

.idl-product-detail .group-title,
.idl-product-detail .card h4{
  font-size: clamp(12px, 2vw, 14px);
  margin: 0 0 clamp(6px, 1vw, 8px);
}

/* Description Content */
.idl-product-detail .idl-desc-content {
  font-family: "Geist", sans-serif;
  font-weight: 400;       /* regular */
  font-size: 1rem;        /* 16px */
  line-height: 1.625rem;  /* 26px */
  color: #374151;
}

/* Card details */
.idl-product-detail .card{
  padding: clamp(1rem, calc(1rem + 1vw), 2rem);
  background:#F9FAFB;
  border-radius: 8px;
}
.idl-product-detail .card .row{
  display:grid;
  grid-template-columns: 1fr auto; /* key co giãn, value giữ kích thước nội dung */
  align-items:center;
  gap: clamp(6px, 2vw, 12px);
  padding: clamp(8px, 2vw, 10px) clamp(6px, 2vw, 8px);
  border-top:1px solid #f3f4f6;
}
.idl-product-detail .card .row:first-of-type{ border-top:none; }

/* Product Details Keys */
.idl-product-detail .idl-details .key {
  font-family: "Geist", sans-serif;
  font-weight: 500;       /* medium */
  font-size: 1rem;        /* 16px */
  line-height: 1.5rem;    /* 24px */
  color: #000000;         /* giữ màu xám nhẹ để phân cấp */
}

/* Product Details Values */
.idl-product-detail .idl-details .val {
  font-family: "Geist", sans-serif;
  font-weight: 400;       /* regular */
  font-size: 1rem;        /* 16px */
  line-height: 1.5rem;    /* 24px */
  color: #484848;
}


/* ====== Sizes (grid auto-fit + minmax) ====== */
.idl-product-detail .sizes{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: clamp(8px, 2vw, 12px);
}

/* If there is only one size option, don't let it stretch to full width */
.idl-product-detail .sizes:has(> .idl-size:first-child:last-child) {
  grid-template-columns: max-content;
  justify-content: start;
}

/* Fallback: server adds .single-size on the container when only one size exists */
.idl-product-detail .sizes.single-size {
  grid-template-columns: max-content;
  justify-content: start;
}

/* Make sure the single item aligns to the start of its track */
.idl-product-detail .sizes:has(> .idl-size:first-child:last-child) .idl-size,
.idl-product-detail .sizes.single-size .idl-size {
  justify-self: start;
}

.idl-product-detail .idl-size-group{
  padding: 1rem 0;
}

.idl-product-detail .idl-size-group .group-title {
  font-family: "Geist", sans-serif;
  font-weight: 500;       /* medium */
  font-size: 0.875rem;    /* 14px */
  line-height: 1.25rem;   /* 20px */
  color: #000000;
}

/* Product Details Title */
.idl-product-detail .idl-details h4 {
  font-family: "Geist", sans-serif;
  font-weight: 600;       /* semibold */
  font-size: 1.125rem;    /* 18px */
  line-height: 1.75rem;   /* 28px */
}

/* Size Options Text */
.idl-product-detail .idl-size span {
  font-family: "Geist", sans-serif;
  font-weight: 500;       /* medium */
  font-size: 0.875rem;    /* 14px */
  line-height: 1.25rem;   /* 20px */
  color: #000000;
}

.idl-product-detail .idl-size{
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  border:2px solid #e5e7eb; border-radius:6px;
  padding: clamp(8px, 2vw, 10px) clamp(12px, 2.5vw, 16px);
  cursor:pointer; user-select:none;
  background:#fff; color:#111827;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
  min-height: 40px; /* đảm bảo vùng bấm lớn trên mobile nhỏ */
}
.idl-product-detail .idl-size input{ position:absolute; inset:0; opacity:0; pointer-events:none; }
.idl-product-detail .idl-size.is-available:hover{ border-color:#111827; }
/* Khi size được chọn → border đậm + border-radius lớn hơn */
.idl-product-detail .idl-size:has(input:checked) {
  border-color: #111827;
  border-radius: 6px; /* tuỳ bạn muốn tăng bao nhiêu */
}
.idl-product-detail .idl-size.is-disabled{ opacity:.45; cursor:not-allowed; background:#f9fafb; }
.idl-product-detail .idl-outofstock-note{ margin-top:8px; color:#ef4444; font-family: "Geist", sans-serif; font-weight: 400; }

/* ====== Color Group ====== */
.idl-product-detail .idl-color-group .group-title {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;   /* 14px */
  line-height: 1.25rem;  /* 20px */
  color: #000000;
  margin-bottom: 6px;
}

.idl-product-detail .idl-color-group{
  display: flex;
  flex-direction: column;
	padding: 1rem 0;
}

.idl-product-detail .colors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.idl-product-detail .idl-color {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.idl-product-detail .idl-color input {
  position: absolute;
  opacity: 0;
}

.idl-product-detail .idl-color .swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
}

.idl-product-detail .idl-color .label {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;   /* 14px */
  line-height: 1.25rem;  /* 20px */
  color: #000000;
}

/* trạng thái checked */

.idl-product-detail .idl-color:has(input:checked) {
  border-color: #111827;
  border-radius: 6px;
}

.idl-product-detail .idl-quantity {
  font-family: "Geist", sans-serif;
  font-weight: 400;
  font-size: 1rem;   /* 16px */
  line-height: 1.5rem;
  margin-top: 8px;
  color: #484848
}

/* Trạng thái khả dụng */
.idl-color.is-available {
  opacity: 1;
  cursor: pointer;
}

/* Trạng thái disabled */
.idl-color.is-disabled {
  opacity: 0.45;                       /* slightly dim */
  cursor: not-allowed;                 /* show not-allowed cursor */
  background: #f8fafc;                 /* subtle muted background */
  border: 2px dashed #e6e9ee;          /* dashed border to show disabled */
  filter: grayscale(70%);              /* desaturate colors */
  transition: opacity .12s ease, filter .12s ease, border-color .12s ease;
  pointer-events: none;                /* prevent clicks while disabled */
}

.idl-color.is-disabled .label {
  color: #9aa4ad;                       /* muted label color */
}

.idl-color.is-disabled .swatch {
  opacity: 0.6;                          /* make swatch look muted */
  border: 1px dashed #d1d5db;           /* subtle dashed around swatch */
}

/* Input bị disabled không làm ảnh hưởng swatch */
.idl-color input[disabled] + .swatch {
  pointer-events: none;   /* không cho click */
  border: 1px dashed #ccc; /* thêm border để user dễ nhận biết */
}

/* Nếu muốn label chữ mờ đi */
.idl-color.is-disabled .label {
  color: #999;
}

/* ====== Variant Group (styled like Color) ====== */
.idl-product-detail .idl-variant-group .group-title {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;   /* 14px */
  line-height: 1.25rem;  /* 20px */
  color: #000000;
  margin-bottom: 6px;
}

.idl-product-detail .idl-variant-group{
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.idl-product-detail .variants {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.idl-product-detail .idl-variant {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.idl-product-detail .idl-variant input {
  position: absolute;
  opacity: 0;
}

.idl-product-detail .idl-variant .label {
  font-family: "Geist", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;   /* 14px */
  line-height: 1.25rem;  /* 20px */
  color: #000000;
}

/* checked state */
.idl-product-detail .idl-variant:has(input:checked) {
  border-color: #111827;
  border-radius: 6px;
}

/* disabled state mirrors .idl-color */
.idl-variant.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
  border: 2px dashed #e6e9ee;
  filter: grayscale(70%);
  transition: opacity .12s ease, filter .12s ease, border-color .12s ease;
  pointer-events: none;
}

.idl-variant.is-disabled .label { color: #9aa4ad; }

.idl-purchase-qty {
  font-family: "Geist", sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1rem 0;;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
  line-height: 1.25rem;
}

.idl-qty-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.idl-qty-btn {
  background: #ffffff;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.idl-qty-btn:hover:enabled {
  background: #e5e7eb;
}

.idl-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.idl-qty-input {
  width: 3.75rem;
  height: 2.125rem; /* 34px */
  text-align: center;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  padding: 6px;
  font-size: 1rem;
  font-family: "Geist", sans-serif;
}

/* Ẩn mũi tên spinner trong input number - Chrome, Safari, Edge */
.idl-qty-input::-webkit-inner-spin-button,
.idl-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Ẩn spinner trong Firefox */
.idl-qty-input[type=number] {
  -moz-appearance: textfield;
}

/* Price wrap */
.idl-product-detail .idl-price-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Old Price */
.idl-product-detail .idl-price-old {
  font-family: "Geist", sans-serif;
  font-weight: 400;       /* regular */
  font-size: 1.25rem;     /* 20px */
  line-height: 1.75rem;   /* 28px */
  color: #6b7280;         /* màu nhạt (gray-500) */
  text-decoration: line-through;
}

/* Sale Price (giữ style gốc) */
.idl-product-detail .idl-price {
  font-family: "Geist", sans-serif;
  font-weight: 600;
  font-size: 1.5rem;      /* 24px */
  line-height: 2rem;      /* 32px */
  color: #000000;
}



