:root{
    --green:#197a4a;
    --dark:#123225;
    --light:#f4f8f5;
    --muted:#6b7280;
    --border:#e5e7eb;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Inter,Arial,sans-serif;
    color:#17231d;
    background:#fff;
}

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

img{
    max-width:100%;
}

/* TOP BAR */

.top{
    background:var(--dark);
    color:#fff;
    text-align:center;
    padding:9px;
    font-size:13px;
}

/* NAVIGATION */

.nav{
    display:flex;
    align-items:center;
    gap:25px;
    padding:15px 5%;
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    background:#fff;
    z-index:20;
}

/* LOGO */

.logo{
    display:flex;
    align-items:center;
    flex-shrink:0;
    white-space:nowrap;
}

.logo img{
    height:35px;
    width:auto;
    max-width:180px;
    display:block;
    object-fit:contain;
}

/* SEARCH */

.search{
    display:flex;
    flex:1 1 350px;
    width:350px;
    max-width:450px;
    min-width:200px;
}

.search input{
    width:100%;
    padding:12px 14px;
    border:1px solid #d7ddd9;
    border-radius:8px 0 0 8px;
    outline:none;
    font-size:14px;
}

.search button{
    width:50px;
    border:0;
    background:var(--green);
    color:#fff;
    border-radius:0 8px 8px 0;
    cursor:pointer;
}

/* DESKTOP MENU */

.navlinks{
    display:flex;
    gap:20px;
    align-items:center;
    font-weight:600;
    font-size:14px;
    margin-left:auto;
}

.navlinks a:hover{
    color:var(--green);
}

/* CART */

.cart{
    background:var(--green);
    color:#fff;
    padding:10px 16px;
    border-radius:24px;
    white-space:nowrap;
}

/* MOBILE MENU BUTTON */

.menu-toggle{
    display:none;
    border:0;
    background:none;
    font-size:25px;
    cursor:pointer;
}

/* MOBILE MENU */

.mobile-menu{
    display:none;
    background:#fff;
    border-bottom:1px solid var(--border);
    box-shadow:0 5px 15px rgba(0,0,0,.06);
}

.mobile-menu.show{
    display:block;
}

.mobile-menu a{
    display:block;
    padding:15px 6%;
    border-bottom:1px solid #f0f0f0;
    font-weight:600;
}

.mobile-menu a:hover{
    background:var(--light);
    color:var(--green);
}

/* HERO */

.hero{
    background:linear-gradient(120deg,#eef8f1,#fff);
    padding:70px 8%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
}

.hero h1{
    font-size:52px;
    line-height:1.05;
    margin:0 0 18px;
}

.hero p{
    font-size:18px;
    color:var(--muted);
    max-width:560px;
    line-height:1.7;
}

/* BUTTON */

.btn{
    display:inline-block;
    background:var(--green);
    color:#fff;
    border:0;
    padding:13px 20px;
    border-radius:8px;
    font-weight:700;
    cursor:pointer;
}

.btn:hover{
    opacity:.9;
}

.btn.secondary{
    background:#e8f2ec;
    color:var(--green);
}

/* CONTAINER */

.container{
    max-width:1200px;
    margin:auto;
    padding:45px 5%;
}

/* SECTION HEADING */

.sectionhead{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:22px;
}

.sectionhead h2{
    margin:0;
}

/* PRODUCT GRID */

.grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

/* CARD */

.card{
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
    background:#fff;
    transition:.2s;
}

.card:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 25px rgba(0,0,0,.07);
}

/* PRODUCT CARD IMAGE */

.pic{
    height:220px;
    background:#f1f5f2;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#8b968f;
    overflow:hidden;
}

.pic img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* CARD BODY */

.body{
    padding:16px;
}

.price{
    font-size:19px;
    font-weight:800;
    color:var(--green);
    margin:8px 0;
}

.muted{
    color:var(--muted);
    font-size:13px;
}

/* FORMS */

.form{
    max-width:720px;
    margin:auto;
}

.input{
    width:100%;
    padding:13px;
    border:1px solid #d7ddd9;
    border-radius:8px;
    margin:7px 0 16px;
    font-size:15px;
}

.row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

/* NOTICE */

.notice{
    background:#f0f8f3;
    border-left:4px solid var(--green);
    padding:16px;
    border-radius:8px;
    margin:15px 0;
}

/* FOOTER */

.footer{
    background:var(--dark);
    color:#fff;
    padding:45px 5%;
    margin-top:50px;
}

/* TABLE */

.table{
    width:100%;
    border-collapse:collapse;
}

.table th,
.table td{
    padding:12px;
    border-bottom:1px solid var(--border);
    text-align:left;
}

/* RECEIPT */

.receipt{
    border:2px dashed #cbd5ce;
    padding:20px;
    border-radius:10px;
    background:#fafcfb;
}

/* ADMIN */

.admin{
    max-width:1200px;
    margin:auto;
    padding:35px 5%;
}

/* BADGES */

.badge{
    padding:6px 10px;
    border-radius:20px;
    background:#edf2ef;
    font-size:12px;
}

.danger{
    color:#b91c1c;
}

/* SHOP PAGE */

.shop-header{
    margin-bottom:25px;
}

.shop-header h1{
    margin:8px 0;
    font-size:36px;
}

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

.shop-categories a{
    padding:9px 16px;
    border:1px solid var(--border);
    border-radius:25px;
    background:#fff;
    font-size:14px;
    font-weight:600;
}

.shop-categories a:hover,
.shop-categories a.active{
    background:var(--green);
    color:#fff;
    border-color:var(--green);
}

