/* ================================
   WOOCOMMERCE STYLES - RODY QUESOS
   ================================ */

/* Hero Secondary (Cyan background) */
.hero-secondary {
  background-color: #002147;
  padding: 5rem 0;
}

.hero-secondary .hero-title {
  color: #f9ede1;
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-secondary .hero-description {
  color: #f9ede1;
  opacity: 0.9;
  text-align: center;
  font-size: 1.125rem;
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.6;
}

/* Intro Section */
.section-intro {
  padding: 3rem 0;
  background-color: #f9ede1;
}

.intro-content {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.intro-text {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
}

/* Catalog Section */
.section-catalog {
  padding: 5rem 0;
  background-color: #f9ede1;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
  position: relative;
  height: 16rem;
  overflow: hidden;
  background-color: #f1f5f9;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.product-content {
  padding: 1.5rem;
  flex: 1;
}

.product-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #002147;
  margin: 0 0 0.5rem 0;
}

.product-description {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.product-footer {
  padding: 0 1.5rem 1.5rem;
}

/* Added transition to view more button */
.btn-view-more {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: #002147;
  color: #f9ede1;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease-in-out;
}

/* Uniform turquoise hover for product button */
.btn-view-more:hover {
  background-color: #0098b3 !important;
  color: #f9ede1 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* No Products Message */
.no-products {
  text-align: center;
  font-size: 1.125rem;
  color: #64748b;
  padding: 3rem 0;
}

/* ================================
   PRODUCT MODAL - Updated to match V0 design
   ================================ */

.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.product-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.product-modal-content {
  position: relative;
  background: #f9ede1;
  border-radius: 1rem; /* Updated from 0.75rem */
  max-width: 42rem;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Updated modal close button to match v0 Next.js design exactly */
.product-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem; /* Changed from 50% to 0.5rem for square with rounded corners */
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  color: #002147;
  transition: all 250ms ease-in-out;
  z-index: 10001;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Uniform turquoise hover for modal close button */
.product-modal-close:hover {
  background-color: #0098b3 !important;
  color: #f9ede1 !important;
  transform: scale(1.05); /* Changed from rotate(90deg) to match v0 */
}

.product-modal-body {
  padding: 2.5rem; /* Updated from 2rem */
}

.modal-product-title {
  font-family: "DM Serif Display", serif;
  font-size: 2rem; /* Updated from 1.875rem */
  font-weight: 700; /* Updated from 600 */
  color: #002147;
  margin: 0 0 0.75rem 0; /* Updated from 0.5rem */
  line-height: 1.2; /* Added */
}

.modal-product-subtitle {
  font-size: 1.125rem; /* Updated from 1rem */
  color: #64748b;
  margin: 0 0 2rem 0; /* Updated from 1.5rem */
  line-height: 1.6; /* Added */
}

.modal-product-image {
  position: relative;
  height: 22rem; /* Updated from 16rem */
  border-radius: 0.75rem; /* Updated from 0.5rem */
  overflow: hidden;
  margin-bottom: 2rem; /* Updated from 1.5rem */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Added */
}

.modal-product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.modal-product-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Updated from 1rem */
}

.modal-detail-item {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1.25rem; /* Updated from 1rem */
}

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

.modal-detail-title {
  font-family: "Mulish", sans-serif; /* Added */
  font-weight: 700; /* Updated from 600 */
  color: #002147;
  margin: 0 0 0.5rem 0; /* Updated from 0.25rem */
  font-size: 1.125rem; /* Updated from 1rem */
}

.modal-detail-content {
  color: #64748b;
  margin: 0;
  line-height: 1.7; /* Added */
  font-size: 1rem; /* Added */
}

/* Hide default WooCommerce elements */
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-loop-product__title,
.price,
.add_to_cart_button {
  display: none !important;
}

/* ================================
   PRODUCTS PAGINATION
   ================================ */

.products-pagination {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}

/* Removed list-style and added proper styling */
.pagination-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-item {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: inline-flex;
}

.pagination-item::before {
  content: none !important;
  display: none !important;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  background-color: white;
  color: #002147;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 250ms ease-in-out;
  gap: 0.5rem;
}

.pagination-link:hover {
  background-color: #0098b3;
  color: #f9ede1;
  border-color: #0098b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 152, 179, 0.2);
}

.pagination-link svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  background-color: #002147;
  color: #f9ede1;
  border: 1px solid #002147;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: default;
}

.pagination-current:hover {
  background-color: #002147;
  color: #f9ede1;
  border-color: #002147;
  transform: none;
  box-shadow: none;
}

.pagination-prev,
.pagination-next {
  font-weight: 600;
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  color: #64748b;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .products-pagination {
    margin-top: 3rem;
  }

  .pagination-link {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
  }

  .pagination-current {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
  }

  .pagination-prev span:not(.sr-only),
  .pagination-next span:not(.sr-only) {
    display: none;
  }

  .pagination-prev,
  .pagination-next {
    min-width: 2.25rem;
    padding: 0;
  }

  .pagination-link svg {
    width: 16px;
    height: 16px;
  }
}
