/**
 * Modern Product Cards - DUX Human Health
 * Design elegante e moderno para os cards de produtos
 */

/* ========================================
   PRODUCT CARD - DESIGN MODERNO
   ======================================== */

.product-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

/* Imagem do Produto - Estilo DUX com fundo branco */
.product-card .product-image {
    overflow: hidden;
    position: relative;
    background: #FFFFFF;
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px 12px 0 0; /* Bordas arredondadas apenas no topo */
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mantém proporção sem cortar */
    background: transparent;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Badge de desconto - Estilo DUX Original */
.product-card .discount-badge,
.product-card .badge-discount,
.product-card .product-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #000000;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
}

/* Badge especiais (NOVO, COMBO, etc) - Estilo DUX Original */
.product-card .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    background: #000000;
    color: white;
}

.product-card .badge.badge-new {
    background: #000000;
    color: white;
}

.product-card .badge.badge-combo {
    background: #000000;
    color: white;
}

.product-card .badge.badge-promo {
    background: #000000;
    color: white;
}

/* Informações do produto */
.product-card .product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 0 0 12px 12px; /* Bordas arredondadas apenas embaixo */
}

/* Nome do produto */
.product-card .product-name,
.product-card .product-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 8px 0;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.product-card:hover .product-name,
.product-card:hover .product-title {
    color: #000;
}

/* Subtítulo/Marca */
.product-card .product-subtitle,
.product-card .product-brand {
    font-size: 13px;
    color: #757575;
    margin: 0 0 12px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Container de preços */
.product-card .product-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Preço original (riscado) */
.product-card .product-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

/* Preço atual */
.product-card .product-price {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
}

/* Parcelamento */
.product-card .product-installments {
    font-size: 13px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Rating */
.product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-size: 14px;
    color: #666;
}

.product-card .rating-stars {
    display: flex;
    gap: 2px;
}

.product-card .rating-stars i {
    color: #FFB800;
    font-size: 14px;
}

/* Botão Adicionar ao Carrinho */
.product-card .btn-add-cart {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.product-card .btn-add-cart:hover {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.product-card .btn-add-cart:active {
    transform: translateY(0);
}

.product-card .btn-add-cart i {
    font-size: 16px;
}

/* Quick View (opcional) */
.product-card .quick-view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 15;
}

.product-card:hover .quick-view {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   SKELETON LOADING
   ======================================== */

.product-card.skeleton-card {
    animation: none;
    cursor: default;
}

.product-card.skeleton-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-image {
    height: 280px;
    width: 100%;
    border-radius: 0;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-price {
    height: 24px;
    border-radius: 4px;
    margin-top: 12px;
}

/* ========================================
   GRID RESPONSIVO
   ======================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    padding: 20px 0;
}

/* Desktop Grande */
@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 32px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .product-card .product-image,
    .product-card img {
        height: 240px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 16px 0;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-card .product-image,
    .product-card img {
        height: 180px;
    }

    .product-card .product-info {
        padding: 16px;
    }

    .product-card .product-name,
    .product-card .product-title {
        font-size: 14px;
        min-height: 38px;
    }

    .product-card .product-price {
        font-size: 18px;
    }

    .product-card .btn-add-cart {
        padding: 12px 16px;
        font-size: 13px;
    }

    .product-card .badge,
    .product-card .discount-badge {
        padding: 6px 12px;
        font-size: 11px;
    }

    .product-card:hover {
        transform: translateY(-4px);
    }
}

/* Mobile Pequeno */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card .product-subtitle,
    .product-card .product-brand {
        display: none;
    }

    .product-card .product-installments {
        font-size: 11px;
    }
}

/* ========================================
   ANIMAÇÕES DE ENTRADA
   ======================================== */

.product-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay progressivo para cards */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.15s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.25s; }
.product-card:nth-child(5) { animation-delay: 0.3s; }
.product-card:nth-child(6) { animation-delay: 0.35s; }

/* ========================================
   MODO ESCURO (OPCIONAL)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .product-card {
        background: #1a1a1a;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .product-card .product-info {
        background: #1a1a1a;
    }

    .product-card .product-name,
    .product-card .product-title {
        color: #f0f0f0;
    }

    .product-card:hover .product-name,
    .product-card:hover .product-title {
        color: #ffffff;
    }

    .product-card .product-subtitle,
    .product-card .product-brand {
        color: #999;
    }

    .product-card .product-price {
        color: #ffffff;
    }

    .product-card .btn-add-cart {
        background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
        color: #000;
    }

    .product-card .btn-add-cart:hover {
        background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    }
}