/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box
}

html {
    font-size: 16px;
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: #122018;
    background: #f6f8f4;
    line-height: 1.6;
    overflow-x: hidden
}

img {
    max-width: 100%;
    height: auto
}

a {
    color: #477d1d
}

/* ============================================
   HEADER - Fixed: Logo Left, Name Left, Cart Right
   ============================================ */

/* Main header container */
.site-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-direction: row !important;
    padding: 10px 24px !important;
    background: #0f3b2a !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 18px rgba(0,0,0,0.2) !important;
    min-height: 65px !important;
    gap: 15px !important;
    flex-wrap: nowrap !important;
}

/* LEFT SECTION - Logo + Company Name */
.header-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 0 1 auto !important;
}

/* Logo */
.site-header .brand {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    color: #fff !important;
    flex-shrink: 0 !important;
}

.site-header .brand .brand-mark {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #9dd64a !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

.site-header .brand .brand-mark img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Company Name - Left Aligned */
.header-left .company-info {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

.header-left .company-info .company-name {
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.header-left .company-info .tagline {
    color: #9dd64a !important;
    font-size: 10px !important;
    font-weight: 300 !important;
    letter-spacing: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Show short name on mobile, full on desktop */
.header-left .company-info .short {
    display: none !important;
}
.header-left .company-info .full {
    display: inline !important;
}

/* RIGHT SECTION - Cart + Toggle */
.header-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
}

/* Cart Icon */
.header-cart {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    background: rgba(157, 214, 74, 0.12) !important;
    color: #9dd64a !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.header-cart:hover {
    background: rgba(157, 214, 74, 0.25) !important;
}

.header-cart .cart-count {
    background: #9dd64a !important;
    color: #0f3b2a !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 1px 7px !important;
    border-radius: 10px !important;
    min-width: 20px !important;
    text-align: center !important;
}

.header-cart .cart-label {
    display: none !important;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 22px !important;
    cursor: pointer !important;
    padding: 6px 8px !important;
    border-radius: 4px !important;
    transition: background 0.3s ease !important;
    flex-shrink: 0 !important;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.1) !important;
}

.menu-toggle .fa-times {
    display: none !important;
}

.menu-toggle.active .fa-bars {
    display: none !important;
}

.menu-toggle.active .fa-times {
    display: inline-block !important;
}

/* NAVIGATION - Desktop visible */
.site-header nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
}

.site-header nav a {
    color: rgba(255,255,255,0.8) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.site-header nav a:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
}

.site-header nav a.active {
    color: #9dd64a !important;
    background: rgba(157, 214, 74, 0.15) !important;
}

.site-header nav a.cart {
    display: none !important;
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 992px)
   ============================================ */
@media (max-width: 992px) {
    .site-header {
        padding: 8px 16px !important;
        min-height: 55px !important;
        gap: 12px !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .site-header .brand .brand-mark {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    
    .header-left .company-info .company-name {
        font-size: 16px !important;
    }
    
    .header-left .company-info .tagline {
        font-size: 9px !important;
    }
    
    .header-left .company-info .short {
        display: inline !important;
    }
    .header-left .company-info .full {
        display: none !important;
    }
    
    .header-cart {
        padding: 4px 10px !important;
        font-size: 13px !important;
    }
    
    .header-cart .cart-count {
        font-size: 10px !important;
        min-width: 18px !important;
        padding: 1px 6px !important;
    }
    
    .menu-toggle {
        display: block !important;
    }
    
    .site-header nav {
        display: none !important;
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px 0 8px !important;
        border-top: 1px solid rgba(255,255,255,0.08) !important;
        margin-top: 10px !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        background: #0f3b2a !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
        border-radius: 0 0 8px 8px !important;
        z-index: 999 !important;
    }
    
    .site-header nav.open {
        display: flex !important;
    }
    
    .site-header nav a {
        padding: 10px 20px !important;
        width: 100% !important;
        text-align: left !important;
        font-size: 15px !important;
        border-radius: 0 !important;
        border-left: 3px solid transparent !important;
    }
    
    .site-header nav a:hover {
        background: rgba(255,255,255,0.05) !important;
        border-left-color: #9dd64a !important;
    }
    
    .site-header nav a.cart {
        display: block !important;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .header-left .company-info .tagline {
        display: none !important;
    }
    
    .site-header {
        padding: 6px 12px !important;
        min-height: 48px !important;
        gap: 8px !important;
    }
    
    .site-header .brand .brand-mark {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
    }
    
    .header-left {
        gap: 8px !important;
    }
    
    .header-left .company-info .company-name {
        font-size: 14px !important;
    }
    
    .menu-toggle {
        font-size: 18px !important;
        padding: 4px 6px !important;
    }
    
    .header-cart {
        font-size: 12px !important;
        padding: 3px 8px !important;
    }
    
    .header-cart .cart-count {
        font-size: 9px !important;
        min-width: 16px !important;
        padding: 0px 5px !important;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max-width: 400px)
   ============================================ */
@media (max-width: 400px) {
    .site-header .brand .brand-mark {
        width: 26px !important;
        height: 26px !important;
        font-size: 10px !important;
    }
    
    .header-left .company-info .company-name {
        font-size: 12px !important;
    }
    
    .menu-toggle {
        font-size: 16px !important;
        padding: 3px 6px !important;
    }
    
    .header-cart {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    
    .header-cart .cart-count {
        font-size: 8px !important;
        min-width: 14px !important;
        padding: 0px 4px !important;
    }
}

/* ============================================
   ORIGINAL STYLES (Keep all your existing styles)
   ============================================ */

.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: #153b20;
    font-weight: 800;
    white-space: nowrap
}

.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 2px;
    color: #6d826f
}

.brand-mark {
    background: #b8e34c;
    color: #16351b;
    padding: 10px;
    border-radius: 12px
}

.cart {
    color: #477d1d !important
}

.hero {
    min-height: min(620px, 75vh);
    padding: clamp(70px, 11vw, 150px) clamp(22px, 8vw, 120px);
    display: flex;
    align-items: center;
    background: linear-gradient(110deg, #173c28 0%, #29613c 58%, #88b642 100%);
    color: #fff
}

.hero>div {
    max-width: 680px
}

.hero h1 {
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.03;
    margin: 15px 0
}

.hero p {
    font-size: clamp(17px, 2vw, 21px);
    color: #dbe9dc;
    max-width: 600px
}

.section {
    padding: clamp(48px, 8vw, 90px) clamp(18px, 8vw, 120px);
    max-width: 1400px;
    margin: auto
}

.section.narrow {
    max-width: 760px
}

.section.dark {
    max-width: none;
    background: #173c28;
    color: white
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
    color: #6e9b28
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 30px
}

.section h1,
.section h2 {
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.1;
    margin: 8px 0 25px
}

.grid {
    display: grid;
    gap: clamp(16px, 2.5vw, 26px)
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr))
}

.three {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr))
}

.card,
.stat {
    background: #fff;
    border-radius: 18px;
    padding: clamp(18px, 2.5vw, 26px);
    box-shadow: 0 8px 30px #24451b0c
}

.card h3 {
    margin-bottom: 4px
}

.product-image {
    height: clamp(130px, 16vw, 180px);
    border-radius: 12px;
    background: #e3f1bc;
    display: grid;
    place-items: center;
    font-size: clamp(45px, 6vw, 65px);
    margin-bottom: 20px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    margin-top: 16px;
    touch-action: manipulation
}

.btn-primary {
    background: #b8e34c;
    color: #14351b
}

.btn-outline {
    border: 1px solid #aacd79;
    color: #335c1f;
    background: white
}

.form {
    display: grid;
    gap: 15px
}

.form label {
    font-weight: 700;
    display: grid;
    gap: 6px
}

.form input,
.form textarea,
.form select,
.search input,
.inline-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd8c6;
    border-radius: 8px;
    font: inherit;
    min-height: 44px;
    background: #fff
}

.inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    align-items: center;
    margin-bottom: 30px
}

.inline-form .btn {
    margin-top: 0
}

.search {
    display: flex;
    gap: 8px;
    max-width: 430px
}

.search .btn {
    margin: 0;
    flex: 0 0 auto
}

.alert {
    background: #e4f4c6;
    border: 1px solid #b8d983;
    padding: 13px;
    border-radius: 8px;
    margin: 15px 0
}

.error {
    background: #ffe2df;
    border-color: #e4a49c
}

.cart-row,
.total {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #dbe5d8
}

.total {
    font-size: 20px;
    border: 0
}

.footer {
    padding: 35px clamp(18px, 8vw, 120px);
    background: #102a1b;
    color: #dce9d8;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 15px;
    margin-top: 35px
}

.admin-links a {
    background: white;
    padding: 18px;
    border-radius: 12px;
    color: #244b25;
    text-decoration: none;
    font-weight: 700
}

.stat small {
    display: block;
    color: #6a7d6c
}

.stat strong {
    display: block;
    font-size: clamp(26px, 4vw, 38px)
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px
}

table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden
}

th,
td {
    text-align: left;
    padding: 13px;
    border-bottom: 1px solid #e4ebe1;
    vertical-align: top
}

th {
    background: #edf5e8;
    color: #365d39
}

