*,
body {
    margin: 0
}

body,
html {
    overflow-x: hidden
}

.checkout,
.header,
body {
    display: flex
}

#cart-count,
.btn-back:hover {
    background: var(--accent);
    color: #fff
}

*,
.cart-item,
.quantity {
    box-sizing: border-box
}

.btn-back,
.btn-home {
    transition: .25s;
    text-decoration: none
}

.order-id,
footer {
    font-size: .95rem
}

.mobile-menu.active,
.pix-modal-overlay.active {
    opacity: 1;
    visibility: visible
}

.quantity,
body.menu-open {
    overflow: hidden
}

.btn-back,
.btn-home,
.cart-icon a,
.footer-socials a,
.mobile-menu a {
    text-decoration: none
}

:root {
    --bg: #fff9f4;
    --accent: #a25b39;
    --text: #3a2313;
    --muted: #5a4234;
    --card: #ffffff;
    --border: #eee
}

* {
    padding: 0
}

body {
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background-color: var(--bg);
    background-image: linear-gradient(rgba(255, 249, 244, .95), rgba(255, 249, 244, .95)), url('img/bg-pattern.png');
    background-repeat: no-repeat, repeat;
    background-attachment: fixed, scroll;
    background-size: cover, 500px;
    color: var(--text);
    flex-direction: column;
    min-height: 100vh;
    width: 100%
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: var(--bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
    z-index: 1000
}

.header .logo img {
    height: 120px;
    width: auto;
    transition: .3s
}

.cart-icon a {
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px
}

#cart-count {
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px
}

.checkout {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 120px 20px 40px
}

.checkout-container {
    width: 100%;
    max-width: 1000px;
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    grid-template-rows: auto auto 1fr auto;
    position: relative
}

.back-button {
    width: 100%;
    max-width: 1000px;
    margin: 90px auto 0;
    text-align: left;
    padding: 0 20px
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 600
}

.btn-back i {
    font-size: 1.2rem
}

.btn-back:hover {
    transform: translateX(-3px)
}

.checkout-container h1 {
    grid-column: 1/-1;
    text-align: center;
    margin: 6px 0 8px;
    color: #3a2313
}

.order-id {
    grid-column: 1/-1;
    text-align: center;
    color: #6a4b35;
    margin-bottom: 6px;
    font-weight: 700
}

.cart-items {
    grid-column: 1/2;
    grid-row: 3/4;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 50px
}

.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr 130px 50px 100px;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
    padding: 14px 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
    width: 100%
}

.cart-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.item-info h3 {
    margin: 0;
    font-size: 1rem;
    color: #3a2313
}

.item-info .price {
    font-weight: 700;
    color: var(--accent);
    font-size: .98rem
}

.cart-item .price {
    margin-right: 0
}

.quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff9f4;
    border: 1px solid #e8d7c7;
    border-radius: 8px;
    padding: 6px 8px;
    flex-wrap: nowrap;
    justify-self: center
}

.quantity button {
    background: #f1e0d0;
    border: none;
    padding: 6px 10px;
    font-size: .9rem;
    border-radius: 6px;
    cursor: pointer;
    color: #3a2313;
    flex-shrink: 0;
    transition: transform .15s, background .2s
}

.quantity button:active {
    transform: scale(.95)
}

.quantity .qty {
    width: 26px;
    text-align: center;
    font-weight: 700;
    color: #3a2313;
    flex-shrink: 0
}

.item-actions {
    justify-self: end
}

.item-actions .subtotal {
    font-weight: 800;
    color: #3a2313;
    font-size: 1rem
}

.cart-item .remove {
    background: 0 0;
    border: none;
    cursor: pointer;
    color: var(--accent);
    font-size: 1.15rem;
    padding: 6px;
    justify-self: center
}

.cart-item .remove:hover {
    color: #8d4c30
}

.cart-items .empty {
    padding: 24px 0;
    text-align: center;
    color: var(--muted);
    font-style: italic
}

.cart-suggestions {
    grid-column: 1/2;
    grid-row: 4/5;
    margin-top: 20px
}

.cart-suggestions .suggestions-title {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 600
}

.cart-suggestions .suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px
}

.cart-suggestions .suggestion-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
    transition: transform .2s, box-shadow .2s
}

.cart-suggestions .suggestion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08)
}

.cart-suggestions .suggestion-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px
}

.cart-suggestions .suggestion-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 6px
}

.cart-suggestions .suggestion-card .price {
    font-size: .95rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 12px
}

.cart-suggestions .add-suggestion-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .3s, transform .2s
}

.btn-home,
.mobile-menu a:hover {
    color: var(--accent)
}

