
:root {
    --green: #247a45;
    --dark-green: #15552f;
    --light-green: #edf7ed;
    --lime: #d8efb0;
    --text: #1c3024;
    --muted: #758176;
    --white: #ffffff;
    --border: #e7ece6;
    --shadow: 0 12px 35px rgba(31, 67, 41, 0.08);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: "DM Sans", sans-serif;
    color: var(--text);
    background: #fcfdfb;
    line-height: 1.6;
}

button, input, textarea {
    font: inherit;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.header {
    min-height: 78px;
    padding: 15px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
}

.logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo span {
    color: var(--green);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(430px, 42%);
    background: #f4f7f3;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 15px;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--green);
}

.search-box input {
    width: 100%;
    min-width: 0;
    padding: 13px 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.cart-button, .primary-button, .checkout-button {
    background: var(--green);
    color: white;
    border: none;
    border-radius: 11px;
    padding: 12px 19px;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
}

.cart-button:hover, .primary-button:hover,
.checkout-button:hover {
    background: var(--dark-green);
    transform: translateY(-1px);
}

#cartCount {
    background: white;
    color: var(--green);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    margin-left: 5px;
    padding: 0 5px;
    font-size: 12px;
}

.hero {
    background: var(--light-green);
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    align-items: center;
    gap: 50px;
    padding: 65px 9%;
    min-height: 450px;
}

.eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--green);
    margin-bottom: 12px;
}

.hero h1 {
    font-size: clamp(42px, 5.2vw, 66px);
    line-height: 1.08;
    letter-spacing: -3px;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--green);
}

.hero-content > p {
    max-width: 420px;
    color: #667568;
    margin-bottom: 27px;
    font-size: 16px;
}

.primary-button {
    display: inline-block;
    padding: 14px 24px;
}

.hero-note {
    color: #5f725f;
    font-size: 12px;
    margin-top: 20px;
}

.hero-image {
    position: relative;
}

.hero-image > img {
    display: block;
    width: 100%;
    height: 310px;
    object-fit: cover;
    border-radius: 25px;
    box-shadow: var(--shadow);
}

.floating-card {
    position: absolute;
    bottom: -18px;
    left: -20px;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 13px 18px;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow);
}

.floating-card > span {
    font-size: 29px;
}

.floating-card strong, .floating-card small {
    display: block;
}

.floating-card strong {
    font-size: 13px;
}

.floating-card small {
    color: var(--muted);
    font-size: 11px;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 25px 9%;
    gap: 20px;
    background: white;
    border-bottom: 1px solid var(--border);
}

