/* Catalog Page Specific Styles */

.catalog-hero {
    padding: 180px 0 80px;
    text-align: center;
    background: var(--c-surface);
}

.catalog-hero .massive-heading {
    margin-bottom: 1rem;
}

.catalog-hero .hero-subtitle {
    color: var(--c-text-muted);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters Section */
.catalog-filters {
    padding: 3rem 0;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 80px;
    z-index: 50;
}

.filters-wrapper {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.filter-form {
    display: flex;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: var(--f-main);
}

.search-input:focus {
    outline: none;
    border-color: var(--c-highlight);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.search-input::placeholder {
    color: var(--c-text-muted);
}

.search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--c-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    color: var(--c-accent);
    background: rgba(0, 43, 73, 0.05);
}

.category-filter {
    min-width: 200px;
}

.category-select {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
    font-family: var(--f-main);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

.category-select:focus {
    outline: none;
    border-color: var(--c-highlight);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

/* Grid Section */
.catalog-grid-section {
    padding: 4rem 0 6rem;
    background: #fff;
    min-height: 60vh;
}

.machines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

/* Machine Cards */
.machine-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.machine-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    border-color: var(--c-highlight);
}

.machine-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--c-surface);
}

.machine-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.machine-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.machine-card:hover .machine-image img {
    transform: scale(1.05);
}

.badge-destaque,
.badge-novo {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.badge-destaque {
    background: var(--c-highlight);
    color: #fff;
}

.badge-novo {
    background: var(--c-wa);
    color: #fff;
}

.machine-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.machine-category {
    color: var(--c-highlight);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: block;
}

.machine-title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.machine-title a {
    color: var(--c-accent);
    transition: color 0.3s ease;
}

.machine-title a:hover {
    color: var(--c-highlight);
}

.machine-desc {
    color: var(--c-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.machine-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: auto;
}

.btn-details {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--c-accent);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-details:hover {
    background: var(--c-highlight);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.4);
}

.btn-whatsapp {
    width: 50px;
    height: 50px;
    background: var(--c-wa);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg {
    width: 20px;
    height: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--c-text-muted);
}

.empty-state svg {
    margin-bottom: 2rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.75rem;
    color: var(--c-accent);
    margin-bottom: 1rem;
    font-weight: 700;
}

.empty-state p {
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .catalog-hero {
        padding: 120px 0 60px;
    }
    
    .catalog-filters {
        padding: 2rem 0;
        position: relative;
        top: 0;
    }
    
    .filters-wrapper {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .filter-form {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .search-box {
        max-width: none;
    }
    
    .category-filter {
        min-width: auto;
    }
    
    .machines-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .machine-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .machine-content {
        padding: 1.5rem;
    }
    
    .machine-actions {
        gap: 0.75rem;
    }
    
    .btn-details {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-whatsapp {
        width: 45px;
        height: 45px;
    }
    
    .empty-state {
        padding: 4rem 1rem;
    }
}

@media (max-width: 480px) {
    .catalog-hero {
        padding: 100px 0 40px;
    }
    
    .machine-title {
        font-size: 1.25rem;
    }
    
    .search-input,
    .category-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Related Products on Product Detail Page */
.related-products {
    padding: 5rem 0;
    background: var(--c-surface);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.related-products .section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--c-accent);
    margin-bottom: 3rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.related-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: var(--c-highlight);
}

.related-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--c-accent);
}

.related-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    border-radius: 8px;
    background: var(--c-surface);
    padding: 1rem;
}

.related-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-card:hover h3 {
    color: var(--c-highlight);
}

@media (max-width: 768px) {
    .related-products {
        padding: 3rem 0;
    }
    
    .related-products .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .related-card {
        padding: 1rem;
    }
    
    .related-card h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
}