/* ===========================
   PRODUCT CARD – ESTILOS BASE
   =========================== */
   .product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(44, 95, 65, 0.05);
    box-shadow: 0 8px 30px rgba(44, 95, 65, 0.1);
    transition:
      transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* barra decorativa superior */
  .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }
  
  /* hover */
  .product-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
  }
  .product-card:hover::before { transform: scaleX(1); }
  
  /* Contenedor de contenido interno para forzar layout vertical y empujar el botón al fondo */
  .product-body{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;        /* ocupa el alto disponible dentro del card */
  }
  
  /* ===========================
     ENCABEZADO / FAVORITOS
     =========================== */
  .product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
  }
  
  .favorite-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
  }
  
  .heart-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #333;
    stroke-width: 2;
    transition: fill 0.3s ease, stroke 0.3s ease;
  }
  .favorite-btn.active .heart-icon { fill: red; stroke: red; }
  
  /* Tooltip favorito */
  .favorite-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 5px;
    border-radius: 6px;
    font-size: 11px;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
  }
  .favorite-btn:hover::after { opacity: 1; }
  
  /* ===========================
     IMAGEN
     =========================== */
  .product-image {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  
    /* Mantener altura consistente entre cards */
    aspect-ratio: 1 / 1;     /* cámbialo a 4/3 si prefieres */
    max-height: 260px;       /* ajusta según tu diseño */
  }
  
  .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  /* ===========================
     TEXTOS
     =========================== */
  .brand {
    color: #6b7280;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
  }
  
  .brand-cats {
    color: #4b5563;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 2px;

    /* siempre ocupar 2 líneas visuales */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: calc(0.85rem * 1.4 * 2);
  }
  
  .product-name {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;

    /* Control de líneas para nombres largos */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;                       /* 2 líneas visibles */
    line-clamp: 2;

    overflow: hidden;

    /* Altura mínima igual a 2 líneas para alinear cards */
    min-height: calc(1rem * 1.4 * 2);
  }
  
  /* (Opcional) soporte no-WebKit: fallback truncando con puntos */
  @supports not (-webkit-line-clamp: 2) {
    .product-name {
      white-space: normal;
      display: block;
    }
  }
  
  /* ===========================
     BADGE DESCUENTO
     =========================== */
  .badge-descuento {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #047857 !important;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    padding: 4px 8px;
    border-radius: 8px;
  }
  
  /* ===========================
     PRECIOS
     =========================== */
  .price-section {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;

    /* asegura altura mínima para que no empuje el botón */
    min-height: 24px; /* ~1 línea; ajusta si tu tipografía es más alta */
  }
  
  .price-section .current-price {
    color: #059669;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
  }
  
  .price-section .original-price {
    color: #9aa0a6;
    text-decoration: line-through;
  }
  
  .currency { font-size: 1rem; margin-right: 2px; }
  
  /* ===========================
     OPCIONES DE ENTREGA (chips)
     =========================== */
  .delivery-options {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }
  
  .delivery-option {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #059669;
    font-size: 0.6rem;
    padding: 4px 8px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 15px;
    font-weight: 500;
  }
  
  .delivery-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
  }
  
  /* ===========================
     BOTÓN – pegado al fondo
     =========================== */
  .details-btn {
    /* Esto es lo que fija el botón al fondo del card */
    margin-top: auto;

    display: block;
    width: 100%;                 /* opcional: ancho completo */
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
  }
  .details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
  }
  .details-btn:hover::before { left: 100%; }
  .details-btn:active { transform: translateY(0); }
  
  /* ===========================
     RESPONSIVE TWEAKS
     =========================== */
  @media (max-width: 576px){
    .product-image { max-height: 130px; aspect-ratio: 4 / 5; }
    .product-name { -webkit-line-clamp: 2; line-clamp: 2; min-height: calc(1rem * 1.4 * 2); }
  }
 
  @media (max-width: 768px){
    .details-btn{
      padding: 10px 14px !important;
      border-radius: 10px !important;
      font-size: .8rem !important;
    }
  }