/* ============================================
   AgroLink Africa — Product Detail Styles (Enhanced)
   ============================================ */

/* Navigation & Breadcrumbs */
.product-detail__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-6);
}

.btn--back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-sec);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.btn--back:hover {
  color: var(--primary-500);
}

.btn--back svg {
  width: 16px;
  height: 16px;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  font-size: var(--text-sm);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: var(--sp-2);
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-sec);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.breadcrumb a:hover {
  color: var(--primary-500);
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

/* Main Grid */
.product-detail {
  padding: var(--sp-8) 0;
}

.product-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
}

/* Gallery */
.product-gallery {
  position: sticky;
  top: 80px;
  align-self: start;
}

.product-gallery__main {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-md);
}

.product-gallery__main-img {
  width: 100%;
  height: 100%;
}

.product-gallery__main-img img {
  transition: transform 0.3s ease;
}

.product-gallery__main:hover .product-gallery__main-img img {
  transform: scale(1.05);
}

.product-gallery__zoom {
  position: absolute;
  bottom: var(--sp-4);
  right: var(--sp-4);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.product-gallery__zoom:hover {
  background: var(--primary-500);
  color: white;
  transform: scale(1.1);
}

.product-gallery__zoom svg {
  width: 20px;
  height: 20px;
}

.product-gallery__thumbs {
  display: flex;
  gap: var(--sp-3);
}

.product-gallery__thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.product-gallery__thumb:hover {
  border-color: var(--primary-300);
  transform: translateY(-2px);
}

.product-gallery__thumb--active {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.product-gallery__thumb-img {
  width: 100%;
  height: 100%;
}

.product-gallery__thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__close {
  top: var(--sp-6);
  right: var(--sp-6);
}

.lightbox__prev {
  left: var(--sp-6);
}

.lightbox__next {
  right: var(--sp-6);
}

.lightbox__content {
  max-width: 90%;
  max-height: 90%;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* Product Info */
.product-info {
  padding: var(--sp-4) 0;
}

.product-info__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-2);
}

.product-info__actions {
  display: flex;
  gap: var(--sp-2);
}

.btn--icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--icon:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-500);
}

.btn--icon svg {
  width: 18px;
  height: 18px;
}

.product-info__crop {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-500);
}

.product-info__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--sp-4);
  line-height: 1.2;
}

.product-info__meta {
  display: flex;
  gap: var(--sp-6);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--sp-6);
}

.product-info__meta-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-sec);
}

.product-info__meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary-500);
}

/* Price Box */
.product-price-box {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
  border: 1px solid var(--primary-200);
}

.product-price-box__main {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.product-price-box__value {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--primary-700);
}

.product-price-box__unit {
  font-size: var(--text-lg);
  color: var(--primary-600);
}

.product-price-box__note {
  font-size: var(--text-sm);
  color: var(--primary-600);
  margin-bottom: var(--sp-4);
}

.product-price-box__actions {
  display: flex;
  gap: var(--sp-3);
}

.product-price-box__actions .btn {
  flex: 1;
}

/* Farmer Card */
.farmer-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-sm);
}

.farmer-card__header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.farmer-card__avatar {
  flex-shrink: 0;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: white;
  background: var(--primary-500);
}

.avatar--md {
  width: 56px;
  height: 56px;
  font-size: var(--text-lg);
}

.farmer-card__info {
  flex: 1;
}

.farmer-card__name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.farmer-card__badges {
  display: flex;
  gap: var(--sp-2);
}

.farmer-card__location {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-sec);
  margin-bottom: var(--sp-4);
}

.farmer-card__location svg {
  width: 16px;
  height: 16px;
  color: var(--primary-500);
}

.farmer-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--sp-4);
}

.farmer-card__stat {
  text-align: center;
}

.farmer-card__stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  display: block;
}

.farmer-card__stat-label {
  font-size: var(--text-xs);
  color: var(--text-sec);
  display: block;
}

.farmer-card__stat-stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: var(--sp-1);
}