.badge {
    display: inline-block;
    background: #e7f4c7;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize
}

.table-wrap form {
    margin: 0
}

.table-wrap .btn {
    margin: 0;
    padding: 7px 11px;
    min-height: 36px;
    font-size: 13px
}

@media(max-width:760px) {
    .section {
        padding: 52px 18px
    }
    .section-head {
        display: block
    }
    .section-head>.search {
        margin-top: 20px;
        max-width: none
    }
    .hero {
        min-height: 520px;
        padding: 75px 22px
    }
    .hero .btn {
        width: 100%;
        max-width: 300px
    }
    .footer {
        display: block
    }
    .footer>div+div {
        margin-top: 18px
    }
    .inline-form {
        grid-template-columns: 1fr
    }
    .inline-form .btn {
        width: 100%
    }
    .search {
        width: 100%
    }
    .search input {
        min-width: 0
    }
    .cart-row {
        align-items: flex-start
    }
    .section h1,
    .section h2 {
        margin-bottom: 20px
    }
}

@media(min-width:761px) and (max-width:1050px) {
    .section {
        padding-left: 5%;
        padding-right: 5%
    }
}

@media(max-width:420px) {
    .brand {
        font-size: 14px
    }
    .brand-mark {
        padding: 8px
    }
    .hero h1 {
        font-size: 39px
    }
    .btn {
        width: 100%
    }
    .search {
        display: grid;
        grid-template-columns: 1fr
    }
    .search .btn {
        width: 100%
    }
}

.hero-slider {
    position: relative;
    padding: 0;
    min-height: min(620px, 75vh)
}

.hero-slide {
    display: none;
    min-height: min(620px, 75vh);
    padding: clamp(70px, 11vw, 150px) clamp(22px, 8vw, 120px);
    align-items: center;
    background-position: center;
    background-size: cover
}

.hero-slide.active {
    display: flex
}

.hero-dots {
    position: absolute;
    bottom: 28px;
    left: clamp(22px, 8vw, 120px);
    display: flex;
    gap: 8px
}

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 1px solid #fff;
    border-radius: 50%;
    background: transparent;
    padding: 0
}

.hero-dots button.active {
    background: #b8e34c
}

.admin-preview-logo {
    max-height: 80px;
    max-width: 220px;
    object-fit: contain;
    background: #edf5e8;
    padding: 8px;
    border-radius: 10px
}

.slide-thumb {
    width: 110px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px
}

.admin-logo img,
.brand-mark img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain
}

.check {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px
}

.check input {
    width: auto !important;
    min-height: auto !important
}

@media(max-width:760px) {
    .hero-slide {
        min-height: 520px;
        padding: 75px 22px
    }
    .hero-dots {
        left: 22px
    }
}

/* Configurable public branding */
.site-header .brand-mark {
    width: var(--site-logo-width, 164px);
    height: var(--site-logo-height, 44px);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 5px;
    overflow: hidden;
    border-radius: 11px;
    line-height: 1
}

.site-header .brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain
}

@media(max-width:760px) {
    .site-header .brand-mark {
        width: min(var(--site-logo-width, 164px), 132px);
        height: min(var(--site-logo-height, 44px), 40px);
        padding: 4px
    }
    .site-header .brand {
        max-width: calc(100vw - 24px);
        overflow: hidden
    }
    .site-header .brand>span:last-child {
        overflow: hidden;
        text-overflow: ellipsis
    }
}

@media(max-width:420px) {
    .site-header .brand-mark {
        width: min(var(--site-logo-width, 164px), 108px);
        height: min(var(--site-logo-height, 44px), 36px)
    }
}

/* Public catalogue image sizing */
.product-image {
    height: clamp(130px, 16vw, 180px);
    overflow: hidden;
    display: grid;
    place-items: center
}

.product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center
}

.admin-auth-container {
    margin-top: 10vh
}

/* Fresh database-driven homepage */
.fresh-hero,
.fresh-empty-hero {
    position: relative;
    min-height: min(680px, 78vh);
    overflow: hidden;
    background: #0b2b1c;
    color: #fff
}

