/* ==========================================
   GREEN BOWL - MAIN STYLESHEET
   ========================================== */

:root {
    --primary-color: #2e7d32;
    --primary-hover: #1b5e20;
    --secondary-color: #81c784;
    --accent-color: #e65100;
    --accent-light: #fff3e0;

    --bg-main: #f8f9fa;
    --bg-card: #ffffff;

    --text-primary: #212529;
    --text-secondary: #6c757d;

    --border-color: #e0e0e0;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s ease;
}


[data-theme="dark"] {
    --bg-main: #121212;
    --bg-card: #1e1e1e;

    --text-primary: #f8f9fa;
    --text-secondary: #a0a0a0;

    --border-color: #333333;

    --accent-light: #3b281f;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.5);
}


/* ==========================================
   Reset
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Tajawal", sans-serif;
}


html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}


body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}


body.modal-open {
    overflow: hidden;
}


button,
input,
select,
textarea {
    font: inherit;
}


button,
a {
    -webkit-tap-highlight-color: transparent;
}


img {
    max-width: 100%;
    display: block;
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}


/* ==========================================
   Preloader
   ========================================== */

#preloader {
    position: fixed;
    inset: 0;

    background: var(--bg-card);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;

    transition: opacity 0.5s ease;
}


.spinner {
    width: 50px;
    height: 50px;

    border: 5px solid #e0e0e0;
    border-top-color: var(--primary-color);

    border-radius: 50%;

    animation: spin 1s linear infinite;
}


@keyframes spin {

    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* ==========================================
   Top Bar
   ========================================== */

.top-bar {
    background: var(--primary-color);
    color: #fff;

    text-align: center;

    padding: 8px 15px;

    font-size: 0.9rem;
    font-weight: 500;
}


/* ==========================================
   Header
   ========================================== */

header {
    background: var(--bg-card);

    box-shadow: var(--shadow-sm);

    position: sticky;
    top: 0;

    z-index: 1000;
}


.header-container {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 15px 0;

    gap: 20px;
}


.logo {
    text-decoration: none;

    color: var(--primary-color);

    font-size: 1.8rem;
    font-weight: 800;

    white-space: nowrap;
}


.logo i {
    margin-left: 5px;
}


.nav-menu ul {
    display: flex;

    list-style: none;

    gap: 20px;
}


.nav-menu a {
    text-decoration: none;

    color: var(--text-primary);

    font-weight: 700;

    transition: var(--transition);
}


.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}


.header-actions {
    display: flex;

    gap: 12px;

    align-items: center;
}


.icon-btn {
    background: none;

    border: none;

    font-size: 1.2rem;

    color: var(--text-primary);

    cursor: pointer;

    position: relative;

    padding: 8px;

    border-radius: 50%;

    transition: var(--transition);
}


.icon-btn:hover {
    background: var(--border-color);
}


.cart-badge {
    position: absolute;

    top: 0;
    right: 0;

    background: var(--accent-color);

    color: white;

    font-size: 0.75rem;

    min-width: 20px;
    height: 20px;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 2px 5px;

    border-radius: 50%;

    font-weight: bold;
}


.mobile-toggle {
    display: none;
}


/* ==========================================
   Hero
   ========================================== */

.hero-section {
    background:
        url("https://images.unsplash.com/photo-1512621776951-a57141f2eefd?w=1200")
        center / cover no-repeat;

    position: relative;

    padding: 100px 0;

    color: white;

    text-align: center;
}


.hero-overlay {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.6);
}


.hero-content {
    position: relative;

    z-index: 2;

    max-width: 800px;
}


.hero-badge {
    background: var(--primary-color);

    padding: 6px 16px;

    border-radius: 20px;

    font-size: 0.9rem;

    display: inline-block;

    margin-bottom: 15px;
}


.hero-section h1 {
    font-size: 2.5rem;

    margin-bottom: 15px;

    font-weight: 800;
}


.hero-section p {
    font-size: 1.05rem;
}


.hero-buttons {
    margin-top: 25px;

    display: flex;

    gap: 15px;

    justify-content: center;

    flex-wrap: wrap;
}


/* ==========================================
   Buttons
   ========================================== */

.btn {
    padding: 12px 24px;

    border-radius: var(--radius-sm);

    font-weight: 700;

    border: none;

    cursor: pointer;

    transition: var(--transition);

    text-decoration: none;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;
}


