/* ===== CATÁLOGO DE PRODUTOS ===== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-description {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Search Section */
.search-section {
    margin-top: 2rem;
}

.search-form {
    max-width: 500px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: var(--font-size-base);
    color: var(--text-color);
    background: transparent;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-button {
    padding: 1rem 1.5rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--font-size-lg);
}

.search-button:hover {
    background: #e69500;
}

.search-results-info {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: var(--font-size-sm);
}

.clear-search {
    color: var(--accent-color);
    text-decoration: underline;
    margin-left: 0.5rem;
    transition: var(--transition-fast);
}

.clear-search:hover {
    color: var(--white);
}

/* Catalog Section */
.catalog-section {
    padding: var(--section-padding);
    min-height: 60vh;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.catalog-title {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
    margin: 0;
}

.catalog-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.products-count {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-color);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: var(--font-size-xs);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge-new {
    background: var(--success-color);
    color: var(--white);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-description {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    margin-bottom: 1rem;
    flex: 1;
}

.product-price {
    margin-bottom: 1rem;
}

.price-value {
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--primary-color);
}

.product-actions {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    line-height: 1;
}

.btn-block {
    width: 100%;
    flex: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #e69500;
}

.add-to-cart-btn {
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-content i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.empty-content h3 {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    margin-bottom: 1rem;
}

.empty-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Error State */
.error-message {
    text-align: center;
    padding: 3rem 2rem;
}

.error-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.5rem;
    color: #721c24;
}

.error-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.retry-button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.retry-button:hover {
    background: #c82333;
}

/* Pagination */
.pagination-nav {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item {
    display: flex;
}

.pagination-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: var(--transition-fast);
    font-size: var(--font-size-sm);
    min-width: 2.5rem;
    justify-content: center;
}

.pagination-link:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination-current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination-ellipsis span {
    padding: 0.75rem 0.5rem;
    color: var(--text-muted);
}

.pagination-prev,
.pagination-next {
    font-weight: 500;
}

/* Loading States */
.catalog-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
}

/* Ícones adicionais */
.icon-search::before { content: '🔍'; }
.icon-chevron-left::before { content: '◀️'; }
.icon-chevron-right::before { content: '▶️'; }

/* ===== RESPONSIVIDADE COMPLETA ===== */

/* Mobile Extra Small */
@media (max-width: 360px) {
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: 0.375rem;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 0.375rem 0.375rem 0 0;
    }
    
    .search-button {
        padding: 0.75rem 1rem;
        border-radius: 0 0 0.375rem 0.375rem;
        font-size: 0.9rem;
    }
    
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .catalog-title {
        font-size: 1.25rem;
    }
    
    .products-grid {
        gap: 1rem;
    }
    
    .product-card {
        border-radius: 0.75rem;
    }
    
    .product-image-container {
        height: 160px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .product-description {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .price-value {
        font-size: 1.125rem;
    }
    
    .product-actions {
        padding: 0 0.75rem 0.75rem;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .pagination {
        gap: 0.125rem;
        flex-wrap: wrap;
    }
    
    .pagination-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        min-width: 2rem;
    }
}

/* Mobile Small */
@media (min-width: 361px) and (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-button {
        border-radius: 0 0 0.5rem 0.5rem;
    }
    
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-actions {
        padding: 0 1rem 1rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Mobile Large */
@media (min-width: 481px) and (max-width: 767px) {
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .search-input-group {
        flex-direction: row;
    }
    
    .catalog-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .products-grid {
        gap: 1.25rem;
    }
    
    .product-image-container {
        height: 200px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Tablet Portrait */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .product-image-container {
        height: 220px;
    }
    
    .product-actions {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .search-results-info {
        display: inline-block;
        margin: 1rem auto 0;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .catalog-section {
        padding: 3rem 0;
    }
}

/* Desktop Small */
@media (min-width: 1024px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .product-image-container {
        height: 240px;
    }
    
    .hero-section {
        padding: 3.5rem 0;
    }
    
    .catalog-section {
        padding: 3.5rem 0;
    }
}

/* Desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .product-image-container {
        height: 260px;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .catalog-section {
        padding: 4rem 0;
    }
}

/* Desktop Large */
@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
    
    .product-image-container {
        height: 280px;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
    
    .catalog-section {
        padding: 5rem 0;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .search-section {
        margin-top: 1rem;
    }
    
    .catalog-section {
        padding: 2rem 0;
    }
    
    .product-image-container {
        height: 140px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    .pagination-link:hover {
        background: var(--bg-color);
        color: var(--text-color);
        border-color: var(--border-color);
    }
    
    .pagination-link:active {
        background: var(--primary-color);
        color: var(--white);
        border-color: var(--primary-color);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .product-card {
        animation: none;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .product-image {
        transition: none;
    }
    
    .product-card:hover .product-image {
        transform: none;
    }
}

/* Hover Effects para Desktop */
@media (hover: hover) {
    .product-card:hover .product-name {
        color: var(--primary-color);
    }
    
    .search-input:focus + .search-button {
        background: var(--primary-color);
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.1s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* Print Styles */
@media print {
    .hero-section,
    .search-section,
    .pagination-nav,
    .product-actions {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}