/**
 * Lindo Menu Page - Full Page Template
 * Style: GrabFood/ShopeeFood inspired
 */

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

/* Hide admin bar on menu page */
body.lindo-menu-template {
    margin: 0 !important;
    padding: 0 !important;
}

body.lindo-menu-template #wpadminbar {
    display: none !important;
}

.lindo-menu-page-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr 380px;
    min-height: 100vh;
    background: #f5f5f5;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Hide default theme elements */
.lindo-menu-page-wrapper ~ * {
    display: none !important;
}

body:has(.lindo-menu-page-wrapper) #masthead,
body:has(.lindo-menu-page-wrapper) #colophon,
body:has(.lindo-menu-page-wrapper) .site-header,
body:has(.lindo-menu-page-wrapper) .site-footer {
    display: none !important;
}

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

.lindo-menu-sidebar {
    background: #fff;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.lindo-menu-logo {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
}

.lindo-menu-logo img {
    max-width: 180px;
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.lindo-menu-logo h1 {
    font-family: 'Brush Script MT', cursive;
    font-size: 48px;
    color: #0a5c36;
    margin: 0;
    font-weight: normal;
}

.lindo-categories-nav {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lindo-category-btn {
    background: transparent;
    border: none;
    padding: 15px 20px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    margin: 0 12px;
}

.lindo-category-btn:hover {
    background: #f0f0f0;
}

.lindo-category-btn.active {
    background: #0a5c36;
    color: #fff;
}

/* ============================
   MAIN CONTENT
   ============================ */

.lindo-menu-main {
    background: #f5f5f5;
    overflow-y: auto;
    height: 100vh;
}

.lindo-menu-header {
    background: #fff;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.lindo-delivery-btn {
    background: #0a5c36;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.lindo-delivery-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.lindo-search-box {
    flex: 1;
    max-width: 600px;
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

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

.lindo-search-btn {
    background: transparent;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: #666;
}

.lindo-search-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

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

.lindo-products-container {
    padding: 30px;
}

.lindo-category-section {
    margin-bottom: 40px;
    display: none;
}

.lindo-category-section.is-active {
    display: block !important;
}

.lindo-category-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px;
    text-transform: uppercase;
}

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

.lindo-product-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.lindo-product-card:hover {
    border-color: #0a5c36;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lindo-product-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lindo-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lindo-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
}

.lindo-no-image .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #999;
}

.lindo-product-info {
    text-align: center;
}

.lindo-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.3;
}

.lindo-product-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lindo-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.lindo-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #0a5c36;
}

.lindo-add-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0a5c36;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 24px;
    font-weight: bold;
}

.lindo-add-btn:hover {
    background: #084428;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(10, 92, 54, 0.3);
}

.lindo-add-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    line-height: 1;
}

/* Fallback if dashicons not loaded */
.lindo-add-btn::before {
    content: '+';
    font-size: 28px;
    line-height: 1;
    position: absolute;
}

.lindo-add-btn .dashicons + * {
    display: none;
}

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

.lindo-cart-sidebar {
    background: #fff;
    border-left: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.lindo-cart-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.lindo-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.lindo-cart-items-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.lindo-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.lindo-cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lindo-cart-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.lindo-cart-item:last-child {
    border-bottom: none;
}

.lindo-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 5px;
    height: fit-content;
}

.lindo-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0a5c36;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lindo-qty-btn:hover {
    background: #084428;
}

.qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.lindo-cart-item-details {
    flex: 1;
}

.lindo-cart-item-details h4 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.lindo-remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e5e5;
    color: #e74c3c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lindo-remove-btn:hover {
    background: #fee;
    border-color: #e74c3c;
}

.lindo-remove-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.lindo-cart-item-addons {
    font-size: 11px;
    color: #666;
    margin: 4px 0 6px;
    line-height: 1.4;
}

