/* Base Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background: #f6faf7;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header Styles */
header {
    color: white;
}

/* Topbar */
.topbar {
    background-color: #14532d;
    /* verde escuro */
    font-size: 0.95rem;
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar .brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.topbar .top-link {
    color: #d1fae5;
    text-decoration: none;
    margin-left: 16px;
}

.topbar .top-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Main nav */
.main-nav {
    background-color: #166534;
    /* verde principal */
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    margin-right: 20px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px;
}

.nav-menu>li>a {
    color: #eafff3;
    text-decoration: none;
    font-weight: 600;
    padding: 14px 8px;
    display: inline-block;
}

.nav-menu>li>a:hover {
    color: #ffffff;
}

/* Submenu */
.has-submenu {
    position: relative;
}

.has-submenu .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    color: #111827;
    border: 1px solid #d1fae5;
    border-radius: 6px;
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 20;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: block;
    padding: 10px 14px;
    color: #065f46;
    text-decoration: none;
}

.submenu a:hover {
    background: #ecfdf5;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
}

.nav-link {
    color: #d1fae5;
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Search */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
    min-width: 260px;
}

.search-form button {
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #16a34a;
    color: #fff;
    cursor: pointer;
}

.search-form button:hover {
    background: #15803d;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* Product Card Styles */
.product-title {
    font-size: 0.95rem;
    margin: 10px 0 6px;
    color: #111827;
    font-weight: 600;
    line-height: 1.3;
}

.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

.quick-add-btn, .quick-view-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-actions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
}

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

.product-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    background: #f0fdf4;
}

.price {
    font-weight: 700;
    color: #16a34a;
    /* verde preço */
    font-size: 1rem;
}

.installments {
    color: #047857;
    font-size: 0.85rem;
}

.product-rating {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 0.85rem;
}

.btn {
    display: inline-block;
    background-color: #16a34a;
    color: white;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #15803d;
}

/* Category List */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.category {
    background-color: #e7f7ec;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: #166534;
    font-weight: 700;
}

.category:hover {
    background-color: #c7f0d5;
}

/* Hero */
.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: #0f172a;
}

.hero p {
    color: #475569;
}

/* Footer */
footer {
    border-top: 1px solid #d1fae5;
    margin-top: 40px;
    padding: 16px 0;
    color: #1f2937;
    background: #e8f5ee;
}

footer p {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 24px;
    align-items: start;
    padding-top: 10px;
    padding-bottom: 10px;
}

.footer-grid h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #065f46;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-grid a {
    color: #065f46;
    text-decoration: none;
}

.footer-grid a:hover {
    text-decoration: underline;
}

.footer-about p {
    margin: 0;
}

/* Tables (cart) */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

/* Utilities */
.cart-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    background: #065f46;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
}

.cart-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.cart-feedback-inner {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
}

.cart-feedback-inner i {
    margin-right: 10px;
    font-size: 18px;
}

/* Auth */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form label {
    font-weight: 600;
    color: #065f46;
}

.form input,
.form textarea,
.form select {
    padding: 10px;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    background: #fff;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox input {
    margin-right: 6px;
}

.link {
    color: #0ea5a4;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.form-hint {
    color: #64748b;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Newsletter strip in footer */
.footer-newsletter {
    background: #d9fbe3;
    padding: 18px 0;
    border-top: 1px solid #bef7cf;
    border-bottom: 1px solid #bef7cf;
}

.footer-newsletter .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-newsletter h4 {
    margin: 0;
    color: #065f46;
}

.footer-newsletter form {
    display: flex;
    gap: 10px;
}

.footer-newsletter input {
    padding: 10px;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    min-width: 260px;
}

.footer-newsletter button {
    padding: 10px 14px;
    border-radius: 8px;
    border: 0;
    background: #16a34a;
    color: #fff;
}

.footer-newsletter button:hover {
    background: #15803d;
}

/* Testimonials */
.testimonials {
    margin: 40px 0;
}

.testimonial-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.testimonial-item {
    background-color: #fff;
    border: 1px solid #d1fae5;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.testimonial-text {
    font-style: italic;
    color: #1f2937;
    margin-bottom: 15px;
    position: relative;
}

.testimonial-text::before {
    content: '\201C';
    font-size: 2.5rem;
    color: #16a34a;
    position: absolute;
    left: -15px;
    top: -15px;
    opacity: 0.3;
}

.testimonial-author {
    font-weight: 600;
    color: #065f46;
    text-align: right;
    margin: 0;
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

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

    .footer-newsletter .content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .testimonial-list {
        grid-template-columns: 1fr;
    }
}