.fresh-hero-glow {
    position: absolute;
    width: 480px;
    height: 480px;
    right: -140px;
    top: -160px;
    border-radius: 50%;
    background: #b8e34c55;
    filter: blur(10px);
    animation: freshFloat 8s ease-in-out infinite
}

.fresh-slider-track {
    height: 100%;
    min-height: inherit
}

.fresh-slide {
    display: none;
    min-height: inherit;
    padding: clamp(80px, 12vw, 160px) clamp(22px, 9vw, 140px);
    background-position: center;
    background-size: cover;
    align-items: center;
    animation: freshIn .7s ease both
}

.fresh-slide.is-active {
    display: flex
}

.fresh-slide-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    animation: freshRise .8s ease both
}

.fresh-slide h1,
.fresh-empty-hero h1 {
    font-size: clamp(42px, 7vw, 88px);
    line-height: .98;
    letter-spacing: -.04em;
    margin: 18px 0 24px
}

.fresh-slide p,
.fresh-empty-hero p {
    font-size: clamp(17px, 2vw, 22px);
    max-width: 620px;
    color: #dcebdd
}

.fresh-dots {
    position: absolute;
    left: clamp(22px, 9vw, 140px);
    bottom: 34px;
    display: flex;
    gap: 9px
}

.fresh-dots button {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 10px;
    background: #ffffff55;
    padding: 0;
    cursor: pointer;
    transition: .3s
}

.fresh-dots button.is-active {
    background: #b8e34c;
    width: 64px
}

.fresh-empty-hero {
    padding: clamp(80px, 12vw, 160px) clamp(22px, 9vw, 140px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: radial-gradient(circle at 85% 10%, #78aa3d 0, #173c28 45%, #092218 100%);
    animation: freshIn .7s ease
}

.fresh-intro {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: end;
    padding: 90px clamp(22px, 9vw, 140px) 35px
}

.fresh-intro h2 {
    font-size: clamp(32px, 5vw, 62px);
    line-height: 1;
    margin: 12px 0
}

.fresh-intro p {
    max-width: 380px;
    color: #627267;
    font-size: 18px
}

.fresh-products {
    padding-top: 35px
}

.fresh-card {
    overflow: hidden;
    padding: 0;
    transition: transform .35s ease, box-shadow .35s ease
}

.fresh-card:hover {
    transform: translateY(-9px);
    box-shadow: 0 20px 45px #24451b22
}

.fresh-card .product-image {
    height: 220px;
    border-radius: 0;
    margin: 0;
    background: linear-gradient(135deg, #eaf7c7, #c4e57a)
}

.fresh-card .product-image img {
    transition: transform .5s ease
}

.fresh-card:hover .product-image img {
    transform: scale(1.06)
}

.fresh-card-body {
    padding: 22px
}

.fresh-card-body h3 {
    font-size: 22px
}

.fresh-product-tag {
    font-size: 10px;
    letter-spacing: 2px;
    color: #6e9b28;
    font-weight: 800
}

.fresh-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #365a41;
    margin-top: 40px
}

.fresh-service {
    padding: 55px clamp(22px, 6vw, 90px);
    background: #173c28;
    color: #fff;
    transition: background .3s ease
}

.fresh-service:hover {
    background: #245a38
}

.fresh-service b {
    color: #b8e34c;
    font-size: 13px;
    letter-spacing: 2px
}

.fresh-service h3 {
    font-size: 24px;
    margin: 18px 0 8px
}

.fresh-service p {
    color: #c9dfcc
}

.fresh-no-data {
    grid-column: 1/-1;
    padding: 50px;
    background: #fff;
    border-radius: 18px;
    text-align: center
}

@keyframes freshIn {
    from {
        opacity: 0;
        transform: scale(1.02)
    }
    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes freshRise {
    from {
        opacity: 0;
        transform: translateY(18px)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes freshFloat {
    0%,
    100% {
        transform: translate(0, 0)
    }
    50% {
        transform: translate(-30px, 35px)
    }
}

@media(max-width:760px) {
    .fresh-intro {
        display: block;
        padding: 62px 22px 25px
    }
    .fresh-intro p {
        margin-top: 24px
    }
    .fresh-services {
        grid-template-columns: 1fr
    }
    .fresh-service {
        padding: 35px 22px
    }
    .fresh-slide h1,
    .fresh-empty-hero h1 {
        font-size: 44px
    }
    .fresh-card .product-image {
        height: 190px
    }
}