/* Product Container - Inspired by Trassig's clean layout */
.product-container {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 3rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

@media (max-width: 1024px) {
  .product-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Product Gallery - With larger primary image */
.product-gallery {
  position: static;
  /*top: 2rem;*/
  align-self: start;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Main image container */
.product-main-image {
  width: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--color-zinc-100);
  margin-bottom: 1rem;
  position: relative;
  padding-top: 100%;
  /* 1:1 Aspect Ratio */
}

.main-image picture,
.product-main-image picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image img,
.product-main-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: var(--transition);
}

.thumbnail-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  position: relative;
}

.thumbnail.active {
  border-color: var(--color-primary, #3B82F6);
}

.thumbnail picture {
  width: 100%;
  height: 100%;
  display: block;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Product Info - Improved typography and spacing */
.product-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: var(--color-zinc-900);
}

.product-subtitle {
  font-size: 1.125rem;
  color: var(--color-zinc-600);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-zinc-600);
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-rating {
  display: inline-flex;
  align-items: center;
}

.stars {
  display: flex;
  color: var(--color-review-star);
  margin-right: 0.5rem;
}

.review-count {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.review-count:hover {
  text-decoration: underline;
}

.product-price-container {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-zinc-200);
}

.product-price {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-zinc-900);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.original-price {
  text-decoration: line-through;
  font-size: 1.25rem;
  color: var(--color-zinc-500);
}

.discount {
  display: inline-block;
  background-color: var(--color-review-star);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.price-notice {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-zinc-500);
}

/* Color Variants - Improved circle design */
.product-options {
  margin-bottom: 2rem;
}

.variant-label {
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-zinc-700);
}

.selected-color {
  font-weight: normal;
  color: var(--color-zinc-600);
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.color-option {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--color-zinc-200);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.color-option:hover {
  transform: scale(1.05);
}

.color-option.selected {
  border-color: var(--color-primary);
}

.color-option.selected::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.75rem;
  height: 0.75rem;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Quantity Selector - More modern appearance */
.quantity-selector {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.quantity-label {
  font-weight: 600;
  margin-right: 1rem;
  min-width: 5rem;
  color: var(--color-zinc-700);
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-zinc-300);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.quantity-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-zinc-700);
  transition: background-color 0.2s;
}

.quantity-btn:hover {
  background-color: var(--color-zinc-100);
}

.quantity-input {
  width: 3rem;
  height: 2.5rem;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-zinc-300);
  border-right: 1px solid var(--color-zinc-300);
  font-size: 1rem;
  font-weight: 500;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Action Buttons - More appealing CTAs */
.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Changed from flex to grid with equal columns */
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-add-cart,
.btn-buy-now {
  width: 100%;
  /* Ensure both buttons take full width of their grid cell */
  padding: 1rem 1.0rem;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.btn-add-cart {
  background-color: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary)!important;
}

.btn-add-cart:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: white!important;
}

.btn-buy-now {
  background-color: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
}

.btn-buy-now:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

/* Improve the coverage calculator UI */
.coverage-calculator {
  padding: 20px;
  border-radius: 8px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Fix input fields and selects to stay within boundaries */
.coverage-calculator input,
.coverage-calculator select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

/* Make sure the button stays within the container */
.coverage-calculator button {
  width: 100%;
  padding: 12px;
  background-color: #e5c22d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 15px;
  box-sizing: border-box;
}

/* Add proper spacing between elements */
.coverage-calculator .form-group {
  margin-bottom: 15px;
}

/* Make the layout responsive */
@media (max-width: 576px) {

  .coverage-calculator input,
  .coverage-calculator select,
  .coverage-calculator button {
    font-size: 16px;
    /* Better for mobile touch */
  }
}

/* Product Features */
.product-features {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--color-zinc-200);
  border-radius: var(--border-radius);
  background-color: var(--color-zinc-50);
}

.features-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-zinc-800);
  font-size: 1.125rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--color-zinc-700);
}

.feature:last-child {
  margin-bottom: 0;
}

.feature i {
  color: var(--success);
  flex-shrink: 0;
}

