/*
Theme Name: ChollAmazon Elementor - Comparador de Ofertas
Description: Tema Elementor para sitio de comparación de ofertas de Amazon estilo Chollometro
Author: Tu Nombre
Version: 1.0.0
License: GPL v2 or later
Text Domain: chollamazon
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
WC requires at least: 5.0
WC tested up to: 8.0
Elementor tested up to: 3.18.0
*/

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9fafb;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Elementor Compatibility */
.elementor-widget-chollamazon_hero_section,
.elementor-widget-chollamazon_featured_deals,
.elementor-widget-chollamazon_product_categories,
.elementor-widget-chollamazon_deals_grid,
.elementor-widget-chollamazon_top_voted_products,
.elementor-widget-chollamazon_price_comparison {
  margin-bottom: 2rem;
}

/* Header */
.site-header {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #111827;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: #f97316;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: bold;
}

.header-search {
  flex: 1;
  max-width: 32rem;
  margin: 0 2rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  width: 1rem;
  height: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: #374151;
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  position: relative;
}

.header-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.header-nav {
  border-top: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.current {
  color: #ea580c;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #111827;
}

/* WooCommerce Product Cards */
.woocommerce .products {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.woocommerce .products.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.woocommerce .products.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.woocommerce .products.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.woocommerce .products.columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

.woocommerce ul.products li.product {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 0;
  padding: 0;
  text-align: left;
  position: relative;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.woocommerce ul.products li.product .product-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.woocommerce ul.products li.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.woocommerce ul.products li.product .onsale {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #dc2626;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

/* Product Badges */
.product-badges {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 2;
}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-hot {
  background: #f97316;
  color: white;
}

.badge-featured {
  background: #8b5cf6;
  color: white;
}

/* Product Content */
.woocommerce ul.products li.product .product-content {
  padding: 1rem;
}

.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.woocommerce ul.products li.product h2 a,
.woocommerce ul.products li.product .woocommerce-loop-product__title a {
  color: #111827;
  text-decoration: none;
}

.woocommerce ul.products li.product .price {
  font-size: 1.125rem;
  font-weight: bold;
  color: #16a34a;
  margin-bottom: 0.75rem;
}

.woocommerce ul.products li.product .price del {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: normal;
  margin-right: 0.5rem;
}

.woocommerce ul.products li.product .price ins {
  text-decoration: none;
}

/* Product Voting System */
.product-voting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 3;
}

.vote-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
  color: #6b7280;
}

.vote-btn:hover {
  background: #f3f4f6;
}

.vote-up:hover {
  color: #16a34a;
}

.vote-down:hover {
  color: #dc2626;
}

.vote-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

/* Deal Comparison Section */
.deal-comparison-section {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.deal-comparison-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111827;
}

.deal-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.deal-comparison-item {
  background: white;
  padding: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
}

.deal-store {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.deal-price {
  font-size: 1.125rem;
  font-weight: bold;
  color: #16a34a;
  margin-bottom: 0.5rem;
}

.deal-savings {
  font-size: 0.875rem;
  color: #dc2626;
  font-weight: 500;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.categories-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.categories-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.categories-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.categories-grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.categories-grid-8 {
  grid-template-columns: repeat(8, 1fr);
}

.category-card {
  background: white;
  padding: 1rem;
  text-align: center;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.category-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: inherit;
}

.category-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  color: white;
}

.category-name {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Top Voted Products */
.top-voted-products {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.top-voted-products.top-voted-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.top-voted-item {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.ranking-number {
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  background: #f97316;
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

.top-voted-content {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.top-voted-image {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border-radius: 0.375rem;
  overflow: hidden;
}

.top-voted-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-voted-info {
  flex: 1;
}

.top-voted-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.top-voted-title a {
  color: #111827;
  text-decoration: none;
}

.top-voted-price {
  font-size: 1rem;
  font-weight: bold;
  color: #16a34a;
  margin-bottom: 0.5rem;
}

.top-voted-stats {
  font-size: 0.75rem;
  color: #6b7280;
}

.votes-count {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Price Comparison */
.price-comparison-section {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.price-comparison-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111827;
}

.price-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.price-comparison-item {
  background: white;
  padding: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  text-align: center;
  transition: all 0.2s;
}

.price-comparison-item.best-price {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
}

.store-info {
  margin-bottom: 0.75rem;
}

.store-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.best-price-badge {
  background: #16a34a;
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.store-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #16a34a;
  margin-bottom: 1rem;
}

.store-button {
  background: #f97316;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
  display: inline-block;
}

.store-button:hover {
  background: #ea580c;
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #f97316;
  color: white;
}

.btn-primary:hover {
  background: #ea580c;
  color: white;
}

.btn-outline {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-outline:hover {
  background: #f9fafb;
  color: #374151;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-buttons .btn.active {
  background: #f97316;
  color: white;
  border-color: #f97316;
}

/* WooCommerce Buttons */
.woocommerce ul.products li.product .button {
  width: 100%;
  background: #f97316;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.woocommerce ul.products li.product .button:hover {
  background: #ea580c;
  color: white;
}

/* Single Product Page */
.woocommerce div.product {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.woocommerce div.product .product-images {
  margin-bottom: 2rem;
}

.woocommerce div.product .summary {
  padding-left: 2rem;
}

.woocommerce div.product .product_title {
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #111827;
}

.woocommerce div.product .price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #16a34a;
  margin-bottom: 1rem;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  margin-bottom: 1.5rem;
  color: #6b7280;
}

.single-product-deal-info {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.deal-notice {
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.5rem;
}

.affiliate-button {
  background: #f59e0b;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.affiliate-button:hover {
  background: #d97706;
  color: white;
}

/* Cart */
.woocommerce table.cart {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.woocommerce table.cart th,
.woocommerce table.cart td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.woocommerce table.cart th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.woocommerce .cart-collaterals {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

/* Checkout */
.woocommerce-checkout .col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.woocommerce-checkout-review-order {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* My Account */
.woocommerce-account .woocommerce-MyAccount-navigation {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  margin-bottom: 2rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
  margin-bottom: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 0.75rem 1rem;
  color: #6b7280;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
  background: #f97316;
  color: white;
}

.woocommerce-account .woocommerce-MyAccount-content {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  color: white;
  font-weight: 500;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  background: #16a34a;
}

.notification-error {
  background: #dc2626;
}

/* Footer */
.site-footer {
  background: #111827;
  color: white;
  margin-top: 4rem;
}

.footer-content {
  padding: 3rem 0;
}

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

.footer-section h3 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  color: #9ca3af;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: white;
}

.footer-newsletter {
  display: flex;
  margin-top: 1rem;
}

.footer-newsletter input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: #374151;
  border: 1px solid #4b5563;
  color: white;
  border-radius: 0.375rem 0 0 0.375rem;
  font-size: 0.875rem;
}

.footer-newsletter button {
  padding: 0.5rem 1rem;
  background: #f97316;
  color: white;
  border: none;
  border-radius: 0 0.375rem 0.375rem 0;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.footer-newsletter button:hover {
  background: #ea580c;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-search {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .woocommerce .products.columns-2,
  .woocommerce .products.columns-3,
  .woocommerce .products.columns-4,
  .woocommerce .products.columns-6 {
    grid-template-columns: 1fr;
  }

  .categories-grid-2,
  .categories-grid-3,
  .categories-grid-4,
  .categories-grid-6,
  .categories-grid-8 {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .filter-buttons {
    width: 100%;
    justify-content: center;
  }

  .price-comparison-grid {
    grid-template-columns: 1fr;
  }

  .top-voted-products.top-voted-products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }

  .categories-grid-2,
  .categories-grid-3,
  .categories-grid-4,
  .categories-grid-6,
  .categories-grid-8 {
    grid-template-columns: 1fr;
  }

  .top-voted-content {
    flex-direction: column;
    text-align: center;
  }

  .top-voted-image {
    width: 6rem;
    height: 6rem;
  }
}

/* Elementor Specific Styles */
.elementor-section .elementor-container {
  max-width: 1200px;
}

.elementor-widget:not(:last-child) {
  margin-bottom: 20px;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}

.hidden {
  display: none;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #f97316;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
