﻿.products-section {
  padding: 80px 0;
  background-color: var(--white);
}

.section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 48px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 !important;
  }
  .product-card { padding: 0 !important; }
  .product-image-wrap { margin-bottom: 8px !important; }
  .product-name { font-size: 13px !important; height: 2.6em; }
  .product-price { font-size: 14px !important; }
  .btn-add { padding: 10px 4px !important; font-size: 10px !important; letter-spacing: 0; }
  .btn-add svg { width: 14px; height: 14px; }
}

.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease;
  height: 100%;
}

.product-image-wrap {
  background-color: transparent;
  border-radius: 8px;
  margin-bottom: 16px;
  position: relative;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image-wrap img {
  transform: translateY(-4px) scale(1.02);
}

/* Badges */
.product-badges {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background-color: var(--black);
  color: var(--white);
  text-transform: capitalize;
}

.badge.oferta { background-color: #d62828; }
.badge.poco-stock { background-color: #ffb703; color: var(--black); }

/* Wishlist Button */
.btn-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--white);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  z-index: 5;
  transition: transform 0.2s;
}

.btn-wishlist:hover {
  transform: scale(1.1);
}

/* Add to Cart Button Full Width */
.btn-add {
  background-color: var(--black);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 12px;
  border: none;
  cursor: pointer;
}

.btn-add:hover {
  transform: translateY(-2px);
  background-color: #333;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Typography */
.product-name {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.product-name:hover {
  text-decoration: underline;
}

.product-image-wrap {
  cursor: pointer;
}

.product-subtitle {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-stars {
  color: var(--black);
  font-size: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stars-count {
  color: #666;
  font-size: 12px;
}

.product-price {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.price-now { color: #d62828; font-weight: 800; }

.price-old {
  text-decoration: line-through;
  color: #aaa;
  font-size: 13px;
  font-weight: 400;
}

.price-save {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 4px;
}

/* Quick View Modal Styles */
.quickview-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.quickview-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.quickview-content {
  background: var(--white);
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 16px;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.quickview-overlay.active .quickview-content {
  transform: translateY(0);
}

.quickview-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f0f0f0;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.quickview-close:hover {
  background: #e0e0e0;
}

.quickview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 40px;
}

@media (max-width: 768px) {
  .quickview-grid {
    grid-template-columns: 1fr;
    padding: 24px 24px 40px;
  }
}

.main-image-container {
  background: transparent;
  border-radius: 12px;
  padding: 0;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.main-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.thumbnails-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.thumb-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.thumb-img.active, .thumb-img:hover {
  border-color: var(--black);
}

.quickview-info {
  display: flex;
  flex-direction: column;
}

.qv-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.qv-title {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 4px;
  line-height: 1.2;
}

.qv-category {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.qv-stars {
  color: var(--black);
  font-size: 14px;
  margin-bottom: 24px;
}

.qv-price-container {
  font-size: 28px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.qv-description {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 24px;
}

.qv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.qv-tag {
  background: #f0f2f5;
  color: #444;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.btn-add-full {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 16px;
  width: 100%;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  transition: background 0.3s, transform 0.2s;
  margin-bottom: 16px;
}

.btn-add-full:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.qv-trust {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: #666;
  font-weight: 600;
  margin-top: auto;
}

.qv-trust span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Reviews Section */
.qv-reviews-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #eee;
  grid-column: 1 / -1;
}

.qv-reviews-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.qv-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 24px;
  padding-right: 4px;
}

.qv-review-item {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 12px 16px;
}

.qv-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.qv-review-author {
  font-weight: 700;
  font-size: 14px;
}

.qv-review-stars {
  color: #f59e0b;
  font-size: 13px;
  letter-spacing: 1px;
}

.qv-review-date {
  font-size: 11px;
  color: #999;
  margin-bottom: 6px;
}

.qv-review-comment {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.qv-no-reviews {
  font-size: 14px;
  color: #999;
  text-align: center;
  padding: 16px 0;
}

/* Review Form */
.qv-review-form {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 20px;
}

.qv-review-form h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.star-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  cursor: pointer;
}

.star-pick {
  font-size: 28px;
  color: #ddd;
  transition: color 0.15s;
  user-select: none;
}

.star-pick.active, .star-pick:hover {
  color: #f59e0b;
}

.review-input, .review-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
  background: white;
}

.review-textarea {
  resize: vertical;
}

.btn-submit-review {
  background: var(--black);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.btn-submit-review:hover {
  background: #333;
}

.qv-full-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.qv-full-link:hover {
  color: var(--black);
}

