/* ===== PRODUCT LIST MOBILE RESPONSIVE STYLES ===== */

/* Container principal responsivo */
.product-list-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 640px) {
    .product-list-container {
        max-width: 640px;
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .product-list-container {
        max-width: 768px;
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .product-list-container {
        max-width: 1024px;
        padding: 2rem;
    }
}

@media (min-width: 1280px) {
    .product-list-container {
        max-width: 1280px;
        padding: 2rem;
    }
}

/* Header responsivo */
.product-list-header {
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .product-list-header {
        margin-bottom: 2rem;
    }
}

.product-list-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .product-list-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
}

.product-list-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .product-list-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Barra de busca responsiva */
.product-search-container {
    margin-bottom: 2rem;
}

.product-search-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .product-search-form {
        flex-direction: row;
        gap: 1rem;
    }
}

.product-search-input {
    flex: 1;
    position: relative;
}

.product-search-input input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.product-search-input input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.product-search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.product-search-button {
    padding: 0.75rem 1.5rem;
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.product-search-button:hover {
    background-color: #5855eb;
}

/* Grid de produtos responsivo */
.product-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Cards de produtos responsivos */
.product-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.product-card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
    .product-card-content {
        padding: 1.25rem;
    }
}

/* Container de imagem responsivo */
.product-image-container {
    position: relative;
    width: 100%;
    height: 12rem;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .product-image-container {
        height: 14rem;
        margin-bottom: 1.25rem;
    }
}

@media (min-width: 768px) {
    .product-image-container {
        height: 16rem;
    }
}

/* Imagens responsivas com otimização */
.product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    max-width: 100% !important;
    max-height: 100% !important;
    transition: transform 0.3s ease;
}

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

/* Fallback para imagens quebradas */
.product-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    color: #9ca3af;
}

.product-image-fallback svg {
    width: 3rem;
    height: 3rem;
}

@media (min-width: 640px) {
    .product-image-fallback svg {
        width: 4rem;
        height: 4rem;
    }
}

/* Informações do produto */
.product-info {
    background: rgba(255,255,255,0.92); /* Fundo branco translúcido para contraste */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827; /* Preto mais forte */
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .product-name {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
}

.product-description {
    font-size: 0.875rem;
    color: #374151; /* Cinza escuro para contraste */
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

@media (min-width: 640px) {
    .product-description {
        font-size: 0.9375rem;
        margin-bottom: 1.25rem;
    }
}

/* Preço responsivo */
.product-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .product-price {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

/* Botões responsivos */
.product-actions {
    margin-top: auto;
}

.product-button {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #6366f1;
    background-color: #6366f1;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-button:hover {
    background-color: #5855eb;
    border-color: #5855eb;
    transform: translateY(-1px);
}

.product-button-secondary {
    background-color: transparent;
    color: #6366f1;
    border-color: #6366f1;
}

.product-button-secondary:hover {
    background-color: #6366f1;
    color: white;
}

/* Estado vazio responsivo */
.product-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    grid-column: 1 / -1;
}

@media (min-width: 640px) {
    .product-empty-state {
        padding: 4rem 2rem;
    }
}

.product-empty-icon {
    width: 3rem;
    height: 3rem;
    color: #9ca3af;
    margin: 0 auto 1rem;
}

@media (min-width: 640px) {
    .product-empty-icon {
        width: 4rem;
        height: 4rem;
        margin-bottom: 1.5rem;
    }
}

.product-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .product-empty-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
}

.product-empty-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .product-empty-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

/* Badges e status responsivos */
.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-badge-price {
    background-color: #f59e0b;
}

.product-badge-status {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-badge-complete {
    background-color: #10b981;
}

.product-badge-available {
    background-color: #6b7280;
}

/* Progresso responsivo */
.product-progress {
    margin-bottom: 1rem;
}

.product-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.product-progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.product-progress-percentage {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.product-progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.product-progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.product-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.product-progress-raised {
    color: #059669;
    font-weight: 500;
}

.product-progress-left {
    color: #6b7280;
}

/* Botões de ação específicos */
.product-action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .product-action-buttons {
        gap: 0.75rem;
        margin-top: 1.25rem;
    }
}

.product-action-button {
    flex: 1;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.product-action-button-contribute {
    background-color: #059669;
    color: white;
}

.product-action-button-contribute:hover {
    background-color: #047857;
}

.product-action-button-remove {
    background-color: #dc2626;
    color: white;
}

.product-action-button-remove:hover {
    background-color: #b91c1c;
}

/* Melhorias para acessibilidade */
.product-card:focus-within {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.product-button:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Animações suaves */
.product-card {
    animation: fadeInUp 0.3s ease-out;
}

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

/* Otimizações para performance */
.product-image {
    will-change: transform;
}

.product-card {
    will-change: transform;
}

/* Suporte para modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    .product-card {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .product-name {
        color: #f9fafb;
    }
    
    .product-description {
        color: #d1d5db;
    }
    
    .product-image-container {
        background-color: #374151;
    }
} 