.farmer-card__stat-stars svg {
  width: 12px;
  height: 12px;
}

.farmer-card__actions {
  display: flex;
  gap: var(--sp-3);
}

.farmer-card__actions .btn {
  flex: 1;
}

/* Product Tabs */
.product-tabs {
  margin-top: var(--sp-6);
}

.product-tabs__nav {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: var(--sp-6);
}

.product-tabs__tab {
  padding: var(--sp-4) var(--sp-6);
  background: none;
  border: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.product-tabs__tab:hover {
  color: var(--primary-500);
}

.product-tabs__tab--active {
  color: var(--primary-500);
}

.product-tabs__tab--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-500);
}

.product-tabs__panel {
  display: none;
}

.product-tabs__panel--active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-tabs__list {
  list-style: none;
  padding: 0;
  margin-top: var(--sp-4);
}

.product-tabs__list li {
  position: relative;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-3);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.product-tabs__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-500);
}

/* Certifications */
.certifications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-4);
}

.certification-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.certification-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.certification-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--success);
}

.certification-card__info h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.certification-card__info p {
  font-size: var(--text-xs);
  color: var(--text-sec);
  line-height: 1.5;
}

/* Product Table */
.product-info__table {
  width: 100%;
  border-collapse: collapse;
}

.product-info__table tr {
  border-bottom: 1px solid var(--border-light);
}

.product-info__table tr:last-child {
  border-bottom: none;
}

.product-info__table td {
  padding: var(--sp-3) 0;
  font-size: var(--text-sm);
}

.product-info__table td:first-child {
  color: var(--text-sec);
  width: 40%;
}

.product-info__table td:last-child {
  font-weight: 600;
  color: var(--text);
}

/* ============================================
   INQUIRY FORM — Enhanced Styling
   ============================================ */
.inquiry-form {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: var(--sp-8);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 100px;
}

.inquiry-form__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--sp-2);
  color: var(--text);
}

.inquiry-form__subtitle {
  font-size: var(--text-sm);
  color: var(--text-sec);
  margin-bottom: var(--sp-6);
}

.inquiry-form__group {
  margin-bottom: var(--sp-5);
}

.inquiry-form__group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.inquiry-form__group .required {
  color: var(--error);
  margin-left: 2px;
}

.inquiry-form__group input,
.inquiry-form__group select,
.inquiry-form__group textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  background: var(--bg-alt);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  color: var(--text);
}

.inquiry-form__group input::placeholder,
.inquiry-form__group textarea::placeholder {
  color: var(--text-light);
}

.inquiry-form__group input:focus,
.inquiry-form__group select:focus,
.inquiry-form__group textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  background: white;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
  transform: translateY(-1px);
}

.inquiry-form__group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: var(--sp-10);
  cursor: pointer;
}

.inquiry-form__group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.inquiry-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.inquiry-form__divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--sp-6) 0;
}

.inquiry-form__trust {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--primary-50);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-6);
  border: 1px solid var(--primary-100);
}

.inquiry-form__trust svg {
  width: 24px;
  height: 24px;
  color: var(--primary-500);
  flex-shrink: 0;
}

.inquiry-form__trust p {
  font-size: var(--text-xs);
  color: var(--primary-700);
  line-height: 1.5;
}

.inquiry-form__submit {
  width: 100%;
  padding: var(--sp-4) var(--sp-6);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.inquiry-form__submit:hover {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 94, 32, 0.3);
}

.inquiry-form__submit:active {
  transform: translateY(0);
}

.inquiry-form__submit svg {
  width: 20px;
  height: 20px;
}

.inquiry-form__footer {
  margin-top: var(--sp-4);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-light);
}

.inquiry-form__footer svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
}

/* Inquiry Form Success State */
.inquiry-form__success {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
}

.inquiry-form__success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--sp-6);
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.inquiry-form__success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--primary-600);
}

.inquiry-form__success h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.inquiry-form__success p {
  font-size: var(--text-sm);
  color: var(--text-sec);
  margin-bottom: var(--sp-3);
  line-height: 1.6;
}