.lindo-cart-item-addons strong {
    color: #333;
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.lindo-cart-item-addons ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lindo-cart-item-addons li {
    padding: 2px 0;
    color: #888;
}

.lindo-cart-item-addons .addon-item {
    display: inline-block;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    margin: 2px 4px 2px 0;
    font-size: 11px;
}

.lindo-cart-item-addons .addon-price {
    color: #0a5c36;
    font-weight: 600;
}

/* Cart item note */
.lindo-cart-item-note {
    font-size: 12px;
    color: #555;
    margin: 4px 0 6px 0;
    padding: 0;
    line-height: 1.4;
}

.lindo-cart-item-note strong {
    font-weight: 600;
    color: #333;
    margin-right: 4px;
}

.lindo-cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #0a5c36;
}

/* Cart Footer */
.lindo-cart-footer {
    border-top: 1px solid #e5e5e5;
    padding: 20px;
}

.lindo-cart-totals {
    margin-bottom: 15px;
}

.lindo-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.lindo-promo-code {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.lindo-promo-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 13px;
}

.lindo-promo-btn {
    padding: 10px 15px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #0a5c36;
}

.lindo-promo-btn:hover {
    background: #0a5c36;
    color: #fff;
}

.lindo-cart-summary {
    padding-top: 15px;
    border-top: 2px solid #e5e5e5;
}

.lindo-total-amount {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.lindo-total-amount .total-price {
    font-size: 20px;
    font-weight: 700;
    color: #0a5c36;
}

.lindo-checkout-btn {
    display: block;
    width: 100%;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.lindo-checkout-btn:hover {
    opacity: 0.9;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================
   RESPONSIVE
   ============================ */

/* Product Modal */
.lindo-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
}

.lindo-modal.is-visible {
    display: flex !important;
}

.lindo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.lindo-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1;
}

.lindo-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.lindo-modal-close:hover {
    background: #e5e5e5;
    transform: rotate(90deg);
}

.lindo-modal-product {
    padding: 40px 30px 30px;
}

.lindo-modal-product-image {
    text-align: center;
    margin-bottom: 20px;
}

.lindo-modal-product-image img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
}

.lindo-modal-product h2 {
    font-size: 24px;
    margin: 0 0 15px;
    color: #0a5c36;
}

.lindo-modal-product-desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.lindo-modal-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #0a5c36;
    margin-bottom: 20px;
}

/* Variations */
.lindo-modal-variations {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.lindo-modal-variations h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
}

.lindo-variation-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.lindo-variation-option:hover {
    border-color: #0a5c36;
}

.lindo-variation-option input[type="radio"] {
    margin-right: 12px;
}

.lindo-variation-option input[type="radio"]:checked + .variation-name {
    font-weight: 700;
}

.lindo-variation-option .variation-name {
    flex: 1;
    font-weight: 500;
}

.lindo-variation-option .variation-price {
    font-weight: 700;
    color: #0a5c36;
}

/* Addons */
.lindo-modal-addons {
    margin-bottom: 20px;
}

.lindo-addon-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.lindo-addon-group-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
}

.lindo-addon-group-title .required {
    color: #e74c3c;
}

.lindo-addon-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lindo-addon-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.lindo-addon-item:hover {
    border-color: #0a5c36;
}

.lindo-addon-item input[type="checkbox"],
.lindo-addon-item input[type="radio"] {
    margin-right: 10px;
}