.cart-suggestions .add-suggestion-btn:hover {
    background: #8d4c30;
    transform: scale(1.05)
}

.cart-summary {
    background: var(--bg);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    align-items: stretch;
    border: 1px solid #f0e2d4;
    grid-column: 2/3;
    grid-row: 3/span 2;
    align-self: start
}

.cart-summary h2 {
    text-align: center;
    margin: 4px 0 2px
}

.cart-summary .total {
    text-align: center;
    font-weight: 700;
    color: var(--accent);
    font-size: 1.15rem
}

.customer-name label,
.payment-section label {
    display: block;
    margin-bottom: 6px;
    color: #3a2313
}

.customer-name input,
.payment-method {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0c7b3;
    background: #fff
}

.payment-method:disabled {
    background: #f0f0f0;
    color: #888;
    cursor: not-allowed
}

.btn.order-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .12s
}

.btn.order-btn:hover {
    background: #8d4c30;
    transform: translateY(-1px)
}

button:focus,
input:focus,
select:focus {
    outline: rgba(162, 91, 57, .18) solid 3px;
    outline-offset: 2px
}

@media (max-width:992px) {
    .checkout-container {
        max-width: 820px;
        grid-template-columns: 1fr 340px;
        gap: 18px;
        padding: 18px
    }

    .cart-item {
        grid-template-columns: 80px 1fr 110px 40px 90px;
        gap: 12px
    }

    .cart-item img {
        width: 80px;
        height: 80px
    }

    .checkout-mascot {
        display: none
    }
}

@media (max-width:768px) {

    .cart-suggestions .suggestions-grid,
    .checkout-container {
        grid-template-columns: 1fr
    }

    .header {
        height: 60px;
        padding: 0 20px
    }

    .header .logo img {
        height: 65px
    }

    .checkout {
        padding: 100px 15px 40px
    }

    .checkout-container {
        padding: 16px;
        grid-template-rows: auto auto auto auto 1fr
    }

    .cart-items {
        grid-column: 1/-1;
        grid-row: 3/4
    }

    .cart-summary {
        order: 99;
        grid-column: 1/-1;
        grid-row: 5/6
    }

    .cart-suggestions {
        order: 98;
        grid-column: 1/-1;
        grid-row: 4/5
    }

    .checkout-mascot {
        position: relative;
        left: auto;
        bottom: auto;
        display: block;
        margin: 20px auto 0;
        width: 100px;
        opacity: 1;
        grid-column: 1/-1;
        grid-row: auto;
        order: 3
    }

    .cart-item {
        display: grid;
        grid-template-columns: 72px 1fr auto;
        grid-template-areas: "img info     info" "img quantity remove" "img subtotal subtotal";
        align-items: start;
        gap: 8px 10px
    }

    .cart-item img {
        grid-area: img;
        width: 70px;
        height: 70px;
        align-self: center
    }

    .item-info {
        grid-area: info;
        padding-top: 0
    }

    .item-info .price {
        font-size: .9rem;
        color: var(--accent);
        font-weight: 600;
        margin-top: 2px
    }

    .quantity {
        grid-area: quantity;
        justify-self: start;
        align-self: center
    }

    .cart-item .remove {
        grid-area: remove;
        justify-self: end;
        align-self: center;
        margin-left: auto
    }

    .item-actions {
        grid-area: subtotal;
        justify-self: end;
        margin-top: 6px
    }

    .item-actions .subtotal {
        font-size: 1rem;
        color: var(--text);
        font-weight: 700
    }

    .cart-suggestions .suggestion-card img {
        height: 160px
    }
}

@media (max-width:420px) {
    .cart-item {
        grid-template-columns: 56px 1fr auto;
        gap: 4px
    }

    .cart-item img {
        width: 56px;
        height: 56px
    }

    .quantity button {
        padding: 5px 8px;
        min-width: 30px
    }

    .quantity .qty {
        min-width: 20px
    }

    .checkout {
        padding: 100px 10px 40px
    }
}

.back-home-button-container {
    text-align: center;
    margin: 0 auto 40px;
    width: 100%;
    max-width: 1000px;
    padding: 0 20px
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: 0 0;
    border: 2px solid var(--accent);
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 600
}

.btn-home i {
    font-size: 1.1rem
}

.btn-home:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px)
}

.mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 249, 244, .97);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s, transform .4s, visibility .4s;
    transform: translateY(-20px);
    z-index: 1050
}

.mobile-menu.active {
    transform: translateY(0)
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center
}

.mobile-menu li {
    margin: 25px 0
}

.mobile-menu a {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
    transition: color .3s
}