.benefits > div {
    display: flex;
    gap: 13px;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.benefits strong, .benefits small {
    display: block;
}

.benefits strong {
    font-size: 13px;
}

.benefits small {
    color: var(--muted);
    font-size: 11px;
}

.shop-section {
    padding: 75px 8%;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 28px;
}

.section-heading h2, .newsletter h2 {
    font-size: 34px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.section-heading p, .newsletter p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 8px;
}

.product-total {
    color: var(--muted);
    font-size: 13px;
    padding-bottom: 5px;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category {
    border: 1px solid var(--border);
    background: white;
    border-radius: 50px;
    padding: 10px 17px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.category:hover, .category.active {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: appear 0.35s ease both;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.product-image {
    height: 165px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f6ef;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-tag {
    position: absolute;
    top: 9px;
    left: 9px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #e8f5dc;
    color: var(--dark-green);
    font-size: 10px;
    font-weight: 800;
}

.product-info {
    padding: 14px 3px 3px;
}

.product-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--green);
    letter-spacing: 1px;
}

.product-info h3 {
    font-size: 16px;
    margin: 4px 0;
}

.product-description {
    color: var(--muted);
    font-size: 12px;
    min-height: 20px;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.product-price {
    font-size: 17px;
    font-weight: 800;
}

.product-price small {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
}

.add-button {
    border: none;
    background: var(--light-green);
    color: var(--green);
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 800;
}

.add-button:hover {
    background: var(--green);
    color: white;
}

.empty-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 55px 15px;
    color: var(--muted);
}

.newsletter {
    margin: 0 8% 70px;
    padding: 40px;
    border-radius: 22px;
    background: var(--light-green);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.newsletter h2 {
    font-size: 29px;
}

.newsletter form {
    display: flex;
    gap: 8px;
    width: min(420px, 100%);
}

.newsletter input {
    width: 100%;
    min-width: 0;
    padding: 13px;
    border: 1px solid #dce7d8;
    border-radius: 10px;
    outline-color: var(--green);
}

.newsletter button {
    flex-shrink: 0;
    border: none;
    background: var(--green);
    color: white;
    padding: 0 15px;
    border-radius: 10px;
    font-weight: 700;
}

.footer {
    padding: 30px 8%;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.footer p {
    color: var(--muted);
    font-size: 12px;
}

/* Cart drawer */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(13, 30, 17, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 30;
    height: 100%;
    width: min(440px, 100%);
    background: white;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.cart-heading h2 {
    font-size: 25px;
}

.close-button {
    border: 1px solid var(--border);
    background: white;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 17px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 18px 0;
}

.empty-cart {
    text-align: center;
    color: var(--muted);
    padding: 55px 10px;
}

.empty-cart span {
    display: block;
    font-size: 48px;
    margin-bottom: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 65px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--light-green);
}

.cart-item h3 {
    font-size: 14px;
}

.cart-item p {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 7px;
}

.quantity-control button {
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    width: 27px;
    height: 27px;
    font-weight: 800;
}

.remove-button {
    border: none;
    background: none;
    color: #c74a4a;
    font-size: 12px;
    margin-top: 4px;
}

.cart-summary {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.cart-summary > div {
    display: flex;
    justify-content: space-between;
    margin: 9px 0;
    font-size: 14px;
}

.grand-total {
    border-top: 1px dashed var(--border);
    padding-top: 14px;
    font-size: 19px !important;
}

.delivery-note {
    background: var(--light-green);
    color: var(--dark-green);
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    margin: 15px 0;
}

.checkout-button {
    width: 100%;
    padding: 15px;
}

.demo-note {
    display: block;
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    margin-top: 10px;
}

/* Checkout dialog */

dialog {
    width: min(450px, calc(100% - 30px));
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    border: none;
    border-radius: 20px;
    padding: 30px;
    color: var(--text);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.2);
}

dialog::backdrop {
    background: rgba(13, 30, 17, 0.55);
    backdrop-filter: blur(3px);
}

#checkoutForm {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.dialog-close {
    align-self: flex-end;
}

#checkoutForm h2 {
    font-size: 27px;
}

.dialog-description {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

#checkoutForm label {
    font-size: 12px;
    font-weight: 700;
    margin-top: 5px;
}

#checkoutForm input, #checkoutForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline-color: var(--green);
}

#checkoutForm textarea {
    min-height: 80px;
    resize: vertical;
}

.dialog-total {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    font-weight: 700;
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    background: var(--dark-green);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    transition: 0.25s;
    text-align: center;
    width: max-content;
    max-width: calc(100% - 30px);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@keyframes appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 950px) {
    .header {
        padding: 14px 4%;
        gap: 12px;
    }

    .hero {
        padding: 55px 6%;
        gap: 30px;
    }

    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .shop-section {
        padding: 60px 5%;
    }

    .newsletter {
        margin-left: 5%;
        margin-right: 5%;
    }
}

@media (max-width: 650px) {
    .header {
        flex-wrap: wrap;
        padding: 12px 5%;
        gap: 10px;
    }

    .logo {
        font-size: 22px;
    }

    .search-box {
        order: 3;
        width: 100%;
    }

    .cart-button {
        margin-left: auto;
        padding: 9px 12px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 45px 6% 55px;
        gap: 35px;
    }

    .hero h1 {
        font-size: 49px;
    }

    .hero-image > img {
        height: 245px;
    }

    .floating-card {
        left: 10px;
    }

    .benefits {
        padding: 20px 5%;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .benefits > div {
        justify-content: flex-start;
    }

    .shop-section {
        padding: 50px 5%;
    }

    .section-heading h2 {
        font-size: 29px;
    }

    .product-total {
        font-size: 11px;
        white-space: nowrap;
    }

    .categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .category {
        white-space: nowrap;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card {
        padding: 8px;
    }

    .product-image {
        height: 135px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .product-price {
        font-size: 15px;
    }

    .add-button {
        padding: 8px;
        font-size: 11px;
    }

    .newsletter {
        margin: 0 5% 45px;
        padding: 25px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .newsletter h2 {
        font-size: 25px;
    }

    .newsletter form {
        width: 100%;
    }

    .newsletter button {
        padding: 12px;
    }

    .footer {
        padding: 25px 5%;
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
