:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e9ecef;
    --price-color: #28a745;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: flex-end;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-image {
    display: block;
    height: 60px;
    width: auto;
}

.search-bar {
    flex-grow: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-size: 1rem;
}

.main-content {
    display: flex;
    margin-top: 2rem;
    gap: 2rem;
    padding-bottom: 2rem;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    text-decoration: none;
    color: var(--secondary-color);
    cursor: pointer;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.category-list a:hover,
.category-list a.active {
    background-color: var(--primary-color);
    color: #fff;
}

.category-list a[data-category="Emagrecedores"] {
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
    padding-left: 12px;
}

.product-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.product-category {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--price-color);
    margin-top: auto;
}

.product-price-original {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-decoration: line-through;
}

.product-price-savings {
    font-size: 0.9rem;
    color: #e53935;
    margin-left: 6px;
}

.badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff7043, #e53935);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.4);
    letter-spacing: 0.04em;
    animation: discountGlow 2.4s ease-in-out infinite;
}

.product-card:hover .badge-discount {
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.5);
    transform: translateY(-1px);
}

.badge-discount-inline {
    position: static;
    top: auto;
    left: auto;
    display: inline-block;
    margin-bottom: 0.5rem;
}

@keyframes discountGlow {
    0% {
        box-shadow: 0 2px 6px rgba(229, 57, 53, 0.35);
        filter: brightness(1);
    }

    50% {
        box-shadow: 0 4px 12px rgba(229, 57, 53, 0.6);
        filter: brightness(1.1);
    }

    100% {
        box-shadow: 0 2px 6px rgba(229, 57, 53, 0.35);
        filter: brightness(1);
    }
}

.btn-whatsapp {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #25D366;
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    margin-top: 10px;
    border-radius: 4px;
    font-weight: bold;
    min-height: 3rem;
    font-size: 0.95rem;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

.btn-back {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.btn-back:hover {
    text-decoration: underline;
}

.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-detail-image-wrapper {
    flex: 0 0 320px;
    max-width: 100%;
}

.product-detail-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    cursor: zoom-in;
}

.product-detail-info {
    flex: 1;
    min-width: 260px;
}

.product-detail-info h2 {
    margin: 0.5rem 0 0.75rem;
}

.product-detail-meta {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.product-detail-info h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.image-modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
}

.image-modal-content img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.image-modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 32px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

footer {
    background: #fff;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    min-width: 3rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        margin-top: 1.5rem;
        gap: 1.25rem;
    }

    .sidebar {
        width: 100%;
        display: none;
    }

    .sidebar.active {
        display: block;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-content {
        flex-wrap: nowrap;
    }

    .search-bar {
        order: 2;
        width: 100%;
        margin-top: 0.5rem;
    }

    header .container {
        display: flex;
        flex-direction: column;
    }

    .header-top {
        display: flex;
        justify-content: space-between;
        width: 100%;
        align-items: center;
    }

    .product-detail {
        flex-direction: column;
        padding: 1.25rem;
    }

    .product-detail-image-wrapper {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .product-detail-image {
        max-width: 100%;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .product-image {
        height: 180px;
    }
}