* {
    box-sizing: border-box;

    margin: 0;

    padding: 0;
}


/* =====================================================
   GLOBAL
===================================================== */

html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        linear-gradient(
            135deg,
            #effaf3,
            #f8faf9
        );

    color: #172033;

    line-height: 1.6;

    padding:
        45px 0;
}


.container {
    width:
        min(900px, 92%);

    margin:
        0 auto;
}


/* =====================================================
   HEADER
===================================================== */

.header {
    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #14532d,
            #16a34a
        );

    color: white;

    padding:
        42px 45px;

    border-radius:
        22px 22px 0 0;

    display: flex;

    justify-content: space-between;

    align-items: center;

    box-shadow:
        0 15px 35px
        rgba(22, 163, 74, 0.18);
}


.header::before {
    content: "";

    position: absolute;

    width: 260px;

    height: 260px;

    border-radius: 50%;

    right: -80px;

    top: -130px;

    background:
        rgba(255, 255, 255, 0.08);
}


.header > div:first-child {
    position: relative;

    z-index: 1;
}


.eyebrow {
    text-transform: uppercase;

    letter-spacing: 2px;

    font-size: 0.72rem;

    font-weight: bold;

    opacity: 0.85;
}


.header h1 {
    font-size:
        clamp(2rem, 5vw, 3rem);

    margin:
        10px 0 5px;

    letter-spacing: -1px;
}


.subtitle {
    color:
        rgba(255, 255, 255, 0.82);

    max-width: 600px;
}


.cart-icon {
    position: relative;

    z-index: 1;

    width: 85px;

    height: 85px;

    border:
        2px solid
        rgba(255, 255, 255, 0.45);

    border-radius: 50%;

    display: grid;

    place-items: center;

    font-size: 2.2rem;

    font-weight: 900;

    background:
        rgba(255, 255, 255, 0.12);

    transform: rotate(8deg);
}


/* =====================================================
   MAIN CARD
===================================================== */

.card {
    background: white;

    padding:
        35px;

    border-radius:
        0 0 22px 22px;

    box-shadow:
        0 20px 45px
        rgba(15, 23, 42, 0.08);
}


/* =====================================================
   SECTION HEADING
===================================================== */

.section-heading {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 25px;
}


.mini-label {
    font-size: 0.68rem;

    letter-spacing: 2px;

    color: #16a34a;

    font-weight: 900;
}


.section-heading h2 {
    font-size: 1.55rem;

    margin-top: 3px;
}


.item-count {
    padding:
        7px 13px;

    border-radius: 20px;

    background: #f0fdf4;

    color: #15803d;

    font-size: 0.75rem;

    font-weight: bold;
}


/* =====================================================
   BILL ROWS
===================================================== */

.bill-row {
    display: grid;

    grid-template-columns:
        1.5fr 1fr 1fr;

    gap: 18px;

    align-items: center;

    padding:
        17px 10px;

    border-bottom:
        1px solid #e5e7eb;

    transition: 0.2s;
}


.bill-row:not(.head):hover {
    background: #f8fafc;

    border-radius: 10px;
}


.head {
    padding:
        13px 10px;

    border: 0;

    background: #f0fdf4;

    color: #166534;

    border-radius: 10px;

    font-size: 0.78rem;

    font-weight: 900;

    text-transform: uppercase;

    letter-spacing: 1px;
}


/* =====================================================
   PRODUCT
===================================================== */

.product-name {
    display: flex;

    align-items: center;

    gap: 12px;
}


.product-icon {
    width: 42px;

    height: 42px;

    display: grid;

    place-items: center;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #dcfce7,
            #bbf7d0
        );

    color: #166534;

    font-weight: 900;
}


.product-name strong {
    display: block;

    font-size: 0.95rem;
}


.product-name small {
    display: block;

    color: #94a3b8;

    font-size: 0.72rem;

    margin-top: 2px;
}


/* =====================================================
   INPUTS
===================================================== */

.bill-row > input,
.price-input {
    width: 100%;
}