.lindo-addon-item-label {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lindo-addon-item-name {
    font-weight: 500;
}

.lindo-addon-item-price {
    color: #0a5c36;
    font-weight: 600;
}

/* Quantity */
.lindo-modal-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.lindo-modal-quantity label {
    font-weight: 600;
}

.lindo-modal-quantity input {
    width: 80px;
    padding: 8px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
}

/* Note */
.lindo-modal-note {
    margin-bottom: 20px;
}

.lindo-modal-note label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.lindo-modal-note input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.lindo-modal-note input[type="text"]:focus {
    outline: none;
    border-color: #0a5c36;
}

.lindo-modal-note input[type="text"]::placeholder {
    color: #999;
}

.lindo-modal-note .note-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.lindo-modal-note .note-counter.warning {
    color: #e74c3c;
}

/* Add to cart button */
.lindo-modal-add-to-cart {
    width: 100%;
    padding: 15px;
    background: #0a5c36;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.lindo-modal-add-to-cart:hover {
    background: #084428;
}

.lindo-modal-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

body.lindo-modal-open {
    overflow: hidden;
}

@media (max-width: 1200px) {
    .lindo-menu-page-wrapper {
        grid-template-columns: 200px 1fr 320px;
    }
}

@media (max-width: 992px) {
    .lindo-menu-page-wrapper {
        grid-template-columns: 1fr;
    }
    
    .lindo-menu-sidebar {
        display: none;
    }
    
    .lindo-cart-sidebar {
        position: fixed;
        right: -100%;
        top: 0;
        width: 90%;
        max-width: 380px;
        z-index: 1000;
        transition: right 0.3s ease;
    }
    
    .lindo-cart-sidebar.is-open {
        right: 0;
    }
}

@media (max-width: 768px) {
    .lindo-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .lindo-product-card {
        padding: 15px;
    }
    
    .lindo-product-image {
        width: 80px;
        height: 80px;
    }
}

/* ============================
   FOOTER INFO
   ============================ */

.lindo-menu-footer-info {
    grid-column: 1 / -1;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 30px 40px;
    font-size: 14px;
    line-height: 1.8;
}

.lindo-footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.lindo-footer-content p {
    margin: 0 0 10px 0;
}

.lindo-footer-content a {
    color: #3498db;
    text-decoration: none;
}

.lindo-footer-content a:hover {
    text-decoration: underline;
}

.lindo-footer-content strong {
    color: #fff;
    font-weight: 600;
}

.lindo-footer-content ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.lindo-footer-content li {
    padding: 4px 0;
}

/* ============================
   QUICK CHECKOUT MODAL
   ============================ */

.lindo-checkout-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.lindo-checkout-modal-body h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.lindo-checkout-modal-body h3 {
    font-size: 16px;
    color: #555;
    margin: 20px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

/* Order Summary */
.lindo-checkout-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.lindo-checkout-items {
    margin-bottom: 15px;
}

.lindo-checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.item-name {
    flex: 1;
    font-weight: 500;
}

.item-price {
    font-weight: 600;
    color: #0a5c36;
}

.item-addons {
    padding: 5px 0 5px 20px;
    font-size: 13px;
}

.addon-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
    font-size: 12px;
}

.item-note {
    padding: 5px 0 5px 20px;
    font-size: 13px;
    color: #666;
}

.lindo-checkout-totals {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}

.total-final {
    font-size: 18px;
    color: #d32f2f;
    padding-top: 10px;
    border-top: 2px solid #ddd;
    margin-top: 10px;
}

.final-price {
    font-size: 22px;
}

/* Checkout Form */
.lindo-checkout-form {
    margin-top: 20px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #d32f2f;
}

.form-row input[type="text"],
.form-row input[type="tel"],
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #0a5c36;
}

.form-row textarea {
    resize: vertical;
    font-family: inherit;
}

/* Payment Methods */
.payment-methods {
    margin: 15px 0 25px 0;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method:hover {
    border-color: #0a5c36;
    background: #f9f9f9;
}

.payment-method input[type="radio"] {
    margin-right: 10px;
}

.payment-method span {
    font-size: 15px;
    font-weight: 500;
}

/* Submit Button */
.lindo-submit-order-btn {
    width: 100%;
    padding: 16px;
    background: #0a5c36;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.lindo-submit-order-btn:hover {
    background: #084428;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 92, 54, 0.3);
}

.lindo-submit-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}
