* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #fbf8f1;
    color: #2b2b2b;
    font-size: 15px;
}

a {
    color: #1b7a43;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

img {
    max-width: 100%;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

.topbar {
    background: #14532d;
    color: #fde68a;
    text-align: center;
    padding: 6px 10px;
    font-size: 13px;
}

.header {
    background: #fff;
    border-bottom: 1px solid #eadfc8;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hdr {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 16px;
    flex-wrap: wrap;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: #14532d;
}

    .logo span {
        color: #f28c28;
    }

.search {
    flex: 1;
    min-width: 220px;
    display: flex;
}

    .search input[type=text] {
        flex: 1;
        padding: 10px 14px;
        border: 2px solid #1b7a43;
        border-right: 0;
        border-radius: 8px 0 0 8px;
        font-size: 15px;
    }

    .search input[type=submit] {
        background: #1b7a43;
        color: #fff;
        border: 0;
        padding: 0 20px;
        border-radius: 0 8px 8px 0;
        cursor: pointer;
        font-weight: 600;
    }

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-weight: 600;
}

    .nav a.sell {
        background: #f28c28;
        color: #fff;
        padding: 7px 12px;
        border-radius: 6px;
    }

    .nav .linkbtn {
        background: none;
        border: 0;
        color: #1b7a43;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
        padding: 0;
    }

.cartlink .cnt {
    background: #f28c28;
    color: #fff;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 12px;
    margin-left: 2px;
}

.catnav {
    background: #fff7e6;
    border-bottom: 1px solid #eadfc8;
}

    .catnav .wrap {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 8px 16px;
    }

    .catnav a {
        white-space: nowrap;
        padding: 5px 12px;
        border-radius: 16px;
        color: #5b4a24;
        font-size: 14px;
    }

        .catnav a:hover {
            background: #fde9c3;
            text-decoration: none;
        }

.main {
    padding: 22px 0 40px;
    min-height: 60vh;
}

h1 {
    font-size: 26px;
    margin: 0 0 14px;
    color: #14532d;
}

h2 {
    font-size: 20px;
    margin: 22px 0 10px;
    color: #14532d;
}

.hero {
    background: linear-gradient(120deg, #14532d, #1b7a43 60%, #f28c28);
    color: #fff;
    border-radius: 14px;
    padding: 28px 30px;
    margin-bottom: 22px;
}

    .hero h1 {
        color: #fff;
        font-size: 30px;
        margin-bottom: 6px;
    }

    .hero p {
        margin: 0;
        opacity: .92;
    }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.card {
    background: #fff;
    border: 1px solid #eee3cc;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

    .card:hover {
        box-shadow: 0 4px 14px rgba(0,0,0,.08);
    }

    .card .img {
        width: 100%;
        height: 130px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
    }

        .card .img img,
        .card .img .product-photo {
            width: 100% !important;
            height: 100% !important;
            max-width: none !important;
            max-height: none !important;
            object-fit: contain !important;
            object-position: center;
            padding: 0 !important;
            margin: 0 !important;
            display: block;
            transform: scale(1.8);
            transform-origin: center;
        }
.product-photo {
    display: block !important;
    width: 100% !important;
    height: 118px !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    margin: 0 auto !important;
}

.product-card .product-image,
.product-image-box {
    height: 118px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff5e5;
    border-radius: 9px;
}

.emo {
    font-size: 58px;
}

.brand {
    font-size: 12px;
    color: #8a7a55;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.pname {
    font-weight: 600;
    color: #2b2b2b;
    margin: 2px 0;
    min-height: 40px;
}

.pack {
    color: #777;
    font-size: 13px;
}

.price {
    margin: 6px 0 10px;
}

    .price b {
        font-size: 18px;
    }

    .price s {
        color: #999;
        margin-left: 6px;
        font-size: 13px;
    }

.off {
    color: #1b7a43;
    font-weight: 600;
    font-size: 12px;
    margin-left: 6px;
}

.card .btn {
    margin-top: auto;
}

.btn, input.btn {
    background: #f28c28;
    color: #fff;
    border: 0;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

    .btn:hover {
        background: #d97a1b;
    }

    .btn:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.btn-green {
    background: #1b7a43;
}

    .btn-green:hover {
        background: #14532d;
    }

.btn-light {
    background: #eee;
    color: #333;
}

    .btn-light:hover {
        background: #ddd;
    }

.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

.panel {
    background: #fff;
    border: 1px solid #eee3cc;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

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

.form {
    max-width: 520px;
}

    .form.wide {
        max-width: none;
    }

    .form label {
        display: block;
        font-weight: 600;
        margin: 12px 0 4px;
    }

    .form input[type=text], .form input[type=password], .form input[type=email], .form select, .form textarea, .tbl input[type=text], .filters select, .filters input[type=text] {
        width: 100%;
        padding: 9px 11px;
        border: 1px solid #cfc3a5;
        border-radius: 7px;
        font-size: 15px;
        background: #fff;
    }

.tbl input[type=text] {
    padding: 5px 7px;
    font-size: 14px;
}

.row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.err {
    color: #b3261e;
    font-size: 13px;
    display: block;
    margin-top: 3px;
}

.msg-err {
    background: #fdecea;
    color: #b3261e;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 10px 0;
}

.msg-ok {
    background: #e7f6ec;
    color: #14532d;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 10px 0;
}

.tbl {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #eee3cc;
    border-radius: 10px;
    overflow: hidden;
}

    .tbl th {
        background: #fff1d6;
        text-align: left;
        padding: 9px 10px;
        font-size: 13px;
        color: #5b4a24;
    }

    .tbl td {
        padding: 9px 10px;
        border-top: 1px solid #f1e8d3;
        vertical-align: middle;
    }

        .tbl td.num, .tbl th.num {
            text-align: right;
        }

.thumb {
    width: 54px;
    height: 54px;
    background: #fff7e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .thumb .emo {
        font-size: 30px;
    }

    .thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: #eee;
    color: #444;
}

.b-paid, .b-delivered, .b-approved {
    background: #d6f0de;
    color: #14532d;
}

.b-pending, .b-placed, .b-cod {
    background: #fff0c9;
    color: #7a5200;
}

.b-packed, .b-shipped {
    background: #dbeafe;
    color: #1e40af;
}

.b-failed, .b-cancelled, .b-rejected, .b-suspended, .b-refunddue {
    background: #fde0dd;
    color: #b3261e;
}

.sumrow {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

    .sumrow.total {
        border-top: 1px solid #eee;
        margin-top: 6px;
        padding-top: 10px;
        font-size: 18px;
        font-weight: 700;
    }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat {
    background: #fff;
    border: 1px solid #eee3cc;
    border-radius: 12px;
    padding: 14px;
}

    .stat b {
        display: block;
        font-size: 24px;
        color: #14532d;
    }

    .stat span {
        color: #777;
        font-size: 13px;
    }

.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
}

    .filters select, .filters input[type=text] {
        width: auto;
    }

.chips a {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #cfc3a5;
    border-radius: 14px;
    margin-right: 6px;
    color: #5b4a24;
    background: #fff;
}

    .chips a.on {
        background: #1b7a43;
        color: #fff;
        border-color: #1b7a43;
    }

.sidenav {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

    .sidenav a {
        background: #fff;
        border: 1px solid #eee3cc;
        padding: 8px 14px;
        border-radius: 8px;
        font-weight: 600;
    }

.pd {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 26px;
}

    .pd .big {
        height: 320px;
        background: #fff7e6;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

        .pd .big .emo {
            font-size: 130px;
        }

        .pd .big img {
            max-height: 320px;
        }

.footer {
    background: #14532d;
    color: #d9ead3;
    padding: 24px 0;
    font-size: 13px;
    text-align: center;
}

.small {
    font-size: 13px;
    color: #777;
}

@media (max-width: 760px) {
    .cols, .pd, .row2 {
        grid-template-columns: 1fr;
    }

    .hdr {
        gap: 10px;
    }
}

/* Homepage rotating banner carousel */
.home-carousel {
    position: relative;
    height: 255px;
    overflow: hidden;
    border-radius: 14px;
    margin: 0 0 22px;
    background: #14532d;
    touch-action: pan-y
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform .7s cubic-bezier(.22,.61,.36,1);
    will-change: transform
}

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 28px 68px 38px 30px;
    color: #fff
}

.slide-grocery {
    background: linear-gradient(105deg,rgba(12,74,40,.96),rgba(27,122,67,.82) 54%,rgba(242,140,40,.72)),url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1600&q=85') center/cover
}

.slide-grains {
    background: linear-gradient(105deg,rgba(86,54,13,.94),rgba(178,119,30,.76) 55%,rgba(20,83,45,.73)),url('https://images.unsplash.com/photo-1574323347407-f5e1ad6d020b?auto=format&fit=crop&w=1600&q=85') center/cover
}

.slide-snacks {
    background: linear-gradient(105deg,rgba(112,49,12,.94),rgba(202,103,28,.80) 55%,rgba(20,83,45,.73)),url('https://images.unsplash.com/photo-1599490659213-e2b9527bd087?auto=format&fit=crop&w=1600&q=85') center/cover
}

.carousel-copy {
    position: relative;
    z-index: 1;
    max-width: 650px
}

.carousel-kicker {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    margin-bottom: 10px;
    color: #ffe5a5
}

.carousel-slide h2 {
    color: #fff;
    font-size: 32px;
    line-height: 1.15;
    margin: 0 0 9px
}

.carousel-slide p {
    color: #fff;
    font-size: 15px;
    margin: 0 0 18px;
    max-width: 560px
}

.carousel-cta {
    display: inline-block;
    background: #f28c28;
    color: #fff;
    font-weight: 700;
    padding: 9px 17px;
    border-radius: 7px
}

    .carousel-cta:hover {
        background: #d97a1b;
        text-decoration: none
    }

.carousel-art {
    font-size: clamp(54px,7vw,90px);
    letter-spacing: 5px;
    white-space: nowrap;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,.2));
    transform: rotate(-5deg)
}

.carousel-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    color: #14532d;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.18)
}

    .carousel-arrow:hover {
        background: #fff
    }

.carousel-prev {
    left: 12px
}

.carousel-next {
    right: 12px
}

.carousel-dots {
    position: absolute;
    z-index: 3;
    bottom: 13px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px
}

.carousel-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 20px;
    padding: 0;
    background: rgba(255,255,255,.65);
    cursor: pointer;
    transition: width .25s,background .25s
}

    .carousel-dot.active {
        width: 25px;
        background: #fff
    }

@media(max-width:760px) {
    .home-carousel {
        height: 235px
    }

    .carousel-slide {
        padding: 24px 48px 38px 22px
    }

        .carousel-slide h2 {
            font-size: 24px
        }

        .carousel-slide p {
            font-size: 13px;
            max-width: 95%
        }

    .carousel-art {
        font-size: 42px;
        position: absolute;
        right: 18px;
        bottom: 38px;
        opacity: .55
    }

    .product-photo {
        display: block !important;
        width: 100% !important;
        height: 118px !important;
        object-fit: contain !important;
        object-position: center !important;
    }

    .product-card .product-image,
    .product-image {
        height: 118px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Product details page - large product image */

    .product-detail-image {
        width: 100%;
        height: 380px;
        background: #fff6e5;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border-radius: 14px;
    }

        .product-detail-image img {
            width: 100% !important;
            height: 100% !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
            object-position: center !important;
            transform: scale(1.0);
            padding: 10px;
            box-sizing: border-box;
        }

    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 14px
    }

    .carousel-prev {
        left: 7px
    }

    .carousel-next {
        right: 7px
    }
}
