/* Contenedor principal */
.apd-products-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Encabezado */
.apd-products-header {
  text-align: center;
  margin-bottom: 50px;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  padding: 40px 20px;
  border-radius: 12px;
}

.apd-products-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

.apd-products-header p {
  font-size: 16px;
  color: #666;
  margin: 0;
  max-width: 800px;
  margin: 0 auto;
}

/* Grid de productos */
.apd-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* Tarjeta de producto */
.apd-product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.apd-product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* Badge Prime */
.apd-prime-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  padding: 4px 8px; /* Reduced padding for better fit */
  border-radius: 4px; /* Smaller radius for compact look */
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex; /* Added flex to center SVG properly */
  align-items: center;
  justify-content: center;
}
.apd-prime-badge svg {
  display: block; /* Ensures SVG displays correctly without extra space */
}
/* Badge de descuento */
.apd-discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #c7302b;
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 2;
  box-shadow: 0 3px 8px rgba(199, 48, 43, 0.4);
}

/* Imagen del producto */
.apd-product-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f8f8f8;
  overflow: hidden;
}

.apd-product-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.apd-product-card:hover .apd-product-image img {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Información del producto */
.apd-product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Título del producto */
.apd-product-title {
  font-size: 14px;
  font-weight: 400;
  color: #007185;
  margin: 0 0 12px 0;
  line-height: 1.4;
  height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.apd-product-title:hover {
  color: #c7511f;
}

/* Precios */
.apd-product-pricing {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apd-original-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.apd-current-price {
  font-size: 22px;
  font-weight: 700;
  color: #c7302b;
}

/* Botón de compra */
.apd-buy-button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: #ff9900;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  margin-top: auto;
  border: none;
  cursor: pointer;
}

.apd-buy-button:hover {
  background: #fa8900;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* Sin productos */
.apd-no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #f8f8f8;
  border-radius: 12px;
}

.apd-no-products p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
  .apd-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .apd-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .apd-products-header h2 {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .apd-products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .apd-products-container {
    padding: 20px 15px;
  }

  .apd-products-header {
    padding: 30px 15px;
    margin-bottom: 30px;
  }

  .apd-products-header h2 {
    font-size: 22px;
  }

  .apd-products-header p {
    font-size: 14px;
  }
}
.apd-prime-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
}

.apd-prime-badge-sprite {
    display: inline-block;
    width: 52px;
    height: 15px;
    background-image: url("https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/AmazonUIBaseCSS-sprite_2x_weblab_AUI_100106_T1-4e9f4ae74b1b576e5f55de370aae7aedaedf390d._V2_.png");
    background-position: -192px -911px;
    background-size: 560px 938px;
    background-repeat: no-repeat;
}
