* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f5f5f5;
    color: #222;
    padding-top: 110px;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/* ================= HEADER ================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #1f7a3d;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left img {

    width: 120px;

    padding: 8px;

    border-radius: 24px;

    background:
        rgba(255, 255, 255, 0.04);

    border:
        1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 10px 35px rgba(212, 160, 23, 0.2);

    object-fit: contain;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 0 15px;
    width: 420px;
}

.search-icon {
    font-size: 18px;
    margin-right: 10px;
    color: #666;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 14px 0;
    font-size: 14px;
}

#search-toggle {
    display: none;
    border: none;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

/* ================= ADMIN BUTTON ================= */

#admin-login-btn {

    border: none;

    background:
        linear-gradient(135deg,
            #1f7a3d,
            #2ca85a);

    color: white;

    padding: 13px 22px;

    border-radius: 50px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.25s;

    box-shadow:
        0 6px 18px rgba(31, 122, 61, 0.25);
}

#admin-login-btn:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 10px 25px rgba(31, 122, 61, 0.35);
}

#admin-login-btn:active {

    transform:
        scale(0.97);
}

/* ================= LAYOUT ================= */

main {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
}

/* ================= SIDEBAR ================= */

.sidebar {
    width: 220px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    height: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 120px;
}

.sidebar ul {
    list-style: none;
    margin-top: 20px;
}

.sidebar li {
    padding: 12px;
    margin-bottom: 10px;
    background: #f2f2f2;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.sidebar li:hover {
    background: #1f7a3d;
    color: white;
}

/* ================= CATEGORIES ================= */

#categories li {
    position: relative;
    overflow: visible;
}

.sub-menu {
    position: absolute;
    top: 0;
    left: calc(100% + 8px);
    min-width: 200px;
    background: white;
    border-radius: 10px;
    padding: 8px;
    list-style: none;
    display: none;
    z-index: 999999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

#categories li:hover>.sub-menu {
    display: block;
}

.sub-menu li {
    background: #f5f5f5;
    color: black;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.sub-menu li:hover {
    background: #1f7a3d;
    color: white;
}

/* ================= PRODUCTS ================= */

.products {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product img {

    width: 100%;

    height: 180px;

    object-fit: contain;

    border-radius: 8px;

    background: white;
}

.product h3 {
    margin-top: 10px;
}

.product p {
    margin: 10px 0;
}

.product button {
    width: 100%;
    padding: 10px;
    border: none;
    background: #1f7a3d;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

/* ================= CART ================= */

#cart-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #25D366;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#cart-count {
    font-size: 14px;
    margin-left: 5px;
}

.cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: white;
    padding: 20px;
    transition: 0.3s;
    z-index: 3000;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.cart.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 2500;
}

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#close-cart {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.cart-item {
    margin: 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.cart-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 12px;
}

.cart-top h4 {

    flex: 1;

    font-size: 16px;

    line-height: 1.4;
}

.remove-icon {

    flex-shrink: 0;

    width: 28px;

    height: 28px;

    border-radius: 50%;

    background: #ff4d4d;

    color: white;

    display: flex;

    justify-content: center;

    align-items: center;

    cursor: pointer;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-controls button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #1f7a3d;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/* ================= CHECKOUT ================= */

.checkout-box {
    background: white;
    padding: 25px;
    border-radius: 18px;
    margin-top: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.checkout-box h2 {
    margin-bottom: 25px;
    color: #1f7a3d;
}

.checkout-section {
    margin-bottom: 20px;
}

.checkout-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

.checkout-section input,
.checkout-section select {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    font-size: 15px;
}

#checkout-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #1f7a3d;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

/* ================= SLOTS ================= */

.slots-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.slots-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 25px;
}

.slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.slots-header button {
    border: none;
    background: red;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

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

.slot-item {
    padding: 15px;
    background: #f1f1f1;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.slot-item:hover {
    background: #ddd;
}

.slot-item.selected {
    background: #1f7a3d;
    color: white;
}

.slot-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: #1f7a3d;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

#selected-slot-text {
    margin-top: 10px;
    font-weight: bold;
    color: #1f7a3d;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    body {
        padding-top: 120px;
    }

    main {
        flex-direction: column;
        padding: 0;
    }

    .sidebar {
        width: 100%;
        overflow: visible;
        border-radius: 0;
    }

    .sidebar>ul {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
    }

    .sidebar li {
        min-width: max-content;
        margin-bottom: 0;
    }

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

    .product {
        padding: 10px;
    }

    .product img {
        height: 140px;
    }

    .product h3 {
        font-size: 16px;
    }

    .product p {
        font-size: 14px;
    }

    .product button {
        padding: 8px;
        font-size: 14px;
    }

    .cart {
        width: 100%;
    }

    header {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px 20px;
        min-height: 120px;
    }

    .header-left {
        gap: 10px;
        min-width: 0;
    }

    .header-left img {

        width: 85px;

        height: auto;
    }

    .header-left h1 {

        font-size: 42px;

        font-weight: 800;

        background:
            linear-gradient(90deg,
                #008751,
                #fcd116,
                #ce1126);

        -webkit-background-clip: text;

        -webkit-text-fill-color: transparent;
    }

    .header-left span {

        color: #d4a017;
    }

    .header-left p {
        display: none;
    }

    .search-container {
        width: 100%;
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    #search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 42px;
        height: 42px;
    }

    .search-bar {
        display: none;
        width: 100%;
    }

    .search-bar.active {
        display: flex;
        width: 100%;
        margin-top: 2px;
    }

    .search-bar.active input {
        width: 100%;
        max-width: 100%;
        padding: 14px 20px;
        border-radius: 50px;
    }

    .sub-menu.mobile-show {
        display: flex !important;
        flex-direction: column !important;
    }

    .sub-menu {
        position: fixed;
        left: 50%;
        top: 120px;
        transform: translateX(-50%);
        width: 85%;
        max-width: 320px;
        background: white;
        border-radius: 20px;
        padding: 15px;
        z-index: 999999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    #categories li:hover>.sub-menu {
        display: flex;
        flex-direction: column;
    }
}

.header-left h1 {

    font-size: 34px;

    font-weight: 800;

    background:
        linear-gradient(90deg,
            #008751,
            #fcd116,
            #ce1126);

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;
}

.header-left h1 span {

    color: #fcd116;
}