/* Products Page Styles */

/* Variables based on design */
:root {
    --color-bg-light: #F5EFE7;
    --color-brown: #8B4513;
    --color-brown-light: #6B5744;
    --color-accent: #D4844D;
    --color-accent-hover: #C17844;
    --color-white: #ffffff;
    --color-text-dark: #5C4033;
}

.products-page-container {
    min-height: 100vh;
    background-color: var(--color-bg-light);
    font-family: 'Merriweather', serif;
    /* Assuming serif font from context */
}

/* Hero Section */
.products-hero {
    position: relative;
    height: 40vh;
    overflow: hidden;
}

.products-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.products-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.products-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(139, 69, 19, 0.7), rgba(139, 69, 19, 0.5), #F5EFE7);
    z-index: 2;
}

.products-hero__content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 3rem;
    color: var(--color-white);
}

.products-hero__title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 0.2s forwards;
}

.products-hero__title span {
    color: var(--color-bg-light);
}

.products-hero__subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 0.4s forwards;
}



/* Stats Section */
.stats-section {
    padding: 3rem 0;
    background-color: var(--color-white);
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



.stat-item {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.stat-icon {
    width: 32px;
    height: 32px;
    color: var(--color-accent);
    margin: 0 auto 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-brown);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-brown-light);
}

/* Filters Section */
.filters-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.filters-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}



.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-brown-light);
    font-size: 0.875rem;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: var(--color-white);
    color: var(--color-brown-light);
    border: 1px solid rgba(139, 69, 19, 0.2);
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    border-color: var(--color-accent);
}

.results-count {
    font-size: 0.875rem;
    color: var(--color-brown-light);
    margin-bottom: 1.5rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}



.product-card {
    background-color: var(--color-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.5s forwards;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.product-card--disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.product-card--disabled:hover {
    transform: translateY(0);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
    position: relative;
    height: 18rem;
    overflow: hidden;
}

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

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

.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.badge-category {
    padding: 0.25rem 0.75rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    font-size: 0.75rem;
    border-radius: 9999px;
}

.badge-rating {
    background-color: var(--color-white);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--color-text-dark);
}

.badge-featured {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    background-color: var(--color-brown);
    color: var(--color-white);
    font-size: 0.75rem;
    border-radius: 9999px;
}

.badge-outofstock {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-outofstock span {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-brown);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.product-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover .product-title {
    color: var(--color-accent);
}

.product-description {
    font-size: 0.875rem;
    color: var(--color-brown-light);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-meta {
    font-size: 0.75rem;
    color: var(--color-brown-light);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
}

.meta-value {
    font-weight: 500;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
    margin-top: auto;
}

.product-price-col {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.75rem;
    color: var(--color-brown-light);
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-brown);
}

.btn-shop {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent);
    color: var(--color-white);
    border: none;
    transition: all 0.2s;
    pointer-events: none;
    /* O clique é tratado pelo card pai */
}

.product-card:hover .btn-shop {
    background-color: var(--color-accent-hover);
    transform: scale(1.1);
}

.product-card--disabled .btn-shop {
    background-color: #d1d5db;
    color: #9ca3af;
    transform: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 0;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    color: rgba(139, 69, 19, 0.3);
    margin: 0 auto 1rem;
}

.empty-title {
    font-size: 1.5rem;
    color: var(--color-brown);
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--color-brown-light);
    margin-bottom: 1.5rem;
}

.btn-clear {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-clear:hover {
    background-color: var(--color-accent-hover);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 1920px) {
    /* Large desktop styles if needed */
}

@media (max-width: 1019px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .products-hero__title {
        font-size: 3rem;
    }

    .products-hero__subtitle {
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}