﻿﻿ /* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #91F1EF 0%, #ffd5e0 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Categories Grid Styling */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Category Card Styling */
.category-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease forwards;
    text-decoration:none;
}

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .category-card:nth-child(2) {
        animation-delay: 0.1s;
    }

    .category-card:nth-child(3) {
        animation-delay: 0.2s;
    }

    .category-card:nth-child(4) {
        animation-delay: 0.3s;
    }

.category-card-inner {
    position: relative;
    height: 100%;
}

.category-card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.category-placeholder {
    height: 120px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    border-radius: 15px 15px 0 0;
}

.category-card-content {
    padding: 1.5rem;
    position: relative;
    text-align: center;
}

.category-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF4F7D;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.category-card-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.category-card-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-arrow {
    transform: translateY(-50%) translateX(5px);
}

/* No Categories Styling */
.no-categories {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

    .no-categories i {
        font-size: 3rem;
        margin-bottom: 1rem;
        display: block;
    }

/* Menu View Styling */
.menu-view {
    position: fixed;
    top: 0;
    right: -100vw; /* Changed from -100% to -100vw for complete hiding */
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #91F1EF 0%, #ffd5e0 100%);
    transition: right 0.4s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    transform: translateX(100%); /* Additional transform to ensure complete hiding */
}

    .menu-view.active {
        right: 0;
        transform: translateX(0); /* Reset transform when active */
    }

/* Menu Header Styling */
.menu-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
}

.back-to-categories-btn {
    background: none;
    border: 2px solid #00A8A3;
    color: #00A8A3;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: background 0.3s ease;
    margin-bottom: 1rem;
}

    .back-to-categories-btn:hover {
        background: rgba(102, 126, 234, 0.1);
    }

#selectedCategoryTitle {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    width: 100%;
}

/* Menu Container Styling */
.menu-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-section {
    display: none;
    margin-bottom: 3rem;
}

    .category-section.active {
        display: block;
    }

/* Category Header in Menu View */
.category-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.category-image {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
    flex-shrink: 0;
}

.category-title {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 700;
}

/* Products Container */
.products-container {
    display: grid;
    gap: 0.6rem;
    margin-left: 1rem;
}

/* Product Item Styling - Updated Layout */
.product-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
}

    .product-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    .product-item:nth-child(2) {
        animation-delay: 0.1s;
    }

    .product-item:nth-child(3) {
        animation-delay: 0.2s;
    }

    .product-item:nth-child(4) {
        animation-delay: 0.3s;
    }

.product-header {
    display: flex;
    gap: 1.2rem;
}

.product-image {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    object-fit: cover;
    flex-shrink: 0;
    margin: 0.1rem;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-left: 0.1rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0.1rem;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.1rem;
    margin-top: 0.7rem;
    flex-grow: 1;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 15ch;
}

.product-price {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #FF4F7D;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-right: 0.5rem;
}

.currency-symbol {
    font-size: 1rem;
    color: #FF4F7D;
    margin: 0.1rem;
}

/* Product Details Styling */
.product-details {
    margin-left: 0.6rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

    .detail-item:last-child {
        border-bottom: none;
    }

.detail-name {
    color: #2c3e50;
    font-weight: 500;
}

.detail-price {
    color: #FF4F7D;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7f8c8d;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .modal-close:hover {
        background: rgba(0, 0, 0, 0.1);
        color: #2c3e50;
    }

.modal-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.modal-description {
    color: #7f8c8d;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 65ch;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF4F7D;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

/* Mobile text truncation */
.product-description-mobile {
    color: gray;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    flex-grow: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    .category-card-content {
        padding: 1rem;
        text-align: center;
    }

    .category-card-title {
        font-size: 1.1rem;
        text-align: center;
    }

    .category-card-subtitle {
        display: none; /* Hide item count in mobile */
    }

    .category-card-arrow {
        display: none; /* Hide arrow in mobile for cleaner look */
    }

    .menu-container {
        padding: 1rem;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }

    .menu-header {
        padding: 1rem;
    }

    #selectedCategoryTitle {
        font-size: 1.4rem;
    }


    .product-description-mobile {
        display: block;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        padding: 0.5rem;
        gap: 0.8rem;
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card-image,
    .category-placeholder {
        height: 100px;
    }

    .category-placeholder {
        font-size: 1.5rem;
    }

    .category-card-content {
        padding: 0.8rem;
    }

    .category-card-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .product-item {
        padding: 1rem;
    }

    .product-header {
        gap: 1rem;
    }

    .product-image {
        width: 70px;
        height: 70px;
        margin: 0.2rem;
    }

    .product-name {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .product-description-mobile {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .category-header {
        padding: 1rem;
    }

    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

    .modal-content {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 25px;
        padding: 0;
        max-width: 500px;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        transform: scale(0.9) translateY(20px);
        transition: all 0.3s ease;
        text-align: center;
        position: relative;
    }

    .modal-overlay.active .modal-content {
        transform: scale(1) translateY(0);
    }

    .modal-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.5);
        border: none;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 10;
    }

        .modal-close:hover {
            background: rgba(0, 0, 0, 0.7);
            color: white;
        }

    .modal-image {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 25px 25px 0 0;
        margin: 0;
        display: block;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .modal-title {
        font-size: 1.8rem;
        font-weight: 700;
        color: #2c3e50;
        margin: 1.5rem 2rem 1rem 2rem;
    }

    .modal-description {
        color: #7f8c8d;
        font-size: 1rem;
        line-height: 1.6;
        margin: 0 2rem 1.5rem 2rem;
        text-align: center;
        max-width: 65ch;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .modal-price {
        font-size: 1.5rem;
        font-weight: 700;
        color: #FF4F7D;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        margin: 0 2rem 2rem 2rem;
    }

    /* Demo button to show modal */
    .demo-button {
        position: fixed;
        top: 20px;
        left: 20px;
        padding: 10px 20px;
        background: #FF4F7D;
        color: white;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        font-size: 1rem;
    }

    /* Mobile Responsive */
    @media (max-width: 480px) {
        .modal-overlay {
            align-items: center;
        }

        .modal-content {
            padding: 0;
        }

        .modal-title {
            margin: 1.5rem 1.5rem 1rem 1.5rem;
        }

        .modal-description {
            margin: 0 1.5rem 1.5rem 1.5rem;
        }

        .modal-price {
            margin: 0 1.5rem 1.5rem 1.5rem;
        }

        .modal-image {
            width: 100%;
            height: 150px;
            margin: 0;
        }

        .modal-title {
            font-size: 1.4rem;
        }

        .modal-description {
            font-size: 1.3rem;
        }

        .modal-price {
            font-size: 1.3rem;
        }

        .modal-currency-symbol {
            font-size: 1.3rem;
        }
    }
}

@media (min-width: 350px) and (max-width: 700px) {
    .products-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
        margin: 0 auto;
        max-width: 500px;
        padding: 0 1rem;
    }

    .product-item {
        width: 100%;
        max-width: 450px;
    }
}

