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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #222;
    min-height: 100vh;
}

.nav {

    position: sticky;
    top: 0;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 50px;

    background: #fff;

    border-bottom: 1px solid #e5e5e5;

    z-index: 100;

}

.logo {

    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;
    color: #222;

    font-size: 28px;
    font-weight: bold;

    transition: .2s;

}

.logo:hover {

    opacity: .8;

}

.logo img {

    width: 46px;
    height: 46px;

}

.cart-btn {

    display: flex;
    align-items: center;
    gap: 10px;

    background: #000;
    color: #fff;

    border: none;

    padding: 12px 20px;

    cursor: pointer;

    transition: .2s;

}

.cart-btn:hover {

    background: #222;

}

.cart-btn:active {

    transform: scale(.96);

}

.badge {

    background: #fff;
    color: #000;

    min-width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: bold;

}

.products {

    max-width: 1500px;

    margin: 40px auto;

    padding: 0 40px 50px;

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));

    gap: 35px;

}

.product {

    display: flex;
    flex-direction: column;

    animation: fadeUp .45s ease;

}

.product img {

    width: 100%;
    aspect-ratio: 1;

    object-fit: cover;

    cursor: pointer;

    transition:
        transform .25s,
        filter .25s;

}

.product:hover img {

    transform: scale(1.03);

    filter: brightness(.96);

}

.product h3 {

    margin-top: 16px;
    margin-bottom: 10px;

    font-size: 21px;
    font-weight: 700;

}

.product-footer {

    display: flex;
    justify-content: space-between;
    align-items: center;

}

.product-footer span {

    font-size: 20px;
    font-weight: bold;

}

.add-btn {

    background: #000;
    color: #fff;

    border: none;

    padding: 11px 20px;

    cursor: pointer;

    transition:
        background .2s,
        transform .15s;

}

.add-btn:hover {

    background: #222;

}

.add-btn:active {

    transform: scale(.96);

}

button {

    font-family: inherit;

}

button:focus {

    outline: none;

}

::selection {

    background: #000;
    color: #fff;

}

::-webkit-scrollbar {

    width: 10px;

}

::-webkit-scrollbar-thumb {

    background: #bdbdbd;

}

::-webkit-scrollbar-thumb:hover {

    background: #999;

}

@keyframes fadeUp {

    from {

        opacity: 0;
        transform: translateY(20px);

    }

    to {

        opacity: 1;
        transform: translateY(0);

    }

}

@media(max-width:1100px) {

    .products {

        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));

        gap: 30px;

    }

}

@media(max-width:850px) {

    .nav {

        padding: 18px 25px;

    }

    .logo {

        font-size: 22px;

    }

    .products {

        padding: 25px;

        gap: 25px;

    }

}

@media(max-width:600px) {

    .nav {

        flex-direction: column;

        gap: 18px;

        padding: 18px;

    }

    .products {

        grid-template-columns: 1fr;

        padding: 18px;

    }

    .product-footer {

        flex-direction: column;
        align-items: stretch;
        gap: 12px;

    }

    .add-btn {

        width: 100%;

    }

}

.overlay {

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .75);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;

    transition: .25s;

    z-index: 1000;

}

.overlay.show {

    opacity: 1;
    visibility: visible;

}

.product-modal {

    width: min(950px, 92vw);

    background: #fff;

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

    overflow: hidden;

    transform: scale(.9);

    transition: .25s;

    box-shadow: 0 25px 60px rgba(0, 0, 0, .25);

}

.overlay.show .product-modal {

    transform: scale(1);

}

.product-modal img {

    width: 100%;
    height: 100%;
    object-fit: cover;

}

.modal-info {

    padding: 40px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 20px;

}

.modal-info h2 {

    font-size: 34px;

}

.modal-info p {

    color: #666;
    line-height: 1.6;

}

.modal-info h3 {

    font-size: 30px;

}

