/* ==========================================================================
   CONTENT-PRODUCT.CSS — Card de produto (loop da loja e home)
   ========================================================================== */

/* Grid do loop (loop-start.php) */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    margin-bottom: 2rem;
    list-style: none;
    padding: 0;
}
@media (min-width: 768px)  { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }

/* FIX: Margem de 25px no mobile e 0px no desktop (1024px+) */
.woocommerce .products-grid div.product,
.woocommerce .products-grid li.product,
.products-grid .product-card {
    margin: 25px !important;
}

@media (min-width: 1024px) {
    .woocommerce .products-grid div.product,
    .woocommerce .products-grid li.product,
    .products-grid .product-card {
        margin: 0 !important;
    }
}

/* Card */
.product-card {
    position: relative;
    background-color: var(--portal-surface);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}
.product-card:hover {
    border-color: var(--portal-gold);
    box-shadow: 0 8px 30px rgba(196, 160, 74, 0.2);
}

.product-card__link {
    position: absolute;
    inset: 0;
    z-index: 10;
}

/* Imagem */
.product-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--portal-dark);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.product-card__favorite {
    position: absolute;
    top: 1rem; right: 1rem;
    z-index: 20;
    width: 2.5rem; height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(13, 20, 28, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-gold);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    cursor: pointer;
}
.product-card__favorite:hover {
    background-color: var(--portal-gold);
    color: var(--portal-dark);
}

.product-card__image {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease, filter 0.7s ease;
}
.product-card:hover .product-card__image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.product-card__image-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--portal-surface), transparent, rgba(0, 0, 0, 0.2));
    opacity: 0.9;
    pointer-events: none;
}

/* Conteúdo */
.product-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 20;
    pointer-events: none;
    background-color: var(--portal-surface);
}
@media (min-width: 768px) { .product-card__content { padding: 2rem; } }

.product-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--portal-gold);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    font-family: var(--font-display);
}
@media (min-width: 768px) { .product-card__price { font-size: 1.875rem; } }

.product-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    transition: color 0.3s ease;
    font-family: var(--font-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card:hover .product-card__title { color: var(--portal-gold-light); }

/* Specs */
.product-card__specs {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
}

.product-card__spec-item {
    display: flex;
    align-items: flex-start;
    font-size: 0.875rem;
    color: #D1D5DB;
    font-weight: 500;
}
@media (min-width: 768px) { .product-card__spec-item { font-size: 1rem; } }

.product-card__spec-bullet {
    color: var(--portal-gold);
    margin-right: 0.75rem;
    font-size: 1.125rem;
    line-height: 1;
    flex-shrink: 0;
}

.product-card__spec-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- AÇÕES (BOTÕES EMPILHADOS) --- */
.product-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    pointer-events: auto; /* IMPORTANTE: Reativa o clique sobre o link global do card */
    position: relative;
    z-index: 20;
}

.btn-card-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--portal-gold);
    color: #fff;
    background: transparent;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-btn, 8px);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-card-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--portal-gold-light);
}

.btn-card-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.75rem;
    justify-content: center;
}