/* product-detail.css - Diseño Moderno Estilo Shopify/WooCommerce */

/* ===== LOADING STATES ===== */
.product-loading-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-loading-skeleton {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-main-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 12px;
}

.skeleton-thumbnails {
  display: flex;
  gap: 0.5rem;
}

.skeleton-thumb {
  width: 80px;
  height: 80px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 8px;
}

.skeleton-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-title {
  height: 32px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 6px;
  width: 80%;
}

.skeleton-price {
  height: 48px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 6px;
  width: 60%;
}

.skeleton-description {
  height: 120px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 6px;
}

.skeleton-actions {
  height: 60px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 6px;
}

@keyframes skeleton-loading {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ===== MAIN CONTAINER ===== */
.product-detail-modern {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background: #fff;
}

/* ===== BREADCRUMB NAVIGATION ===== */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #ccc;
}

.breadcrumb-current {
  color: #333;
  font-weight: 500;
}

/* ===== PRODUCT GRID ===== */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

/* ===== GALLERY MODERN ===== */
.product-gallery-modern {
  position: relative;
}

.gallery-main {
  position: relative;
  margin-bottom: 1rem;
}

.main-image-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fa;
}

.main-product-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.main-product-image:hover {
  transform: scale(1.02);
}

.image-zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  z-index: 10;
  overflow: hidden;
  border-radius: 12px;
}

.zoom-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.gallery-nav {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-thumbnails {
  margin-top: 1rem;
}

.thumbnails-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.thumbnail-item {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail-item:hover {
  border-color: #007bff;
  transform: scale(1.05);
}

.thumbnail-item.active {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

/* ===== PRODUCT INFO MODERN ===== */
.product-info-modern {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-header-modern {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  width: fit-content;
}

.product-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 0;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.stars {
  display: flex;
  gap: 0.25rem;
  color: #ffc107;
  font-size: 1.1rem;
}

.rating-text {
  color: #666;
  font-size: 0.9rem;
}

.review-link {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.review-link:hover {
  color: #0056b3;
}

/* ===== PRICING ===== */
.product-pricing {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.price-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.current-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
}

.original-price {
  font-size: 1.5rem;
  color: #999;
  text-decoration: line-through;
}

.discount-badge {
  padding: 0.25rem 0.75rem;
  background: #dc3545;
  color: white;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.stock-status-modern {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stock-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.stock-indicator.in-stock {
  color: #28a745;
}

.stock-indicator.out-of-stock {
  color: #dc3545;
}

.stock-bar {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.stock-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  transition: width 0.3s ease;
}

/* ===== QUANTITY SELECTOR ===== */
.product-variants {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.variant-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.variant-label {
  font-weight: 600;
  color: #333;
  min-width: 80px;
}

.quantity-selector-modern {
  display: flex;
  align-items: center;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.qty-btn-modern {
  width: 40px;
  height: 40px;
  border: none;
  background: #f8f9fa;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn-modern:hover {
  background: #e9ecef;
}

.qty-btn-modern:active {
  background: #dee2e6;
}

.quantity-input-modern {
  width: 60px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  background: white;
}

.quantity-input-modern:focus {
  outline: none;
}

/* ===== ACTION BUTTONS ===== */
.product-actions-modern {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary-modern,
.btn-secondary-modern {
  flex: 1;
  min-width: 200px;
  height: 50px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary-modern {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.btn-primary-modern:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-primary-modern:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary-modern.loading {
  background: #6c757d;
  cursor: wait;
}

.btn-primary-modern.success {
  background: #28a745;
}

.btn-secondary-modern {
  background: #6c757d;
  color: white;
}

.btn-secondary-modern:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-wishlist {
  width: 50px;
  height: 50px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-wishlist:hover {
  border-color: #dc3545;
  color: #dc3545;
}

.btn-wishlist.active {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* ===== SHIPPING INFO ===== */
.shipping-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.shipping-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.shipping-item i {
  width: 20px;
  color: #28a745;
  font-size: 1.1rem;
}

.shipping-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shipping-text strong {
  font-size: 0.9rem;
  color: #333;
}

.shipping-text span {
  font-size: 0.8rem;
  color: #666;
}

/* ===== PRODUCT FEATURES ===== */
.product-features-modern {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #666;
}

.feature-item i {
  color: #28a745;
}

/* ===== PRODUCT TABS ===== */
.product-tabs {
  margin-top: 3rem;
  border-top: 1px solid #e9ecef;
  padding-top: 2rem;
}

.tabs-header {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e9ecef;
}

.tab-btn {
  padding: 1rem 2rem;
  border: none;
  background: none;
  color: #666;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: #007bff;
}

.tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== TAB CONTENT ===== */
.description-content,
.specifications-content,
.reviews-content {
  max-width: 800px;
}

.description-content h3,
.specifications-content h3,
.reviews-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.description-content p {
  line-height: 1.6;
  color: #666;
  font-size: 1rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.spec-label {
  font-weight: 600;
  color: #333;
}

.spec-value {
  color: #666;
}

/* ===== REVIEWS ===== */
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.average-rating {
  text-align: center;
}

.rating-number {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}

.rating-stars {
  font-size: 1.5rem;
  color: #ffc107;
  margin: 0.5rem 0;
}

.rating-count {
  color: #666;
  font-size: 0.9rem;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-item {
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  background: white;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.reviewer-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reviewer-name {
  font-weight: 600;
  color: #333;
}

.review-stars {
  color: #ffc107;
}

.review-date {
  color: #666;
  font-size: 0.9rem;
}

.review-text {
  line-height: 1.6;
  color: #666;
}

.no-reviews {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.no-reviews i {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 1rem;
}

/* ===== RELATED PRODUCTS ===== */
.related-products-modern {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #e9ecef;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2rem;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.related-product-card-modern {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.related-product-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.related-product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.related-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.related-product-card-modern:hover .related-product-overlay {
  opacity: 1;
}

.related-product-card-modern:hover .related-product-image img {
  transform: scale(1.1);
}

.quick-view-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  color: #333;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-view-btn:hover {
  background: #007bff;
  color: white;
}

.related-product-info {
  padding: 1.5rem;
}

.related-product-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.related-product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 0.5rem;
}

.related-product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.no-related-products {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.no-related-products i {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 1rem;
}

/* ===== ERROR STATE ===== */
.error-state-modern {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.error-icon {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 2rem;
}

.error-state-modern h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.error-state-modern p {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .product-detail-modern {
    padding: 1rem;
  }
  
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .product-title {
    font-size: 2rem;
  }
  
  .current-price {
    font-size: 2rem;
  }
  
  .product-actions-modern {
    flex-direction: column;
  }
  
  .btn-primary-modern,
  .btn-secondary-modern {
    min-width: auto;
  }
  
  .tabs-header {
    flex-direction: column;
  }
  
  .tab-btn {
    justify-content: center;
  }
  
  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .reviews-summary {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .product-loading-skeleton {
    grid-template-columns: 1fr;
  }
  
  .breadcrumb-nav {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }
  
  .product-title {
    font-size: 1.8rem;
  }
  
  .current-price {
    font-size: 1.8rem;
  }
  
  .variant-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .product-features-modern {
    flex-direction: column;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
}