@keyframes slideInItem {
    from {
        transform: translateY(20px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.mobile-menu.active li {
    animation: .5s forwards slideInItem;
    opacity: 0
}

.mobile-menu.active li:first-child {
    animation-delay: .1s
}

.mobile-menu.active li:nth-child(2) {
    animation-delay: .2s
}

.menu-toggle {
    position: relative;
    width: 30px;
    height: 24px;
    border: none;
    outline: 0;
    background: 0 0;
    cursor: pointer;
    z-index: 1100;
    -webkit-tap-highlight-color: transparent;
    display: none
}

.menu-toggle .bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .35s, opacity .25s, top .3s;
    transform-origin: center center
}

.menu-toggle .bar:first-child {
    top: 4px
}

.menu-toggle .bar:nth-child(2) {
    top: 10px
}

.menu-toggle .bar:nth-child(3) {
    top: 16px
}

.menu-toggle.open .bar:first-child {
    top: 10px;
    transform: rotate(45deg)
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0
}

.menu-toggle.open .bar:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg)
}

.checkout-mascot {
    position: absolute;
    bottom: 24px;
    left: 24px;
    width: 180px;
    height: auto;
    opacity: .95;
    pointer-events: none;
    transition: opacity .3s
}

footer p {
    margin: 0
}

@media (max-width:768px) {
    .menu-toggle {
        display: block
    }

    .cart-icon {
        margin-right: 10px
    }

    .header {
        padding: 0 20px
    }

    .back-home-button-container {
        margin-top: 10px;
        margin-bottom: 30px
    }

    .btn-home {
        padding: 9px 18px;
        font-size: .95rem
    }

    footer {
        padding: 20px;
        font-size: .85rem
    }

    .checkout-mascot {
        position: relative;
        left: auto;
        bottom: auto;
        display: block;
        margin: 20px auto 0;
        width: 100px;
        opacity: 1;
        grid-column: 1/-1;
        grid-row: auto;
        order: 3
    }
}

footer {
    background: #3b2514;
    color: #fff;
    text-align: center;
    padding: 25px;
    margin-top: auto;
    position: relative
}

.footer-socials {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 25px
}

.footer-socials a {
    color: #fff;
    font-size: 1.4rem;
    transition: transform .3s, color .3s
}

.footer-socials a:hover {
    color: #f1e0d0;
    transform: scale(1.1)
}

@media (max-width:768px) {
    .footer-socials {
        position: static;
        transform: none;
        justify-content: center;
        margin-bottom: 15px
    }

    footer {
        padding: 20px
    }
}

.pix-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s
}

.pix-modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    transform: scale(.9);
    transition: transform .3s
}

.pix-modal-overlay.active .pix-modal-content {
    transform: scale(1)
}

.pix-modal-content h2 {
    margin-top: 0;
    color: var(--text)
}

.pix-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: 0 0;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1
}

.pix-details img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    border: none;
    margin: 10px 0;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .15))
}

.pix-copy-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px dashed var(--accent);
    border-radius: 8px;
    background: var(--bg);
    overflow: hidden;
    margin-bottom: 10px
}

.pix-copy-wrapper input#pix-key {
    flex: 1;
    border: none;
    background: 0 0;
    padding: 12px 45px 12px 12px;
    font-size: .9rem;
    text-align: center;
    color: var(--muted);
    outline: 0;
    margin: 0;
    transition: .2s
}

.pix-copy-wrapper button#copy-pix-key-inline {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 45px;
    border: none;
    background: 0 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    border-radius: 0 8px 8px 0
}

.pix-copy-wrapper button#copy-pix-key-inline:hover {
    background: #f1e0d0;
    color: var(--text)
}

.pix-copy-wrapper input#pix-key.copied {
    color: #008a00;
    font-weight: 600;
    border-color: #008a00;
    border-style: solid
}

.pix-copy-wrapper button#copy-pix-key-inline .bi-check-lg {
    color: #008a00;
    font-size: 1.3rem
}

.pix-details #copy-pix-key {
    width: 100%;
    margin-top: 14px;
    padding: 16px 20px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #a25b39, #8d4c30);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(162, 91, 57, .35);
    transition: transform .15s, box-shadow .25s, background .25s
}

.pix-details #copy-pix-key:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 40px rgba(162, 91, 57, .45)
}

.pix-details #copy-pix-key:active {
    transform: scale(.96);
    box-shadow: 0 6px 15px rgba(0, 0, 0, .15)
}

.pix-details #copy-pix-key i {
    font-size: 1.45rem
}

.pix-details #copy-pix-key.copied {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 10px 30px rgba(46, 204, 113, .4)
}

.pix-instructions {
    font-size: .9rem;
    color: var(--muted);
    margin-top: 15px;
    margin-bottom: 20px
}

#finalize-order-whatsapp {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none
}
