/* ============ Product Card Component Styles ============ */

.c-product-card {
    background-color: var(--white);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    width: 100%;
    cursor: pointer;
}

.c-product-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background-color: #f9f9f9;
    display: block;
}

.c-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.c-product-card__img--secondary {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.c-product-card.has-secondary-image:hover .c-product-card__img--primary {
    opacity: 0;
}

.c-product-card.has-secondary-image:hover .c-product-card__img--secondary {
    opacity: 1;
}

/* Promo Badge */
.c-product-card__badge--vertical {
    position: absolute;
    top: 0;
    left: 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 10px;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Favorite Button */
.c-product-card__favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-5px);
}

.c-product-card:hover .c-product-card__favorite-btn {
    opacity: 1;
    transform: translateY(0);
}

.c-product-card__favorite-btn:hover {
    transform: scale(1.1) !important;
    background-color: var(--white);
}

.c-product-card__favorite-btn--active {
    opacity: 1 !important;
    transform: translateY(0) !important;
    color: #ff4d4d;
}

.c-product-card__favorite-btn i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .c-product-card__favorite-btn {
        opacity: 1;
        transform: translateY(0);
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}


/* Product Info Card */
.c-product-card__info {
    padding: 1rem 4px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.c-product-card__colors {
    display: flex;
    gap: 0.5rem;
    height: 25px;
    align-items: center;
}

.c-product-card__color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #EDEDED;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.c-product-card__color-dot:hover {
    transform: scale(1.1);
}

.c-product-card__color-dot--active {
    box-shadow: 0 0 0 1.5px var(--white), 0 0 0 3px var(--secondary-color);
}

.c-product-card__color-dot--loading {
    cursor: wait;
    pointer-events: none;
    opacity: 0.6;
}

.c-product-card.is-loading-variation .c-product-card__image-wrapper {
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.c-product-card.is-loading-variation .c-product-card__price-row {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.c-product-card__title {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    line-height: 1.4;
    height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.c-product-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-top: 0.2rem;
}

.c-product-card__price--promo {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.c-product-card__price--base {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.c-product-card__installments {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: #666;
}

/* Hover Actions */
.c-product-card__actions {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 0.5rem 0;
    display: flex;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* On Desktop: Show on hover */
@media (min-width: 769px) {
    .c-product-card:hover .c-product-card__actions {
        opacity: 1;
        visibility: visible;
    }
}

.c-product-card__size-select {
    width: auto;
    flex-shrink: 0;
    padding: 0.6rem 0.4rem;
    border: 1px solid #EDEDED;
    border-radius: 4px;
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    outline: none;
    background-color: var(--white);
    cursor: pointer;
}

.c-product-card__add-btn {
    flex: 1;
    min-height: 40px;
}

.c-product-card__add-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .c-product-card__actions {
        display: none;
    }
}
