.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    height: 100%;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.product-highlights {
    position: absolute;
    top: 0;
    right: 0.75rem;
    transform: translateY(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.product-highlights .badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    letter-spacing: 0.03em;
    pointer-events: none;
}

.product-icon {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(34, 197, 94, 0.1));
    border-radius: 0.5rem;
    margin: 0 auto 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.product-icon a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Carousel inside the product card */
.product-icon {
    position: relative;
}

.product-icon .carousel,
.product-icon .carousel-inner,
.product-icon .carousel-item {
    height: 100%;
    width: 100%;
}

.product-icon .carousel-image-wrapper {
    padding: 1rem;
    box-sizing: border-box;
    cursor: pointer;
}

/* Standalone chevron buttons (do NOT use Bootstrap's .carousel-control-* classes) */
.product-icon .app-card-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(17, 24, 39, 0.25);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.product-icon .app-card-chevron-prev {
    left: 8px;
}

.product-icon .app-card-chevron-next {
    right: 8px;
}

.product-icon .app-card-chevron:hover,
.product-icon .app-card-chevron:focus {
    background-color: rgba(17, 24, 39, 0.7);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
    outline: none;
}

.product-icon .app-card-chevron i {
    pointer-events: none;
}

/* "Buy now" call-to-action button on the app card */
.buy-now-btn {
    background-color: #f5a524;
    border-color: #f5a524;
    color: #000 !important;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    transition: background-color 0.15s ease,
                border-color 0.15s ease,
                box-shadow 0.15s ease,
                transform 0.15s ease;
}

.buy-now-btn:hover,
.buy-now-btn:focus {
    background-color: #ffb733;
    border-color: #e0931a;
    color: #000 !important;
    box-shadow: 0 3px 8px rgba(245, 165, 36, 0.35);
    transform: translateY(-1px);
    outline: none;
}

.buy-now-btn,
.buy-now-btn .buy-now-label,
.buy-now-btn i {
    color: #000 !important;
}

.buy-now-btn:active {
    background-color: #c97e10 !important;
    border-color: #c97e10 !important;
    color: #000 !important;
    box-shadow: none;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-icon {
        height: 160px;
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .product-icon {
        height: 140px;
        padding: 0.5rem;
    }
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.4rem 0;
    line-height: 1.3;
}

.product-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: #3b82f6;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin: 0.5rem 0;
}

.product-price span {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: normal;
}

/* Hover effect */
.product-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
/*}*/
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.product-badge {
    display: inline-block;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    text-decoration: none;
}

.product-description {
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 0;
}

.product-price > div:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: #6b7280;
}

/* On very narrow cards, collapse Buy now to icon-only so it always fits inside the card */
@media (max-width: 380px) {
    .buy-now-btn .buy-now-label {
        display: none;
    }
    .buy-now-btn i {
        margin-right: 0 !important;
    }
}

/* Ensure all interactive elements are clickable */
.product-card a,
.product-card button,
.product-card [type="submit"],
.product-card [role="button"] {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}