main {
    padding-top: 0;
}

.shop-page-header {
    padding: 55px 40px 30px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.controls button {
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
}

.sort-popup, .filter-popup {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 10;
}

.sort-popup button, .filter-popup button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    cursor: pointer;
}

.filter-popup div {
    margin-bottom: 20px;
}

.filter-popup label {
    display: block;
    margin: 5px 0;
}

.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.product-item {
    border: 1px solid #ccc;
    padding: 20px;
    width: 200px;
    text-align: center;
}

.cart-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 9999;

    width: min(90%, 520px);
    padding: 14px 20px;

    background: #1f4d36;
    color: #ffffff;

    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);

    font-size: 16px;
    font-weight: 600;
    text-align: center;

    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -25px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.cart-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.product-card {
    width: 240px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
    background: #f7f7f7;
}

/* =========================
   FULL SHOP PAGE
========================= */

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
}

main,
article {
    width: 100%;
}

.products,
.controls,
.sort-popup,
.filter-popup {
    box-sizing: border-box;
}


/* =========================
   PRODUCT PAGE WRAPPER
========================= */

.products {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;

    padding: 30px 40px;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 30px;
}


/* =========================
   PAGE TITLE
========================= */

main > article > header {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;

    padding: 40px 40px 20px;
}

main > article > header h1 {
    font-size: 42px;
    margin: 0;
}


/* =========================
   SORT / FILTER CONTROLS
========================= */

.controls {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;

    padding: 0 40px 25px;

    display: flex;
    gap: 15px;
}

.controls button {
    padding: 12px 22px;
    cursor: pointer;
}


/* =========================
   SORT POPUP
========================= */

.sort-popup {
    width: 260px;

    padding: 15px;

    background: #ffffff;

    border: 1px solid #dddddd;
    border-radius: 8px;

    position: absolute;

    z-index: 100;
}

.sort-popup button {
    width: 100%;

    padding: 10px;

    text-align: left;

    border: none;
    background: transparent;

    cursor: pointer;
}


/* =========================
   FILTER POPUP
========================= */

.filter-popup {
    width: 320px;

    padding: 20px;

    background: #ffffff;

    border: 1px solid #dddddd;
    border-radius: 8px;

    position: absolute;

    z-index: 100;
}

.filter-popup div {
    margin-bottom: 20px;
}

.filter-popup label {
    display: block;
    margin: 8px 0;
}


/* =========================
   PRODUCT CARDS
========================= */

.product-card {
    width: 100%;

    background: #ffffff;

    border: 1px solid #e4e4e4;
    border-radius: 10px;

    padding: 20px;

    box-sizing: border-box;
}

.product-card img {
    width: 100%;
    height: 240px;

    object-fit: contain;
}


/* =========================
   LAPTOP / SMALL DESKTOP
========================= */

@media (max-width: 1200px) {

    .products {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

    .products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        padding-left: 25px;
        padding-right: 25px;
    }

    .controls,
    main > article > header {
        padding-left: 25px;
        padding-right: 25px;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .products {
        grid-template-columns: 1fr;

        padding-left: 18px;
        padding-right: 18px;
    }

    .controls {
        padding-left: 18px;
        padding-right: 18px;
    }

    main > article > header {
        padding-left: 18px;
        padding-right: 18px;
    }

    main > article > header h1 {
        font-size: 32px;
    }

    .filter-popup,
    .sort-popup {
        width: calc(100% - 36px);
        left: 18px;
    }

}