.btn-primary {
    background: var(--primary-color);

    color: white;
}


.btn-primary:hover {
    background: var(--primary-hover);

    transform: translateY(-1px);
}


.btn-secondary {
    background: var(--bg-card);

    color: var(--text-primary);

    border: 1px solid var(--border-color);
}


.btn-secondary:hover {
    background: var(--border-color);
}


.btn-block {
    width: 100%;

    justify-content: center;
}


/* ==========================================
   Sections
   ========================================== */

.section-padding {
    padding: 60px 0;
}


.bg-light {
    background-color: rgba(0, 0, 0, 0.02);
}


[data-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.02);
}


.text-center {
    text-align: center;
}


.section-title {
    font-size: 2rem;

    color: var(--primary-color);

    margin-bottom: 10px;
}


.section-subtitle {
    color: var(--text-secondary);

    margin-bottom: 30px;
}


.grid-2 {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 40px;

    align-items: center;
}


.rounded-img {
    width: 100%;

    border-radius: var(--radius-md);
}


.shadow {
    box-shadow: var(--shadow-md);
}


.builder-description {
    color: var(--text-secondary);

    margin-bottom: 20px;
}


/* ==========================================
   Menu Controls
   ========================================== */

.menu-controls {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;

    flex-wrap: wrap;
}


.search-box {
    position: relative;

    flex: 1;

    min-width: 250px;
}


.search-box input {
    width: 100%;

    padding: 12px 45px 12px 15px;

    border-radius: var(--radius-sm);

    border: 1px solid var(--border-color);

    background: var(--bg-card);

    color: var(--text-primary);

    outline: none;

    transition: var(--transition);
}


.search-box input:focus {
    border-color: var(--primary-color);

    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}


.search-box i {
    position: absolute;

    right: 15px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--text-secondary);
}


.filter-buttons {
    display: flex;

    gap: 10px;
}


.filter-btn {
    padding: 10px 20px;

    border-radius: var(--radius-sm);

    border: 1px solid var(--border-color);

    background: var(--bg-card);

    color: var(--text-primary);

    cursor: pointer;

    font-weight: 700;

    transition: var(--transition);
}


.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);

    color: white;

    border-color: var(--primary-color);
}


/* ==========================================
   Products
   ========================================== */

.products-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(260px, 1fr));

    gap: 25px;
}


.product-card {
    background: var(--bg-card);

    border-radius: var(--radius-md);

    overflow: hidden;

    box-shadow: var(--shadow-sm);

    position: relative;

    display: flex;

    flex-direction: column;

    border: 1px solid var(--border-color);

    transition: var(--transition);
}


.product-card:hover {
    transform: translateY(-5px);

    box-shadow: var(--shadow-md);
}


.cal-badge {
    position: absolute;

    top: 12px;
    right: 12px;

    background: rgba(0, 0, 0, 0.7);

    color: white;

    padding: 4px 10px;

    border-radius: 15px;

    font-size: 0.8rem;

    z-index: 2;
}


.product-img {
    width: 100%;

    height: 180px;

    object-fit: cover;
}


.product-info {
    padding: 20px;

    display: flex;

    flex-direction: column;

    flex-grow: 1;
}


.product-title {
    font-size: 1.1rem;

    margin-bottom: 8px;
}


.product-desc {
    color: var(--text-secondary);

    font-size: 0.85rem;

    margin-bottom: 15px;

    flex-grow: 1;
}


.product-meta {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;
}


.product-price {
    font-size: 1.2rem;

    font-weight: 800;

    color: var(--primary-color);
}


.card-actions {
    display: flex;

    gap: 10px;
}


.card-actions .btn {
    flex: 1;

    padding: 8px;

    font-size: 0.9rem;

    justify-content: center;
}


.empty-products {
    text-align: center;

    padding: 50px 20px;

    color: var(--text-secondary);
}


.empty-products i {
    font-size: 3rem;

    margin-bottom: 15px;

    color: var(--primary-color);
}


.empty-products p {
    margin-bottom: 20px;
}


/* ==========================================
   Custom Builder
   ========================================== */

.builder-modal-title {
    color: var(--primary-color);

    margin-bottom: 20px;

    padding-left: 30px;
}


.builder-label {
    font-weight: 700;

    display: block;

    margin-bottom: 8px;
}


.options-group {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 20px;
}


