/* Products Grid Layout - Optimized for 9 items per page */
.services-grid,
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* Product Card Styling */
.service-card,
.product-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
}
.service-card {
  padding: 30px;
}

.service-card:hover,
.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-card-inner,
.product-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Product Image */
.service-image,
.product-image {
  position: relative;
  overflow: hidden;
}

.service-image {
  width: 140px;
  height: 140px;
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px auto;
  border-radius: 8px;
}

.product-image {
  height: 200px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.service-img,
.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain for services */
  object-position: center;
  transition: transform 0.3s ease;
}

/* Specific styling for service images to maintain aspect ratio */
.service-img {
  object-fit: contain;
}

.product-img {
  object-fit: cover;
}

.service-card:hover .service-img,
.product-card:hover .product-img {
  transform: scale(1.1);
}

/* Product Badge */
.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
}

.product-badge .badge {
  background: var(--pantone-152);
  color: white;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Product Content */
.service-content,
.product-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Center all content in service cards */
.service-content {
  text-align: center;
  align-items: center;
}

.service-title,
.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pantone-546);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.service-summary,
.product-summary {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
  max-height: 4.5em; /* Limita a 3 líneas aproximadamente */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Product Price */
.product-price {
  margin-bottom: 1.5rem;
}

.product-price .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pantone-313);
}

/* Product Actions */
.service-actions,
.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Center service actions */
.service-actions {
  justify-content: center;
}

.service-actions .btn,
.product-actions .btn {
  flex: 1;
  min-width: 120px;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Service buttons don't need to stretch full width when centered */
.service-actions .btn {
  flex: none;
}

.service-actions .btn-primary,
.product-actions .btn-primary {
  background-color: var(--pantone-313);
  border-color: var(--pantone-313);
}

.service-actions .btn-primary:hover,
.product-actions .btn-primary:hover {
  background-color: var(--pantone-546);
  border-color: var(--pantone-546);
  transform: translateY(-2px);
}

.service-actions .btn-outline-secondary,
.product-actions .btn-outline-secondary {
  border-color: #dee2e6;
  color: #6c757d;
}

.service-actions .btn-outline-secondary:hover,
.product-actions .btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
  color: #495057;
}

/* Section Title */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--pantone-546);
  position: relative;
  padding-bottom: 1rem;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--pantone-313);
  border-radius: 2px;
}


/* Responsive Design - Optimized for 9 items */
@media (max-width: 1200px) {
  .services-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .services-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .service-image {
    width: 120px;
    height: 120px;
  }

  .service-content,
  .product-content {
    padding: 1.25rem;
  }

  .service-title,
  .product-title {
    font-size: 1.1rem;
  }

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

  .service-actions,
  .product-actions {
    flex-direction: row;
  }

  .service-actions {
    justify-content: center;
  }

  .service-actions .btn,
  .product-actions .btn {
    flex: none;
    width: 100%;
  }

  .service-actions .btn {
    width: auto;
    min-width: 140px;
  }
}

@media (max-width: 576px) {
  .services-grid,
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-image {
    width: 120px;
    height: 120px;
  }

  .product-image {
    height: 180px;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

/* Block Products Styling */
.services-section .service-description,
.products-section .product-description {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  max-height: 4.5em; /* Limita a 3 líneas aproximadamente */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Legacy Support - Keep old styles for backward compatibility */
#products-block img,
#services-block img,
#products-view .items img,
#services-view .items img {
    height: 75px;
    width: auto;
    margin: auto;
    transition: transform 0.2s;
}

#products-block .product:hover img,
#services-block .service:hover img,
#products-view .product:hover img,
#services-view .service:hover img {
    transform: scale(1.1);
}

#products-block .product,
#services-block .service,
#products-view .product,
#services-view .service {
    margin: 15px 5px 15px 5px;
    padding-top: 25px;
    padding-bottom: 12px;
}

#products-block .owl-nav,
#services-block .owl-nav{
    display: none;
}

#products-block .product-icon,
#services-block .service-icon,
#products-view .product-icon,
#services-view .service-icon {
  margin-bottom: 0.4rem;
  transition: transform 0.3s linear;
}

#products-block p,
#services-block p,
#products-view p,
#services-view p {
    font-size: 15px;
}

#products-block .summary,
#services-block .summary,
#products-view .summary,
#services-view .summary {
    margin: 0.3rem 0.6rem 0.8rem 0.3rem;
    font-size: 17px;
}

#products-view .items,
#services-view .items {
    display: flex;
    flex-direction: column;
}

#products-view .items p,
#services-view .items p {
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: 0;
    margin-right: 0;
}

/* .service-image, */
.product-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.view-details-btn {
  background-color: var(--pantone-152);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
}

.view-download-btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 1px solid var(--pantone-313);
  color: var(--pantone-313);
}

.view-details-btn:hover {
  transform: translateY(-2px);
  background-color: var(--pantone-106);
  color: white;
  text-decoration: none;
}

.view-download-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.view-details-btn i, .view-download-btn i {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.view-details-btn:hover i, .view-download-btn:hover i {
  transform: translateX(3px);
}

/* ===== PAGINATION STYLES ===== */
.pagination-wrapper {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.pager {
  display: inline-block;
  padding: 0.5rem;
}

.pager__items {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}

.pager__item {
  margin: 0;
}

.pager__item a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  color: #6c757d;
  background: transparent;
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
}

.pager__item a:hover {
  background: var(--pantone-313);
  color: white;
  border-color: var(--pantone-313);
}

/* Active page styling */
.pager__item.is-active a {
  background: var(--pantone-313);
  color: white;
  font-weight: 600;
  border-color: var(--pantone-313);
}

/* Navigation buttons (First, Previous, Next, Last) */
.pager__item--first a,
.pager__item--previous a,
.pager__item--next a,
.pager__item--last a {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
}

.pager__item--first a:hover,
.pager__item--previous a:hover,
.pager__item--next a:hover,
.pager__item--last a:hover {
  background: var(--pantone-313);
  color: white;
}

/* Ellipsis styling */
.pager__item--ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  color: #6c757d;
  font-weight: 500;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .pager__item a {
    min-width: 35px;
    height: 35px;
    font-size: 0.85rem;
  }

  /* Hide some navigation buttons on mobile for space */
  .pager__item--first,
  .pager__item--last {
    display: none;
  }
}

@media (max-width: 576px) {
  .pager__item a {
    min-width: 32px;
    height: 32px;
    font-size: 0.8rem;
    padding: 0 0.5rem;
  }
}

/* Focus styles for accessibility */
.pager__item a:focus {
  outline: 2px solid var(--pantone-313);
  outline-offset: 2px;
}

/* Visually hidden elements */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