.inquiry-form__success-note {
  font-size: var(--text-xs) !important;
  color: var(--text-light) !important;
  padding: var(--sp-4);
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  margin-top: var(--sp-4) !important;
}

.inquiry-form__success .btn {
  margin-top: var(--sp-6);
}

/* ============================================
   STICKY PRODUCT BAR
   ============================================ */
.sticky-bar {
  position: fixed;
  top: -80px;
  left: 0;
  right: 0;
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 999;
  transition: top 0.3s ease;
}

.sticky-bar.active {
  top: 0;
}

.sticky-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-4);
}

.sticky-bar__left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.sticky-bar__crop {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sticky-bar__title {
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-bar__tier {
  flex-shrink: 0;
}

.sticky-bar__right {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}

.sticky-bar__price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
}

.sticky-bar__price-value {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--primary-700);
}

.sticky-bar__price-unit {
  font-size: var(--text-xs);
  color: var(--text-sec);
}

/* ============================================
   CAROUSEL (Horizontal Snap Scroll)
   ============================================ */
.carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--sp-6);
}

.carousel-nav {
  display: flex;
  gap: var(--sp-2);
}

.carousel-nav__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-nav__btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

.carousel-nav__btn svg {
  width: 18px;
  height: 18px;
}

.carousel {
  position: relative;
  margin: 0 calc(var(--sp-4) * -1);
  padding: 0 var(--sp-4);
}

.carousel__track {
  display: flex;
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-4);
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  scroll-snap-align: start;
  flex: 0 0 280px;
  min-width: 280px;
}

/* ============================================
   COMPARE CHECKBOX on Product Cards
   ============================================ */
.product-card {
  position: relative;
}

.product-card__compare {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 10;
}

.compare-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
}

.compare-check input {
  display: none;
}

.compare-check__box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.compare-check__box::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--primary-500);
  transform: scale(0);
  transition: transform var(--transition-fast);
}

.compare-check input:checked + .compare-check__box {
  border-color: var(--primary-500);
  background: white;
}

.compare-check input:checked + .compare-check__box::after {
  transform: scale(1);
}

.compare-check__label {
  font-size: var(--text-xs);
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.product-card:hover .compare-check__label {
  opacity: 1;
}

.compare-check input:checked ~ .compare-check__label {
  opacity: 1;
  background: var(--primary-500);
}

.product-card.compared {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ============================================
   COMPARE BAR (Floating)
   ============================================ */
.compare-bar {
  position: fixed;
  bottom: -80px;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--primary-800);
  color: white;
  z-index: 1000;
  transition: bottom 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.compare-bar.active {
  bottom: 0;
}

.compare-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.compare-bar__info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.compare-bar__info svg {
  width: 24px;
  height: 24px;
}

.compare-bar__actions {
  display: flex;
  gap: var(--sp-3);
}

.compare-bar .btn--ghost {
  color: rgba(255, 255, 255, 0.8);
}

.compare-bar .btn--ghost:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.compare-bar .btn--primary {
  background: white;
  color: var(--primary-700);
  border-color: white;
}

.compare-bar .btn--primary:hover {
  background: var(--primary-50);
}

.compare-bar .btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   COMPARE MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: var(--sp-4);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.compare-modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .compare-modal {
  transform: scale(1) translateY(0);
}

.compare-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-6);
  border-bottom: 1px solid var(--border-light);
}

.compare-modal__header h3 {
  font-size: var(--text-xl);
  font-weight: 700;
}

.compare-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.compare-modal__close:hover {
  background: var(--error-bg);
  color: var(--error);
}

.compare-modal__close svg {
  width: 20px;
  height: 20px;
}

.compare-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
}

.compare-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.compare-modal__product {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.compare-modal__product-img {
  height: 180px;
  overflow: hidden;
}

.compare-modal__product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-modal__product-info {
  padding: var(--sp-4);
}

.compare-modal__product-crop {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-500);
  margin-bottom: var(--sp-1);
}