.opt-btn {
    padding: 10px 16px;

    border-radius: var(--radius-sm);

    border: 2px solid var(--border-color);

    background: var(--bg-card);

    color: var(--text-primary);

    cursor: pointer;

    font-weight: 600;

    transition: var(--transition);
}


.opt-btn span {
    opacity: 0.8;

    font-size: 0.9em;
}


.opt-btn:hover {
    border-color: var(--primary-color);

    transform: translateY(-1px);
}


.opt-btn.selected {
    background: var(--primary-color);

    color: white;

    border-color: var(--primary-color);
}


/* ==========================================
   Builder Summary
   ========================================== */

.builder-summary-bar {
    position: sticky;

    bottom: 0;

    background: var(--bg-card);

    padding: 15px;

    border-radius: var(--radius-sm);

    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 20px;

    flex-wrap: wrap;

    gap: 15px;
}


.live-calc {
    display: flex;

    gap: 20px;

    font-size: 1.1rem;

    font-weight: 700;
}


.live-calc strong {
    color: var(--primary-color);
}


/* ==========================================
   Checkout
   ========================================== */

.checkout-card {
    background: var(--bg-card);

    padding: 30px;

    border-radius: var(--radius-md);

    max-width: 600px;

    margin: 0 auto;
}


.form-group {
    margin-bottom: 18px;
}


.form-group label {
    display: block;

    margin-bottom: 8px;

    font-weight: 700;
}


.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 12px;

    border-radius: var(--radius-sm);

    border: 1px solid var(--border-color);

    background: var(--bg-main);

    color: var(--text-primary);

    outline: none;

    transition: var(--transition);
}


.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);

    box-shadow:
        0 0 0 3px rgba(46, 125, 50, 0.1);
}


.form-group textarea {
    resize: vertical;

    min-height: 70px;
}


.checkout-divider {
    margin: 20px 0;

    border: none;

    border-top:
        1px dashed var(--border-color);
}


.summary-line {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-bottom: 10px;
}


.grand-total {
    font-size: 1.2rem;

    font-weight: 800;

    color: var(--primary-color);

    margin-bottom: 20px;
}


.success-icon {
    font-size: 4rem;

    color: var(--primary-color);

    margin-bottom: 15px;
}


.order-number {
    color: var(--text-secondary);

    margin: 10px 0;
}


.order-number strong {
    color: var(--primary-color);
}


/* ==========================================
   Hidden
   ========================================== */

.hidden {
    display: none !important;
}


/* ==========================================
   Cart Drawer
   ========================================== */

.cart-drawer {
    position: fixed;

    top: 0;

    right: -420px;

    width: 380px;

    max-width: 100%;

    height: 100%;

    background: var(--bg-card);

    box-shadow:
        -5px 0 15px rgba(0, 0, 0, 0.1);

    z-index: 2000;

    transition: right 0.3s ease;

    display: flex;

    flex-direction: column;
}


.cart-drawer.active {
    right: 0;
}


.cart-header {
    padding: 20px;

    border-bottom:
        1px solid var(--border-color);

    display: flex;

    justify-content: space-between;

    align-items: center;
}


.cart-header h3 {
    color: var(--primary-color);
}


.close-btn {
    background: none;

    border: none;

    font-size: 1.8rem;

    color: var(--text-secondary);

    cursor: pointer;

    line-height: 1;
}


.cart-items {
    padding: 20px;

    flex-grow: 1;

    overflow-y: auto;
}


.cart-item {
    display: flex;

    gap: 15px;

    margin-bottom: 15px;

    border-bottom:
        1px solid var(--border-color);

    padding-bottom: 15px;
}


.cart-item img {
    width: 60px;

    height: 60px;

    border-radius: var(--radius-sm);

    object-fit: cover;

    flex-shrink: 0;
}


.cart-item-details {
    flex-grow: 1;

    display: flex;

    flex-direction: column;

    justify-content: center;

    min-width: 0;
}


.cart-item-title {
    font-weight: 700;

    line-height: 1.4;

    margin-bottom: 4px;
}


.cart-item-price {
    color: var(--primary-color);

    font-weight: 800;

    font-size: 0.9rem;
}


.cart-quantity {
    margin-top: 7px;

    display: flex;

    gap: 8px;

    align-items: center;
}