.empty-shop{
    text-align:center;
    padding:70px 20px;
    background:var(--light);
    border-radius:15px;
}

.empty-shop h2{
    margin:15px 0 8px;
}

/* PRODUCT ACTIONS */

.product-actions{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:12px;
}

.product-actions form{
    width:100%;
}

.product-actions .btn{
    width:100%;
    text-align:center;
}

.product-actions button{
    font-family:inherit;
}

/* PRODUCT DETAILS */

.product-detail{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:50px;
    align-items:start;
}

.product-image{
    height:500px;
    background:#f4f8f5;
    border-radius:16px;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}

.no-product-image{
    color:#8b968f;
    font-size:18px;
}

.product-info h1{
    font-size:38px;
    line-height:1.2;
    margin:10px 0;
}

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

.product-description{
    color:#4b5563;
    line-height:1.8;
    margin:20px 0;
    font-size:16px;
}

.stock-available{
    display:inline-flex;
    gap:10px;
    align-items:center;
    background:#edf8f1;
    color:var(--green);
    padding:10px 14px;
    border-radius:8px;
    font-weight:700;
    margin-bottom:20px;
}

.stock-available span{
    color:var(--muted);
    font-size:13px;
    font-weight:400;
}

.add-cart-form{
    margin-top:10px;
}

.quantity-input{
    max-width:130px;
    display:block;
}

.add-cart-button{
    width:100%;
    max-width:400px;
    margin-top:5px;
    font-size:16px;
}

.view-cart-button{
    display:inline-block;
    margin-top:10px;
    padding:12px 20px;
    border:1px solid var(--border);
    border-radius:8px;
    text-align:center;
    width:100%;
    max-width:400px;
    background:#fff;
}

.out-of-stock{
    background:#fff1f1;
    color:#b91c1c;
    padding:14px;
    border-radius:8px;
    font-weight:700;
    margin:20px 0;
}

.product-features{
    margin-top:35px;
    border-top:1px solid var(--border);
}

.product-features h3{
    margin-top:20px;
}

.product-features ul{
    margin:0;
    padding:0 0 0 20px;
}

.product-features li{
    margin-bottom:8px;
}

.product-features div{
    display:flex;
    align-items:center;
    gap:10px;
    padding:15px 0;
    border-bottom:1px solid var(--border);
}

.product-features strong{
    min-width:130px;
}

.product-features span{
    color:var(--muted);
    font-size:13px;
}

/* CART */

.cart-table-wrapper{
    overflow-x:auto;
}

.cart-product{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:230px;
}

.cart-product img,
.cart-no-image{
    width:70px;
    height:70px;
    border-radius:10px;
    object-fit:cover;
    background:#f1f5f2;
}

.cart-no-image{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:25px;
}

.cart-quantity{
    width:85px;
    margin:0;
}

.cart-summary{
    margin-top:25px;
    padding:25px;
    background:var(--light);
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.cart-summary h2{
    margin:5px 0 0;
    color:var(--green);
}

.cart-buttons{
    display:flex;
    gap:10px;
    align-items:center;
}

/* TABLET */

@media(max-width:1100px){

    .nav{
        gap:12px;
    }

    .navlinks{
        gap:10px;
        font-size:12px;
    }

    .search{
        flex:1 1 250px;
        width:auto;
        max-width:350px;
    }

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

/* MOBILE */

@media(max-width:800px){

    .nav{
        padding:14px 4%;
        gap:12px;
        flex-wrap:wrap;
    }

    .logo{
        order:1;
    }

    .logo img{
        height:32px;
        max-width:160px;
    }

    .cart{
        order:2;
        margin-left:auto;
        padding:9px 12px;
        font-size:13px;
    }

    .menu-toggle{
        display:block;
        order:3;
    }

    .navlinks{
        display:none;
    }

    .search{
        order:4;
        display:flex;
        width:100%;
        max-width:none;
        flex:0 0 100%;
    }

    .hero{
        padding:45px 6%;
        display:block;
    }

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

    .hero p{
        font-size:16px;
    }

    .hero > div:last-child{
        margin-top:30px;
    }

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

    .pic{
        height:190px;
    }

    .product-detail{
        grid-template-columns:1fr;
        gap:30px;
    }

    .product-image{
        height:380px;
    }

    .product-info h1{
        font-size:30px;
    }

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

    .cart-summary{
        display:block;
    }

    .cart-buttons{
        margin-top:20px;
        display:flex;
        flex-direction:column;
    }

    .cart-buttons .btn{
        width:100%;
        text-align:center;
    }

    .cart-table-wrapper{
        margin-left:-4%;
        margin-right:-4%;
    }
}

/* SMALL PHONES */

@media(max-width:500px){

    .top{
        font-size:11px;
    }

    .logo img{
        height:30px;
        max-width:145px;
    }

    .cart{
        font-size:12px;
    }

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

    .container{
        padding:35px 4%;
    }

    .grid{
        grid-template-columns:repeat(2,1fr);
        gap:10px;
    }

    .pic{
        height:160px;
    }

    .body{
        padding:12px;
    }

    .body h3{
        font-size:14px;
    }

    .price{
        font-size:16px;
    }

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

    .shop-header h1{
        font-size:28px;
    }

    .shop-categories{
        gap:7px;
    }

    .shop-categories a{
        font-size:12px;
        padding:8px 12px;
    }

    .product-image{
        height:300px;
    }

    .product-info h1{
        font-size:25px;
    }

    .product-features strong{
        min-width:110px;
    }
}