.close {

    position: absolute;

    top: 20px;
    right: 25px;

    background: #000;
    color: #fff;

    width: 42px;
    height: 42px;

    border: none;

    cursor: pointer;

    transition: .2s;

}

.close:hover {

    background: #333;

}

.cart-drawer {

    position: fixed;

    top: 0;
    right: -430px;

    width: 430px;
    max-width: 100%;

    height: 100vh;

    background: #fff;

    display: flex;
    flex-direction: column;

    transition: right .35s ease;

    box-shadow: -10px 0 35px rgba(0, 0, 0, .18);

    z-index: 1200;

}

.cart-drawer.open {

    right: 0;

}

.cart-header {

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 24px;

    border-bottom: 1px solid #ddd;

}

.cart-header h2 {

    font-size: 26px;

}

.cart-header button {

    background: none;
    color: #000;

    border: none;

    font-size: 28px;

    cursor: pointer;

}

.cart-items {

    flex: 1;

    overflow-y: auto;

    padding: 20px;

}

.cart-item {

    display: grid;

    grid-template-columns: 75px 1fr;

    gap: 15px;

    padding-bottom: 20px;
    margin-bottom: 20px;

    border-bottom: 1px solid #eee;

}

.cart-item img {

    width: 75px;
    height: 75px;

    object-fit: cover;

}

.cart-item h4 {

    margin-bottom: 6px;

}

.cart-item p {

    margin-bottom: 10px;

}

.quantity {

    display: flex;
    align-items: center;
    gap: 8px;

}

.quantity button {

    width: 28px;
    height: 28px;

    background: #000;
    color: #fff;

    border: none;

    cursor: pointer;

}

.remove-btn {

    margin-top: 10px;

    background: #c00000;

    color: #fff;

    border: none;

    padding: 8px 12px;

    cursor: pointer;

}

.cart-footer {

    border-top: 1px solid #ddd;

    padding: 24px;

}

.summary-row {

    display: flex;
    justify-content: space-between;

    margin: 10px 0;

}

.summary-row.total {

    font-size: 22px;
    font-weight: bold;

}

.checkout-btn {

    width: 100%;

    margin-top: 20px;

    padding: 15px;

    background: #000;
    color: #fff;

    border: none;

    font-size: 17px;

    cursor: pointer;

    transition: .2s;

}

.checkout-btn:hover {

    background: #222;

}

#drawerOverlay {

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .45);

    opacity: 0;
    visibility: hidden;

    transition: .25s;

    z-index: 1100;

}

#drawerOverlay.show {

    opacity: 1;
    visibility: visible;

}

#notifications {

    position: fixed;

    right: 25px;
    bottom: 25px;

    display: flex;
    flex-direction: column;

    gap: 12px;

    z-index: 5000;

}

.toast {

    background: #111;
    color: #fff;

    min-width: 320px;

    padding: 18px 22px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    box-shadow: 0 15px 40px rgba(0, 0, 0, .22);

    animation: toastIn .35s ease;

}

.toast.hide {

    animation: toastOut .35s ease forwards;

}

.toast i {

    color: #4ade80;
    margin-right: 12px;

}

.toast-content {

    display: flex;
    align-items: center;
    gap: 12px;

}

@keyframes toastIn {

    from {

        opacity: 0;
        transform: translateX(100%);

    }

    to {

        opacity: 1;
        transform: translateX(0);

    }

}

@keyframes toastOut {

    to {

        opacity: 0;
        transform: translateX(120%);

    }

}

@media(max-width:850px) {

    .product-modal {

        grid-template-columns: 1fr;

        width: 95vw;

    }

    .modal-info {

        padding: 25px;

    }

}

@media(max-width:600px) {

    .cart-drawer {

        width: 100%;

    }

    .toast {

        min-width: unset;

        width: calc(100vw - 30px);

    }

    #notifications {

        right: 15px;
        left: 15px;
        bottom: 15px;

    }

}