.cart-quantity button {
    background: var(--border-color);

    border: none;

    width: 28px;

    height: 28px;

    border-radius: 50%;

    cursor: pointer;

    font-weight: bold;

    color: var(--text-primary);

    transition: var(--transition);
}


.cart-quantity button:hover {
    background: var(--primary-color);

    color: white;
}


.cart-quantity .remove-cart-item {
    margin-right: auto;

    background: transparent;

    color: #d32f2f;

    font-size: 0.85rem;
}


.cart-quantity .remove-cart-item:hover {
    background: #ffebee;

    color: #b71c1c;
}


.cart-footer {
    padding: 20px;

    border-top:
        1px solid var(--border-color);
}


.empty-cart {
    text-align: center;

    color: var(--text-secondary);

    padding: 40px 10px;
}


.empty-cart i {
    font-size: 3rem;

    color: var(--primary-color);

    margin-bottom: 15px;

    display: block;
}


.empty-cart p {
    margin-bottom: 20px;
}


/* ==========================================
   Modals
   ========================================== */

.modal {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.6);

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;

    z-index: 3000;

    opacity: 0;

    pointer-events: none;

    transition: opacity 0.3s ease;
}


.modal.active {
    opacity: 1;

    pointer-events: auto;
}


.modal-content {
    background: var(--bg-card);

    padding: 30px;

    border-radius: var(--radius-md);

    width: 90%;

    max-width: 500px;

    position: relative;

    max-height: 90vh;

    overflow-y: auto;
}


.modal-lg {
    max-width: 800px;
}


.close-modal {
    position: absolute;

    top: 15px;

    left: 15px;

    background: none;

    border: none;

    font-size: 1.8rem;

    color: var(--text-secondary);

    cursor: pointer;

    z-index: 2;
}


/* ==========================================
   Product Modal
   ========================================== */

.product-modal-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

    align-items: center;
}


.modal-product-image {
    width: 100%;

    border-radius: var(--radius-md);

    max-height: 280px;

    object-fit: cover;
}


.modal-product-title {
    color: var(--primary-color);

    margin-bottom: 10px;

    padding-left: 25px;
}


.modal-product-description {
    color: var(--text-secondary);

    margin-bottom: 15px;
}


.modal-calories {
    display: inline-block;

    background: var(--accent-light);

    color: var(--primary-color);

    padding: 5px 12px;

    border-radius: 20px;

    font-weight: 700;

    margin-bottom: 15px;
}


.modal-product-price {
    font-size: 1.5rem;

    font-weight: 800;

    color: var(--primary-color);

    margin-bottom: 20px;
}


/* ==========================================
   Toast
   ========================================== */

#toast-container {
    position: fixed;

    bottom: 20px;

    right: 20px;

    max-width: calc(100% - 40px);

    z-index: 9999;
}


.toast {
    background: var(--primary-color);

    color: white;

    padding: 12px 20px;

    border-radius: var(--radius-sm);

    margin-top: 10px;

    box-shadow: var(--shadow-md);

    font-weight: bold;

    animation: fadeIn 0.3s ease;
}


