.cards {
  display: flex;
  flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  gap: 20px;
    overflow-x: visible;
  padding: 20px;
}

.cards .card {
  background-color: var(--bg);
  width: 280px;
  min-width: 280px;
  border-radius: 20px;
  text-align: center;
    display: flex;
    flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cards .card:hover {
  transform: translateY(-5px);
}

.cards .card .card-media {
    position: relative;
}

.cards .card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 5px;
  border: 1px solid var(--border);
}

.cards .card .promo-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff6a6a 0%, #ff9a6a 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    box-shadow: 0 6px 14px rgba(255, 106, 106, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(2px);
}

.cards .card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    text-align: left;
    padding-left: 10px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    padding-bottom: 8px;
}

.cards .card .buy{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 3px 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    gap: 5px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    margin-top: auto;
}

.cards .card .buy:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cards .card .buy .prices {
    text-align: center;
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    justify-content: center;
    flex: 1 1 auto;
}

.cards .card .buy .prices .after-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary);
}

.cards .card .buy .prices .before-price {
    font-size: .9rem;
    color: #e47979;
    text-decoration: line-through;
}

.cards .card .buy button{
    background-color: transparent;
    margin: 0;
    color: white;
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 35px;
    height: 35px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    padding: 0 0 0 8px;
}

.cards .card .buy button svg {
    margin-right: 0;
}

.cards .empty-products-message {
    width: 100%;
    text-align: center;
    color: var(--secondary);
    font-weight: 600;
    padding: 20px 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cards .card {
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .cards {
        gap: 15px;
        padding-right: 15px;
    }

    .cards .card {
        width: 200px;
        min-width: 200px;
    }

    .cards .card .prices .after-price {
        font-size: 1.2rem;
    }

    .cards .card .prices .before-price {
        font-size: 0.9rem;
    }

    .cards .card a {
        padding: 5px 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cards {
        gap: 10px;
        padding-right: 10px;
    }

    .cards .card {
        width: 100%;
        min-width: 100%;
    }
}