.bill-row input {
    width: 100%;

    padding:
        12px;

    border:
        1.5px solid #d6deea;

    border-radius: 9px;

    outline: none;

    background: #f8fafc;

    font-size: 0.95rem;

    color: #172033;

    transition:
        border 0.25s,
        box-shadow 0.25s,
        background 0.25s;
}


.bill-row input:hover {
    background: white;

    border-color: #86b99b;
}


.bill-row input:focus {
    background: white;

    border-color: #16a34a;

    box-shadow:
        0 0 0 4px
        rgba(22, 163, 74, 0.1);
}


.price-input {
    position: relative;
}


.price-input > span {
    position: absolute;

    left: 12px;

    top: 50%;

    transform:
        translateY(-50%);

    color: #64748b;

    font-weight: bold;

    z-index: 1;
}


.price-input input {
    padding-left: 28px;
}


/* =====================================================
   ACTIONS
===================================================== */

.actions {
    display: flex;

    gap: 12px;

    margin-top: 28px;
}


button {
    padding:
        14px 22px;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #16a34a,
            #15803d
        );

    color: white;

    font-weight: bold;

    cursor: pointer;

    font-size: 0.95rem;

    transition:
        transform 0.25s,
        box-shadow 0.25s;
}


button span {
    margin-left: 8px;

    font-size: 1.1rem;
}


button:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 8px 18px
        rgba(22, 163, 74, 0.22);
}


.reset {
    background: #64748b;
}


.reset:hover {
    background: #475569;

    box-shadow:
        0 8px 18px
        rgba(100, 116, 139, 0.2);
}


/* =====================================================
   SUMMARY
===================================================== */

.summary {
    margin-top: 32px;

    padding:
        25px;

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            #f8fafc,
            #f0fdf4
        );

    border:
        1px solid #dcfce7;
}


.summary-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding-bottom: 15px;

    margin-bottom: 8px;

    border-bottom:
        1px solid #dcfce7;
}


.summary-header > div:first-child span {
    font-size: 0.65rem;

    letter-spacing: 2px;

    color: #16a34a;

    font-weight: 900;
}


.summary-header h3 {
    margin-top: 3px;

    font-size: 1.2rem;
}


.check {
    width: 40px;

    height: 40px;

    border-radius: 50%;

    display: grid;

    place-items: center;

    background: #dcfce7;

    color: #15803d;

    font-weight: 900;
}


.summary p {
    display: flex;

    justify-content: space-between;

    align-items: center;

    border-bottom:
        1px solid #e2e8f0;

    padding:
        13px 0;

    color: #475569;
}


.summary p:last-child {
    border-bottom: 0;
}


.summary strong {
    color: #172033;
}


.discount-value {
    color: #16a34a !important;
}


.summary .final {
    margin-top: 5px;

    padding-top: 18px;

    font-size: 1.2rem;

    color: #166534;

    border-top:
        2px solid #bbf7d0;
}


.summary .final strong {
    color: #15803d;

    font-size: 1.45rem;
}


/* =====================================================
   MESSAGE
===================================================== */

.message-box {
    min-height: 25px;

    margin-top: 18px;

    text-align: center;
}


#message {
    color: #166534;

    font-weight: bold;

    font-size: 0.9rem;
}


.hidden {
    display: none;
}


/* =====================================================
   FOOTER
===================================================== */

footer {
    text-align: center;

    color: #64748b;

    padding:
        24px;

    font-size: 0.8rem;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 700px) {

    body {
        padding:
            25px 0;
    }


    .header {
        padding:
            32px 25px;
    }


    .cart-icon {
        width: 65px;

        height: 65px;

        font-size: 1.8rem;
    }


    .card {
        padding:
            25px;
    }


    .bill-row {
        grid-template-columns:
            1fr 1fr;
    }


    .bill-row .product-name {
        grid-column: 1 / -1;
    }


    .head {
        display: none;
    }

}


@media (max-width: 480px) {

    .header {
        display: block;
    }


    .cart-icon {
        margin-top: 20px;
    }


    .bill-row {
        grid-template-columns: 1fr;
    }


    .actions {
        flex-direction: column;
    }


    button {
        width: 100%;
    }


    .section-heading {
        align-items: flex-start;

        gap: 10px;
    }


    .summary {
        padding:
            20px;
    }

}