@keyframes fadeIn {

    from {
        opacity: 0;

        transform: translateY(20px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}


/* ==========================================
   Footer
   ========================================== */

footer {
    background: #111;

    color: #fff;

    padding: 45px 0 20px;

    margin-top: 20px;
}


.footer-content {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 40px;

    padding-bottom: 30px;
}


.footer-brand h3,
.footer-contact h3 {
    color: #fff;

    font-size: 1.3rem;

    margin-bottom: 15px;
}


.footer-brand h3 i {
    color: var(--secondary-color);

    margin-left: 5px;
}


.footer-brand p {
    color: #bdbdbd;

    max-width: 500px;

    line-height: 1.9;
}


.footer-contact {
    display: flex;

    flex-direction: column;

    align-items: flex-start;
}


.contact-link {
    color: #fff;

    text-decoration: none;

    display: inline-flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 12px;

    transition: var(--transition);
}


.contact-link i {
    color: var(--secondary-color);

    width: 22px;

    text-align: center;
}


.contact-link:hover {
    color: var(--secondary-color);

    transform: translateX(-3px);
}


.footer-bottom {
    border-top:
        1px solid rgba(255, 255, 255, 0.12);

    padding-top: 20px;

    text-align: center;

    color: #aaa;

    font-size: 0.9rem;
}


.footer-bottom strong {
    color: #fff;
}


/* ==========================================
   Back To Top
   ========================================== */

.back-to-top {
    position: fixed;

    bottom: 20px;

    left: 20px;

    background: var(--primary-color);

    color: white;

    border: none;

    width: 42px;

    height: 42px;

    border-radius: 50%;

    cursor: pointer;

    box-shadow: var(--shadow-md);

    z-index: 1500;

    transition: var(--transition);
}


.back-to-top:hover {
    background: var(--primary-hover);

    transform: translateY(-3px);
}


/* ==========================================
   Responsive - Tablet
   ========================================== */

@media (max-width: 900px) {

    .nav-menu ul {
        gap: 12px;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }

    .header-container {
        gap: 10px;
    }

}


/* ==========================================
   Responsive - Mobile
   ========================================== */

@media (max-width: 768px) {

    .header-container {
        padding: 12px 0;
    }


    .logo {
        font-size: 1.5rem;
    }


    .nav-menu {
        position: fixed;

        top: 65px;

        right: -100%;

        width: 100%;

        height: calc(100vh - 65px);

        background: var(--bg-card);

        flex-direction: column;

        align-items: center;

        padding-top: 40px;

        transition: right 0.3s ease;

        box-shadow: var(--shadow-md);

        overflow-y: auto;
    }


    .nav-menu.active {
        right: 0;
    }


    .nav-menu ul {
        flex-direction: column;

        text-align: center;

        gap: 25px;
    }


    .nav-menu a {
        font-size: 1.1rem;
    }


    .mobile-toggle {
        display: block;
    }


    .cart-drawer {
        width: 100%;

        right: -100%;
    }


    .cart-drawer.active {
        right: 0;
    }


    .grid-2 {
        grid-template-columns: 1fr;
    }


    .hero-section {
        padding: 75px 0;
    }


    .hero-section h1 {
        font-size: 2rem;
    }


    .products-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }


    .product-img {
        height: 160px;
    }


    .product-info {
        padding: 15px;
    }


    .card-actions {
        flex-direction: column;
    }


    .footer-content {
        grid-template-columns: 1fr;

        gap: 25px;
    }

}


/* ==========================================
   Responsive - Small Mobile
   ========================================== */

@media (max-width: 576px) {

    .container {
        width: 92%;
    }


    .top-bar {
        font-size: 0.78rem;

        line-height: 1.5;
    }


    .hero-section h1 {
        font-size: 1.8rem;
    }


    .hero-section p {
        font-size: 0.95rem;
    }


    .hero-buttons {
        flex-direction: column;

        align-items: stretch;
    }


    .hero-buttons .btn {
        width: 100%;
    }


    .section-padding {
        padding: 45px 0;
    }


    .section-title {
        font-size: 1.7rem;
    }


    .menu-controls {
        flex-direction: column;
    }


    .search-box {
        min-width: 100%;
    }


    .filter-buttons {
        flex-wrap: wrap;

        width: 100%;
    }


    .filter-btn {
        flex: 1;

        min-width: 100px;

        text-align: center;

        padding: 9px 10px;
    }


    .products-grid {
        grid-template-columns: 1fr;
    }


    .product-img {
        height: 190px;
    }


    .product-title {
        font-size: 1rem;
    }


    .product-desc {
        font-size: 0.82rem;
    }


    .product-modal-grid {
        grid-template-columns: 1fr;
    }


    .modal-content {
        padding: 22px;

        width: 95%;
    }


    .builder-summary-bar {
        flex-direction: column;

        align-items: stretch;

        text-align: center;
    }


    .live-calc {
        justify-content: space-around;

        flex-wrap: wrap;
    }


    .live-calc span {
        font-size: 0.95rem;
    }


    .opt-btn {
        width: 100%;

        text-align: center;
    }


    .checkout-card {
        padding: 20px;
    }


    .summary-line {
        align-items: flex-start;

        flex-direction: column;

        gap: 4px;
    }


    .grand-total {
        flex-direction: row;

        align-items: center;
    }


    .footer-content {
        text-align: center;
    }


    .footer-contact {
        align-items: center;
    }


    .back-to-top {
        bottom: 15px;

        left: 15px;
    }


    #toast-container {
        right: 15px;

        bottom: 15px;

        max-width: calc(100% - 30px);
    }

}


/* ==========================================
   Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;
    }

}