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

body {
    font-family: 'Libre Baskerville', serif;
    overflow-x: hidden;
}

nav {
    background: #fff;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-icon {
    font-size: 1.5rem;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-icon:hover {
    color: #4CAF50;
}

#menuCarrinho {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0,0,0,0.3);
  transition: right 0.3s ease;
  z-index: 1000;
  padding: 1rem;
}

#menuCarrinho.aberto {
  right: 0;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.item-details {
    flex: 1;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.item-quantity button {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.remove-item {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f8f8;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: bold;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

#cart-toggle:checked ~ .cart-sidebar {
    right: 0;
}

#cart-toggle:checked ~ .overlay {
    opacity: 1;
    visibility: visible;
}

/* Tipografia para carrinho */
h1, h2, h3, h4 {
    font-family: 'Amatic SC', cursive;
    font-weight: 700;
}

h1 {
    font-size: 2.8rem;
    letter-spacing: 0.05em;
}

h2 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}
