/**
 * Product Card Component Styles
 * 
 * Mobile-first responsive styles for product cards.
 * Clean design with proper spacing and subtle borders.
 * Fixed dimensions to prevent grid breaking.
 * 
 * @package Candini_Fitwear
 * @since 1.0.0
 */

/* ============================================
   PRODUCT CARD - BASE (MOBILE)
   ============================================ */

/* Grid produtos - Mobile */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
}

.product-card {
    position: relative;
    background: var(--color-white);
    border: 1.5px solid #D1D5DB;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
}

/* ============================================
   DISCOUNT BADGE
   ============================================ */

.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-xs);
    font-weight: var(--font-semibold);
    font-family: var(--font-family);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    z-index: 2;
    line-height: 1;
}

/* ============================================
   IMAGE SECTION
   ============================================ */

.product-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card__image-wrapper {
    position: relative;
    width: 100%;
}

.product-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--color-gray-light);
}

.product-card__image-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* Wishlist Button - Clean & Minimal */
.product-card__wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: all var(--transition-fast);
}

.product-card__wishlist svg {
    width: 15px;
    height: 15px;
    color: var(--color-primary);
    flex-shrink: 0;
    stroke-width: 1.8;
    transition: all var(--transition-fast);
}

.product-card__wishlist:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.product-card__wishlist.is-active svg {
    fill: #FF0000;
    stroke: #FF0000;
    color: #FF0000;
}

/* ============================================
   INFO SECTION
   ============================================ */

.product-card__info {
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    max-width: 100%;
    overflow: hidden;
}

/* ============================================
   TITLE
   ============================================ */

.product-card__title {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
    line-height: var(--line-height-tight);
    color: var(--color-black);
    font-family: var(--font-family);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card__title a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
    display: block;
}

.product-card__title a:hover {
    color: var(--color-primary);
}

/* ============================================
   PRICES SECTION
   ============================================ */

.product-card__prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

/* Regular price (crossed out when on sale) */
.product-card__price--regular {
    font-size: var(--font-size-xs);
    font-weight: var(--font-regular);
    color: var(--color-gray-dark);
    text-decoration: line-through;
    font-family: var(--font-family);
}

/* Price group (price + text) */
.product-card__price-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

/* Sale price (highlighted) */
.product-card__price--sale {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    font-family: var(--font-family);
    line-height: 1;
}

/* Main price (when no sale) */
.product-card__price--main {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--color-black);
    font-family: var(--font-family);
    line-height: 1;
}

/* Pix text (same color as other text) */
.product-card__price-text {
    font-size: var(--font-size-xs);
    font-weight: var(--font-regular);
    color: var(--color-gray-dark);
    font-family: var(--font-family);
}

/* ============================================
   INSTALLMENT
   ============================================ */

.product-card__installment {
    margin: 0;
    font-size: var(--font-size-xs);
    font-weight: var(--font-regular);
    color: var(--color-gray-dark);
    font-family: var(--font-family);
    line-height: 1.4;
}

/* ============================================
   COLORS SECTION - BASE (MOBILE)
   ============================================ */

.product-card__colors {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: var(--spacing-xs);
    min-height: 20px;
    flex-wrap: wrap;
    max-width: 100%;
}

.product-card__color-dot {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-white);
    outline: 1px solid #E0E0E0;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__color-dot::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: currentColor;
    transition: all 0.2s ease;
    position: absolute;
}

.product-card__color-dot:hover::before {
    width: 14px;
    height: 14px;
}

.product-card__color-dot.active {
    outline-color: var(--color-primary);
}

.product-card__color-count {
    font-size: 10px;
    color: var(--color-gray-dark);
    font-family: var(--font-family);
    font-weight: var(--font-regular);
    white-space: nowrap;
    margin-left: 2px;
    line-height: 1;
}

/* ============================================
   RESPONSIVE - TABLET (768px - 1023px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        align-items: stretch;
    }
    
    .product-card__title {
        font-size: var(--font-size-base);
    }
    
    .product-card__price--sale,
    .product-card__price--main {
        font-size: var(--font-size-xl);
    }
    
    .product-card__info {
        gap: 8px;
    }
    
    /* Wishlist - Tablet */
    .product-card__wishlist {
        width: 34px;
        height: 34px;
    }
    
    .product-card__wishlist svg {
        width: 16px;
        height: 16px;
    }
    
    /* Colors - Tablet */
    .product-card__colors {
        gap: 6px;
        min-height: 22px;
    }
    
    .product-card__color-dot {
        width: 20px;
        height: 20px;
        border: 2px solid var(--color-white);
        outline: 1px solid #E0E0E0;
    }
    
    .product-card__color-dot::before {
        width: 14px;
        height: 14px;
    }
    
    .product-card__color-dot:hover::before {
        width: 16px;
        height: 16px;
    }
    
    .product-card__color-count {
        font-size: var(--font-size-xs);
    }
}

/* ============================================
   RESPONSIVE - LAPTOP (1024px - 1399px)
   ============================================ */

@media (min-width: 1024px) and (max-width: 1399px) {
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
        align-items: stretch;
    }
    
    .product-card__title {
        font-size: var(--font-size-base);
    }
    
    .product-card__price--sale,
    .product-card__price--main {
        font-size: var(--font-size-xl);
    }
    
    .product-card__info {
        gap: 8px;
    }
    
    /* Wishlist - Laptop */
    .product-card__wishlist {
        width: 36px;
        height: 36px;
    }
    
    .product-card__wishlist svg {
        width: 17px;
        height: 17px;
    }
    
    /* Colors - Laptop */
    .product-card__colors {
        gap: 6px;
        min-height: 24px;
    }
    
    .product-card__color-dot {
        width: 22px;
        height: 22px;
        border: 2.5px solid var(--color-white);
        outline: 1.5px solid #E0E0E0;
    }
    
    .product-card__color-dot::before {
        width: 15px;
        height: 15px;
    }
    
    .product-card__color-dot:hover::before {
        width: 17px;
        height: 17px;
    }
    
    .product-card__color-count {
        font-size: var(--font-size-xs);
    }
}

/* ============================================
   RESPONSIVE - DESKTOP (1400px+)
   ============================================ */

@media (min-width: 1400px) {
    
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
        align-items: stretch;
    }
    
    .product-card__title {
        font-size: var(--font-size-base);
    }
    
    .product-card__price--sale,
    .product-card__price--main {
        font-size: var(--font-size-xl);
    }
    
    .product-card__info {
        gap: 8px;
    }
    
    /* Wishlist - Desktop */
    .product-card__wishlist {
        width: 36px;
        height: 36px;
    }
    
    .product-card__wishlist svg {
        width: 18px;
        height: 18px;
    }
    
    /* Colors - Desktop */
    .product-card__colors {
        gap: 8px;
        min-height: 26px;
        flex-wrap: nowrap;
    }
    
    .product-card__color-dot {
        width: 24px;
        height: 24px;
        border: 3px solid var(--color-white);
        outline: 2px solid #E0E0E0;
    }
    
    .product-card__color-dot::before {
        width: 16px;
        height: 16px;
    }
    
    .product-card__color-dot:hover::before {
        width: 18px;
        height: 18px;
    }
    
    .product-card__color-count {
        font-size: var(--font-size-xs);
    }
}