.compare-modal__product-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.compare-modal__product-price {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--primary-700);
}

.compare-modal__product-unit {
  font-size: var(--text-sm);
  color: var(--text-sec);
  font-weight: 400;
}

/* Compare Table */
.compare-modal__table {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.compare-table th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text);
}

.compare-table th:first-child {
  width: 30%;
}

.compare-table td {
  font-size: var(--text-sm);
}

.compare-table td:first-child {
  color: var(--text-sec);
  font-weight: 500;
}

.compare-table td:not(:first-child) {
  font-weight: 600;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table .compare-highlight {
  color: var(--primary-600);
  background: var(--primary-50);
}

.compare-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-light);
  background: var(--bg-alt);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: var(--sp-6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-600);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(27, 94, 32, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-700);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(27, 94, 32, 0.4);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* Mobile Inquiry Button */
.mobile-inquiry {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-4);
  background: white;
  border-top: 1px solid var(--border-light);
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

/* Related Products */
.related-products {
  padding: var(--sp-16) 0;
}

.related-products h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-6);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .product-detail__grid {
    grid-template-columns: 1fr;
  }

  .product-gallery {
    position: static;
  }

  .product-info__meta {
    flex-wrap: wrap;
    gap: var(--sp-4);
  }

  .product-info__meta-item {
    flex: 1;
    min-width: 120px;
  }

  .product-price-box__actions {
    flex-direction: column;
  }

  .farmer-card__actions {
    flex-direction: column;
  }

  .inquiry-form {
    position: static;
  }

  .sticky-bar__title {
    max-width: 200px;
  }
}

@media (max-width: 768px) {
  .product-detail__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
  }

  .breadcrumb ol {
    flex-wrap: wrap;
  }

  .product-info__title {
    font-size: var(--text-2xl);
  }

  .product-price-box__value {
    font-size: var(--text-3xl);
  }

  .product-tabs__nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .product-tabs__tab {
    padding: var(--sp-3) var(--sp-4);
    white-space: nowrap;
  }

  .mobile-inquiry {
    display: block;
  }

  .product-detail {
    padding-bottom: 100px;
  }

  .sticky-bar {
    height: auto;
    padding: var(--sp-3) 0;
  }

  .sticky-bar__inner {
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  .sticky-bar__crop {
    display: none;
  }

  .sticky-bar__title {
    font-size: var(--text-xs);
    max-width: 150px;
  }

  .sticky-bar__tier {
    display: none;
  }

  .sticky-bar__price-value {
    font-size: var(--text-sm);
  }

  .carousel__slide {
    flex: 0 0 260px;
    min-width: 260px;
  }

  .compare-bar__inner {
    flex-direction: column;
    height: auto;
    padding: var(--sp-3) 0;
    gap: var(--sp-3);
  }

  .back-to-top {
    bottom: 80px;
    right: var(--sp-4);
    width: 40px;
    height: 40px;
  }

  .compare-modal {
    max-height: 85vh;
    margin: var(--sp-4);
  }

  .compare-modal__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .compare-modal__product-img {
    height: 140px;
  }

  .compare-table th,
  .compare-table td {
    padding: var(--sp-3);
    font-size: var(--text-xs);
  }

  .compare-modal__footer {
    flex-direction: column;
    gap: var(--sp-2);
  }

  .compare-modal__footer .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .product-gallery__thumbs {
    gap: var(--sp-2);
  }

  .product-gallery__thumb {
    width: 64px;
    height: 64px;
  }

  .farmer-card__stats {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .certifications {
    grid-template-columns: 1fr;
  }

  .inquiry-form__row {
    grid-template-columns: 1fr;
  }

  .inquiry-form {
    padding: var(--sp-6);
  }

  .carousel__slide {
    flex: 0 0 240px;
    min-width: 240px;
  }

  .carousel-nav__btn {
    width: 36px;
    height: 36px;
  }

  .compare-check__label {
    display: none;
  }

  .sticky-bar__right .btn {
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--text-xs);
  }
}