/* --- Product Card Styles --- */

:root {
    --card-border: #e5e7eb;
    --hot-pink: #e0245e;
    --price-red: #b12704;
    --star-orange: #f59e0b;
    --link-blue: #2563eb;
    --text-dark-blue: #0f1e4f;
}

/* Product Card */
.card {
    min-width: 230px;
    max-width: 230px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.card:hover {
    text-decoration: none;
}

/* Hot Badge */
.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 5px 9px;
    border-radius: 999px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge i {
    color: inherit;
    font-size: 10px;
}

.badge.tag-hot {
    background: #e11d48;
}

.badge.tag-deal {
    background: #059669;
}

.badge.tag-new {
    background: #2563eb;
}

.badge.tag-top-pick {
    background: #7c3aed;
}

.badge.tag-editors-choice {
    background: #f59e0b;
    color: #111827;
}

/* Image Area - Full width and proper height */
.img-container {
    height: 180px;
    width: calc(100% + 24px);
    margin: -12px -12px 8px -12px;
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Special Tags - Full width, overlapping bottom of image */
.special-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 0;
}

.tag-editors-choice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.tag-top-pick {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

/* Product Title - 3 lines max with ellipsis */
.card-title {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    line-height: 1.4;
    height: 55px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

/* Underline title only when hovering the title text */
.card-title:hover {
    text-decoration: underline;
    color: var(--link-blue);
}

/* Rating */
.rating {
    color: var(--star-orange);
    font-size: 12px;
    margin-bottom: 4px;
}

/* Price Container */
.price-container {
    margin-bottom: 4px;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: #111;
}

.old-price {
    font-size: 12px;
    text-decoration: line-through;
    color: #888;
    margin-left: 5px;
}

/* More Link */
.more-link {
    font-size: 11px;
    color: #4b5563;
    margin-top: 4px;
}

.more-link span {
    color: var(--text-dark-blue);
    font-weight: 600;
}

/* Underline category only when hovering that category text */
.more-link span:hover {
    text-decoration: underline;
    color: var(--link-blue);
}

/* Grid Layout */
.products-grid .card {
    min-width: unset;
    max-width: unset;
    width: 100%;
}

/* Carousel Card */
.carousel-track .card {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .card {
        min-width: 160px;
        max-width: 160px;
        padding: 10px;
    }

    .img-container {
        height: 140px;
        width: calc(100% + 20px);
        margin: -10px -10px 8px -10px;
    }

    .card-title {
        font-size: 12px;
        height: 50px;
    }

    .current-price {
        font-size: 16px;
    }

    .products-grid .card {
        min-width: unset;
        max-width: unset;
    }
}
