@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #4CAF50;
    --secondary-color: #388E3C;
    --accent-color: #FF9800;
    --background-light: #F7F9FC;
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --card-bg: #ffffff;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-md: 10px;
    --spacing-md: 1.5rem;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}

h1,
h2,
h3 {
    color: var(--text-dark);
    font-weight: 600;
}

/* HEADER & NAVIGATION */

#logo {
    color: var(--primary-color);
    margin: 0;
    font-weight: 700;
}

.main-header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-content {
    max-width: 1200px;
    margin: var(--spacing-md) auto;
    padding: 0 var(--spacing-md);
}

.search-filter-area {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-bar {
    display: flex;
    flex-grow: 1;
}

.search-bar input[type="search"] {
    padding: 0.8rem;
    border: 1px solid #ced4da;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    flex-grow: 1;
    font-size: 1rem;
}

.search-bar button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.search-bar button[type="submit"]:hover {
    background-color: var(--secondary-color);
}

.filter-controls select {
    padding: 0.8rem;
    border: 1px solid #ced4da;
    border-radius: var(--radius-md);
    font-size: 1rem;
    appearance: none;
    background: var(--card-bg);
    cursor: pointer;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.card-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.btn-buy,
.btn-remove {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-buy {
    background-color: var(--primary-color);
    color: white;
}

.btn-buy:hover {
    background-color: var(--secondary-color);
    transform: scale(1.02);
}

.btn-remove {
    background-color: #dc3545;
    color: white;
    font-weight: normal;
    padding: 8px 15px;
}

.btn-remove:hover {
    background-color: #c82333;
}

/* CARRINHO E CHECKOUT */
.cart-table {
    box-shadow: var(--shadow-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    border: none;
    border-bottom: 1px solid #eee;
}

.cart-table thead th {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.cart-table tbody tr:hover {
    background-color: #f1f1f1;
}

.checkout-section {
    box-shadow: var(--shadow-light);
}

/* Formulário */
.checkout-form input:not([type="submit"]),
.checkout-form textarea,
.checkout-form select {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.main-footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.main-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.main-footer a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
}


/* Responsividade */

@media (max-width: 768px) {
    .search-filter-area {
        flex-direction: column;
        gap: 1rem;
    }

    .search-bar input[type="search"] {
        border-radius: var(--radius-md);
    }

    .search-bar button[type="submit"] {
        display: none;
    }

    .filter-controls {
        width: 100%;
    }

    .filter-controls select {
        width: 100%;
    }

    .cart-table,
    .checkout-section {
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--primary-color);
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
    }

    .main-nav.menu-open {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        z-index: 99;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
    }

    .main-nav li:last-child {
        border-bottom: none;
    }
}

/* =======================================================
   ANIMAÇÕES DE NOTIFICAÇÃO
   ======================================================= */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    animation: slideIn 0.5s ease forwards, slideOut 0.5s ease 2.5s forwards;
    border-left: 4px solid var(--primary-color);
    pointer-events: auto;
}

.notification.success {
    border-left-color: var(--primary-color);
}

.notification.error {
    border-left-color: #dc3545;
}

.notification.warning {
    border-left-color: #ffc107;
}

.notification.info {
    border-left-color: #17a2b8;
}

@keyframes slideIn {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

.checkmark-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Impede que o círculo encolha */
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.checkmark-circle svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.checkmark-circle svg path {
    stroke: white;
    stroke-width: 2;
    fill: none;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2px;
}

.notification-message {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0 5px;
    transition: color 0.2s;
    align-self: flex-start;
}

.notification-close:hover {
    color: #333;
}

.btn-buy:active,
.btn-remove:active,
.search-bar button[type="submit"]:active,
.checkout-form button[type="submit"]:active {
    transform: scale(0.95);
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.product-card:nth-child(3) {
    animation-delay: 0.2s;
}

.product-card:nth-child(4) {
    animation-delay: 0.3s;
}

.product-card:nth-child(5) {
    animation-delay: 0.4s;
}

.product-card:nth-child(6) {
    animation-delay: 0.5s;
}

.cart-table tbody tr {
    animation: slideInRow 0.3s ease forwards;
    opacity: 0;
    transform: translateX(-20px);
}

@keyframes slideInRow {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        color: var(--primary-color);
    }

    100% {
        transform: scale(1);
    }
}

#cart-count {
    display: inline-block;
    transition: all 0.3s ease;
}

#cart-count.pulse {
    animation: pulse 0.5s ease;
}

.btn-buy,
.btn-remove,
.search-bar button[type="submit"],
.checkout-form button[type="submit"] {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
