/* ========================================
   COMPONENTE: PRODUCT CARD
   ======================================== */

.product-card {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card--featured {
    border: 2px solid #e17201;
}

.product-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Imagen */
.product-card-image {
    position: relative;
    aspect-ratio: 1.2 / 1;
    overflow: hidden;
    background: var(--gray-100, #f3f4f6);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Boton favorito */
.product-card-fav {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1rem;
    transition: color 0.2s, background 0.2s;
    z-index: 2;
}
.product-card-fav:hover { color: #ef4444; background: rgba(255,255,255,0.95); }
.product-card-fav.product-card-fav--active { color: #ef4444; }

/* Badges */
.product-card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
}

.product-card-badge--featured {
    background: #e17201;
    color: white;
}

.product-card-badge--pending {
    top: 0.5rem;
    right: 0.5rem;
    left: auto;
    background: rgba(234, 179, 8, 0.9);
    color: #713f12;
}

/* Body */
.product-card-body {
    padding: 0.75rem 0.875rem 0.875rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900, #111827);
    line-height: 1.3;
    margin-bottom: 0.1875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card-rating { display: flex; align-items: center; gap: 0.3125rem; margin-bottom: 0.25rem; }
.product-card-stars { display: flex; gap: 0.0625rem; font-size: 0.625rem; color: #e17201; }
.product-card-rating-text { font-size: 0.625rem; color: var(--gray-500); font-weight: 500; }

.product-card-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-500, #6b7280);
    margin-bottom: 0.375rem;
}

.product-card-location i {
    font-size: 0.8125rem;
    flex-shrink: 0;
    color: #e17201;
}

.product-card-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.product-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: #e17201;
    white-space: nowrap;
}

.product-card-vendor {
    font-size: 0.6875rem;
    color: var(--gray-400, #9ca3af);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.product-card-vendor-avatar {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    background: var(--gray-200); display: flex; align-items: center; justify-content: center;
    font-size: 0.5625rem; color: var(--gray-400); overflow: hidden;
}
.product-card-vendor-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Dark mode */
[data-theme="dark"] .product-card { background: #1f2937 !important; }
[data-theme="dark"] .product-card-image { background: #374151; }
[data-theme="dark"] .product-card-title { color: #f3f4f6; }
[data-theme="dark"] .product-card-location { color: #9ca3af; }
[data-theme="dark"] .product-card-footer { border-top-color: #374151; }
[data-theme="dark"] .product-card-vendor { color: #6b7280; }
[data-theme="dark"] .product-card-vendor-avatar { background: #374151; }
[data-theme="dark"] .product-card-rating-text { color: #9ca3af; }
[data-theme="dark"] .product-card-fav { background: rgba(31,41,55,0.85); color: #6b7280; }
[data-theme="dark"] .product-card-fav:hover { background: rgba(31,41,55,0.95); color: #ef4444; }
[data-theme="dark"] .product-card-fav.product-card-fav--active { color: #ef4444; }
[data-theme="dark"] .product-card-badge--pending { background: rgba(234,179,8,0.25); color: #facc15; }
[data-theme="dark"] .product-card--featured { border-color: #e17201; }

/* Responsive - mobile: horizontal */
@media (max-width: 640px) {
    .product-card-link { flex-direction: row; }
    .product-card-image {
        width: 140px;
        height: auto;
        flex-shrink: 0;
        position: relative;
    }
    .product-card-image img { height: 100%; }
    .product-card-body { padding: 0.625rem 0.75rem; justify-content: center; min-width: 0; }
    .product-card-title { font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .product-card-vendor { overflow: hidden; text-overflow: ellipsis; }
    .product-card-price { font-size: 0.875rem; }
    .product-card-fav {
        position: absolute;
        top: 0.25rem;
        right: 0.25rem;
        width: 26px;
        height: 26px;
        font-size: 0.8125rem;
        z-index: 2;
    }
}
