/* =========================
   FULL PAGE LAYOUT
========================= */

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
}

main,
article,
section {
    width: 100%;
}

/* =========================
   FIX CONTENT UNDER HEADER
========================= */

main {
    padding-top: 110px;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}


/* =========================
   HERO FULL WIDTH
========================= */

.hero {
    width: 100%;
    min-height: 100vh;
}

.hero .container {
    width: 100%;
    max-width: 1400px;
}

#sortButton,
#filterButton {
    min-width: 120px;
    padding: 12px 20px;

    background: #1f4d36;
    color: #ffffff;

    border: none;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;

    cursor: pointer;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#sortButton:hover,
#filterButton:hover {
    background: #173d2b;
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.18);
}

#sortButton:active,
#filterButton:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

#sortButton:focus,
#filterButton:focus {
    outline: 2px solid #1f4d36;
    outline-offset: 3px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

/* =========================
   FILTER POPUP - COMPACT
========================= */

.filter-popup {
    display: none;

    width: min(88%, 320px);
    padding: 16px;

    background: #ffffff;

    border: 1px solid #e1e1e1;
    border-radius: 10px;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);

    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    z-index: 1000;
}

.filter-popup > div {
    margin-bottom: 14px;
}

.filter-popup h3 {
    margin: 0 0 8px;

    font-size: 15px;
    font-weight: 700;

    color: #1f4d36;
}

.filter-popup label {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 7px 0;

    font-size: 14px;
    color: #333333;

    cursor: pointer;
}

.filter-popup input[type="checkbox"] {
    width: 16px;
    height: 16px;

    accent-color: #1f4d36;

    cursor: pointer;
}

#priceRange {
    width: 100%;
    margin-top: 8px;

    accent-color: #1f4d36;

    cursor: pointer;
}

#priceRangeValue {
    display: block;

    margin-top: 5px;

    font-size: 13px;
    font-weight: 600;

    color: #555555;
}

#applyFilters {
    width: 100%;

    padding: 10px 14px;

    background: #1f4d36;
    color: #ffffff;

    border: none;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#applyFilters:hover {
    background: #173d2b;

    transform: translateY(-1px);

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
}

#applyFilters:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .filter-popup {
        width: calc(100% - 40px);
        max-width: 300px;
        padding: 14px;
    }
}

/* =========================
   SORT POPUP - COMPACT
========================= */

.sort-popup {
    display: none;

    width: min(88%, 280px);
    padding: 12px;

    background: #ffffff;

    border: 1px solid #e1e1e1;
    border-radius: 10px;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);

    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    z-index: 1000;
}

.sort-popup button {
    width: 100%;

    padding: 10px 12px;
    margin: 4px 0;

    background: #ffffff;
    color: #333333;

    border: 1px solid #e2e2e2;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.sort-popup button:hover {
    background: #1f4d36;
    color: #ffffff;

    border-color: #1f4d36;

    transform: translateX(2px);
}

.sort-popup button:active {
    transform: translateX(0);
}

@media (max-width: 600px) {
    .sort-popup {
        width: calc(100% - 40px);
        max-width: 270px;
        padding: 10px;
    }
}


/* =========================
   SHOPPING CART
========================= */

.shopping-cart {
    width: 100%;
    max-width: 500px;

    position: fixed;
    top: 0;
    right: 0;

    height: 100vh;

    background: #ffffff;

    z-index: 9999;

    display: flex;
    flex-direction: column;
}

.cart-header {
    width: 100%;
}

#cartItems {
    width: 100%;
    flex: 1;
    overflow-y: auto;
}

.cart-footer {
    width: 100%;
}

.add-cart-btn {
    width: 100%;
    margin-top: 10px;
    padding: 13px 18px;

    background: #1f4d36;
    color: #ffffff;

    border: none;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;

    cursor: pointer;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.add-cart-btn:hover {
    background: #173d2b;
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.18);
}

.add-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.add-cart-btn:focus {
    outline: 2px solid #1f4d36;
    outline-offset: 3px;
}

/* =========================
   PRODUCT SIZE OPTIONS
========================= */

.size-options {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.size-option {
    flex: 1;
    padding: 10px 8px;

    background: #ffffff;
    color: #222222;

    border: 1px solid #cfcfcf;
    border-radius: 6px;

    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.size-option:hover {
    border-color: #555555;
}

.size-option.selected {
    background: #222222;
    color: #ffffff;
    border-color: #222222;
}

.add-cart-btn {
    width: 100%;
    margin-top: 8px;
    padding: 11px 15px;
    cursor: pointer;
}


/* =========================
   FULL WIDTH SECTIONS
========================= */

.blog,
.project,
.affiliate-products,
.contact {
    width: 100%;
}

.blog .container,
.project .container,
.contact .container {
    width: 100%;
    max-width: 1400px;
}


/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

    .container {
        padding-left: 25px;
        padding-right: 25px;
    }

    .shopping-cart {
        max-width: 420px;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .shopping-cart {
        width: 100%;
        max-width: none;
    }

}