body {
    margin: 0;
    font-family: "Poppins", Arial, sans-serif;
    background: #f5faf5;
    color: #222;
}

header {
    background: #0b7a2d;
    color: white;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    position: relative; /* Essential for mobile menu positioning */
}

header .logo {
    width: auto;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

nav a:hover,
nav a.active {
    color: #c9ffd8;
}

.category-bar,
.subcategory-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background: #e9ffee;
}

.cat-btn,
.sub-btn {
    padding: 8px 15px;
    border-radius: 30px;
    background: white;
    color: #0b7a2d;
    font-weight: bold;
    border: 2px solid #0b7a2d;
    transition: 0.3s;
}

.cat-btn:hover,
.sub-btn:hover {
    background: #0b7a2d;
    color: white;
}

.cart-container {
    width: 90%;
    max-width: 900px;
    margin: 25px auto;
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0px 8px 25px rgba(0,0,0,0.08);
    animation: slideUp 0.5s ease;
}

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

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

th {
    background: #0b7a2d;
    color: white;
    padding: 12px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-box button {
    padding: 6px 10px;
    border: none;
    background: #0b7a2d;
    color: white;
    border-radius: 7px;
    cursor: pointer;
    transition: 0.3s;
}

.qty-box button:hover {
    background: #085a22;
}

.qty-box input {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid #0b7a2d;
    border-radius: 5px;
    font-weight: bold;
}

.remove-btn {
    background: red;
    padding: 7px 12px;
    border: none;
    border-radius: 7px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.remove-btn:hover {
    background: darkred;
}

.total-box {
    margin-top: 20px;
    font-size: 20px;
    text-align: right;
}

.payment-section {
    margin-top: 30px;
    padding: 25px;
    background: #f9fff9;
    border-radius: 12px;
    border: 2px solid #0b7a2d;
}

.payment-section h2 {
    color: #0b7a2d;
    margin-top: 0;
}

.payment-section h3 {
    color: #0b7a2d;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 2px solid #0b7a2d;
    padding-bottom: 8px;
}

.checkout-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #0b7a2d;
    font-size: 15px;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #0b7a2d;
    border-radius: 8px;
    font-size: 15px;
    font-family: "Poppins", Arial, sans-serif;
    transition: 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #074c1d;
    box-shadow: 0 0 10px rgba(11, 122, 45, 0.2);
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.payment-options label {
    display: flex;
    align-items: center;
    font-size: 15px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.payment-options label:hover {
    background: #f0faf0;
}

.payment-options input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.email-section {
    display: none;
}

.checkout-btn {
    background: #0b7a2d;
    padding: 12px 20px;
    border: none;
    color: white;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.checkout-btn:hover {
    background: #074c1d;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 62px;
    height: 62px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pop 0.6s ease;
}

.whatsapp-float img {
    width: 35px;
}

@keyframes pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

footer {
    text-align: center;
    background: #0b7a2d;
    padding: 15px;
    color: white;
    margin-top: 25px;
}

@media(max-width: 768px) {
    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0b7a2d;
        padding: 10px 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    nav.active {
        display: flex;
    }

    nav a {
        padding: 15px;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .menu-toggle {
        display: block;
        color: white;
    }

    table {
        font-size: 14px;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 15px;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
        min-height: 30px;
    }

    td:before {
        position: absolute;
        top: 50%;
        left: 12px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        transform: translateY(-50%);
    }

    td:nth-of-type(1):before { content: "Product"; }
    td:nth-of-type(2):before { content: "Price (GH₵)"; }
    td:nth-of-type(3):before { content: "Qty"; }
    td:nth-of-type(4):before { content: "Total"; }
    td:nth-of-type(5):before { content: "Action"; }

    .qty-box {
        width: auto;
        justify-content: flex-end;
    }

    footer .legal-links {
        margin-top: 5px;
        font-size: 0.85rem;
    }
    footer .legal-links a {
        color: #ccc;
        text-decoration: none;
        margin: 0 5px;
    }
    footer .legal-links a:hover {
        text-decoration: underline;
    }
}