/* Product Details/Tabs - Improved navigation */
.product-tabs {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--color-zinc-200);
  margin-bottom: 2rem;
  position: relative;
  overflow-x: auto;
}

.tab-item {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--color-zinc-600);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-item.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-zinc-900);
}

.tab-content p,
.tab-content li {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--color-zinc-700);
}

.tab-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.tab-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.tab-content th,
.tab-content td {
  padding: 0.75rem;
  border: 1px solid var(--color-zinc-200);
  text-align: left;
}

.tab-content th {
  background-color: var(--color-zinc-100);
}

/* Reviews Section - More appealing layout */
.reviews-section {

  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.reviews-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-zinc-900);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overall-rating {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  color: var(--color-review-star);
  margin-left: 1rem;
}

.write-review-btn {
  background-color: var(--color-primary);
  color: white!important;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.write-review-btn:hover {
  background-color: var(--color-primary-hover);
  color: white!important;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.review-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-zinc-200);
}

.review-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reviewer-name {
  font-weight: 600;
  color: var(--color-zinc-900);
}

.review-date {
  color: var(--color-zinc-500);
  font-size: 0.875rem;
}

.review-rating {
  margin-bottom: 0.75rem;
  color: var(--color-review-star);
}

.review-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-zinc-900);
  font-size: 1.125rem;
}

.review-content {
  color: var(--color-zinc-700);
  line-height: 1.6;
}

/* Related Products - Grid layout improvements */
.related-products {
  padding: 2rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.related-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--color-zinc-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-all-link {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.view-all-link:hover {
  text-decoration: underline;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  border: 1px solid var(--color-zinc-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-image-container {
  position: relative;
  padding-top: 100%;
  background-color: var(--color-zinc-100);
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-content {
  padding: 1.25rem;
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-zinc-500);
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-zinc-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-rating {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.product-card .product-price {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.product-card .btn-add-cart {
  width: 100%;
  padding: 0.625rem;
  font-size: 0.875rem;
}

/* Responsive fixes for smaller screens */
@media (max-width: 768px) {
  .product-container {
    padding: 1.5rem;
  }

  .product-title {
    font-size: 1.5rem;
  }

  .product-price {
    font-size: 1.5rem;
  }

  .product-actions {
    flex-direction: column;
  }

  .calculator-form {
    grid-template-columns: 1fr;
  }

  .calculator-button {
    grid-column: 1;
  }

  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Notification styles */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  background: white;
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-md);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 300px;
  animation: slide-in 0.3s ease;
}

.notification.success {
  border-left-color: var(--success);
}

.notification.error {
  border-left-color: var(--danger);
}

.notification.hide {
  animation: slide-out 0.3s ease forwards;
}

.notification-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-zinc-500);
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Product features and calculator layout for desktop */
@media (min-width: 768px) {
  .product-features-calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .product-features {
    margin-top: 0;
    /* Reset the top margin that was set earlier */
    height: 100%;
    /* Make it take full height of the container */
  }

  .coverage-calculator {
    height: 100%;
    /* Make it take full height of the container */
  }
}

/* Keep the existing styles for mobile */
@media (max-width: 767px) {
  .product-features-calculator-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .product-features {
    margin-top: 0;
  }
}

/* Product features and calculator layout */
.product-features-calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background-color: white;
  padding: 2rem;

  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  width: calc(100% + 0rem);
}

/* Key Benefits styling */
.product-features {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 0;
  height: 100%;
  border: 1px solid var(--color-zinc-200);
}

/* Coverage calculator styling */
.coverage-calculator {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  height: 100%;
  border: 1px solid var(--color-zinc-200);
}

/* Make it responsive */
@media (max-width: 767px) {
  .product-features-calculator-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    padding: 1rem;
  }
}

/* Variant image highlighting */
.thumbnail.variant-highlighted {
  border-color: var(--color-primary, #3B82F6);
  box-shadow: 0 0 0 2px var(--color-primary, #3B82F6);
}


.fa-check-circle{
  color: var(--color-primary)!important;
}