:root {
    --grad-start: #ff7b7b;
    --grad-mid: #ff8f5c;
    --grad-end: #ffce5c;
    --pink-main: #ff3b7b;
    --pink-soft: #ff9ac2;
    --card-radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fff7f2;
    color: #333;
}

/* TOPO */
header {
    background: linear-gradient(120deg, var(--grad-start), var(--grad-mid), var(--grad-end));
    color: #fff;
    padding: 14px 14px 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 3px 16px rgba(0, 0, 0, .25);
}

.top-bar {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.brand-text h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.brand-text span {
    display: block;
    font-size: 11px;
    opacity: 0.95;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-button {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    padding: 6px 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

/* CONTEÚDO */
main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 10px 60px;
}

.layout {
    display: flex;
    gap: 12px;
}

/* CATEGORIAS / PRODUTOS */
.cat-block {
    margin-bottom: 18px;
}

.cat-title {
    margin: 12px 4px 8px;
    font-size: 18px;
    color: #c83a61;
    font-weight: 700;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.product-card {
    border-radius: var(--card-radius);
    padding: 10px;
    background: linear-gradient(135deg, #fff0f2, #ffe2f1, #ffe7cf);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .10);
    display: flex;
    gap: 10px;
}

.product-img-wrapper {
    flex: 0 0 80px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, .65);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 80px;
    object-fit: cover;
}

.product-icon-fallback {
    font-size: 26px;
}

.product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.promo-badge {
    display: inline-block;
    background: #ffb347;
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    margin-bottom: 4px;
}

.product-title {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    color: #3d1922;
}

.product-desc {
    margin: 0 0 6px;
    font-size: 12px;
    color: #5c4148;
    max-height: 34px;
    overflow: hidden;
}

.price-line {
    font-size: 13px;
    margin-bottom: 6px;
}

.old-price {
    text-decoration: line-through;
    color: #9b6978;
    margin-right: 4px;
    font-size: 11px;
}

.price-main {
    font-weight: 700;
    color: #bf184a;
}

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

.qty-group {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f3f3f5;
    padding: 2px 6px;
}

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-btn {
    border: none;
    background: transparent;
    padding: 2px 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    color: #ff7b7b;
}

.qty-btn:active {
    transform: scale(0.95);
}

/* BOTÕES */
.btn {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: transform .07s ease, box-shadow .07s ease, opacity .1s;
}

.btn:active {
    transform: scale(.97);
    box-shadow: none;
}

.btn-add {
    background: var(--pink-main);
    color: #fff;
    box-shadow: 0 3px 10px rgba(202, 0, 93, .45);
}

/* CARRINHO */
.cart-panel {
    flex: 0 0 320px;
    background: #ffffff;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    position: sticky;
    top: 82px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.cart-panel h2 {
    margin: 0 0 8px;
    font-size: 17px;
    text-align: left;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 8px;
    padding-right: 2px;
}

.cart-items-empty {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 4px;
}

.cart-total {
    font-weight: 700;
    margin: 6px 0 10px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 6px;
}

.form-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 2px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid #e5dede;
    font-size: 13px;
    resize: vertical;
}

.btn-whats {
    background: #25d366;
    color: #fff;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px;
    margin-top: 4px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
}

.btn-whats svg {
    width: 16px;
    height: 16px;
}

.cart-note {
    font-size: 11px;
    color: #777;
    margin-top: 4px;
}

/* BOTÃO FLUTUANTE */
.fab-cart {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ff5b7b;
    color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.fab-cart svg {
    width: 22px;
    height: 22px;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    main {
        padding: 8px 10px 70px;
    }

    .layout {
        flex-direction: column;
    }

    .cart-panel {
        position: relative;
        top: 0;
        max-height: none;
        margin-top: 10px;
    }

    .cart-panel h2 {
        text-align: center;
    }

    .fab-cart {
        display: flex;
    }
}