/* Material Design 3 Theme for Food Ordering Plugin */

:root {
    scroll-behavior: smooth;
    /* MD3 Color System (Neutral + Peach Accents) */
    --md-primary: #000000;
    --md-on-primary: #ffffff;
    --md-primary-container: #83e67e21;
    --md-on-primary-container: #1c1b1f;

    --md-surface: #fdfdfd;
    --md-on-surface: #1c1b1f;
    --md-surface-variant: #eeeeee;
    --md-on-surface-variant: #49454f;

    --md-outline: #79747e;
    --md-outline-variant: #c4c7c5;

    --md-error: #b3261e;

    --fop-accent-orange: #378133;
    /* Vivid orange for the floating bar */

    /* MD3 Elevations */
    --md-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
    --md-elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
    --md-elevation-3: 0px 4px 8px 3px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.05);
    --md-elevation-4: 0px 6px 10px 4px rgba(0, 0, 0, 0.1), 0px 2px 3px 0px rgba(0, 0, 0, 0.05);
    --md-elevation-5: 0px 8px 12px 6px rgba(0, 0, 0, 0.1), 0px 4px 4px 0px rgba(0, 0, 0, 0.05);

    /* Spacing & Radius */
    --fop-radius-full: 1000px;
    --fop-radius-xl: 28px;
    --fop-radius-l: 24px;
    --fop-radius-m: 16px;
    --fop-radius-s: 12px;
    /* --- Sticky Stacking Variables --- */
    /* --- Sticky Stacking Variables --- */
    --fop-theme-header-offset: 0px;
    --fop-sticky-header-height: 224px;
    --fop-app-bar-height: 0px;
}

@media (max-width: 1024px) {
    :root {
        --fop-app-bar-height: 64px;
    }
}

/* --- App Bar (Mobile/Tablet) --- */
.fop-app-bar {
    display: none;
    background: var(--md-primary);
    color: var(--md-on-primary);
    padding: 0 24px;
    height: var(--fop-app-bar-height);
    box-shadow: var(--md-elevation-1);
    position: sticky;
    top: 0;
    z-index: 1000;
    align-items: center;
}

@media (max-width: 1024px) {
    .fop-app-bar {
        display: flex;
    }
}

.fop-app-title {
    font-size: 20px;
    font-weight: 600;
}

#fop-wrapper {
    font-family: 'Inter', 'Roboto', sans-serif;
    color: var(--md-on-surface);
    background-color: transparent;
    line-height: 1.5;
    position: relative;
    padding: 0 0 24px 0;
}

/* --- Sticky Header Container --- */
.fop-sticky-header {
    position: sticky;
    top: var(--fop-theme-header-offset, 0px);
    z-index: 100;
    margin: 0 -24px 24px -24px;
    padding: 8px 24px 0 24px;
    background: var(--md-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    /* Reduced from 16px */
}

@media (max-width: 1024px) {
    .fop-sticky-header {
        top: var(--fop-theme-header-offset, 0px);
    }
}

@media (max-width: 600px) {
    .fop-sticky-header {
        margin: 0 -16px 16px -16px;
        /* Back to original */
        padding: 8px 16px 0 16px;
        /* Reduced from 12px */
        top: var(--fop-theme-header-offset, 0px);
    }
}

/* --- Search Bar --- */
.fop-search-container {
    background: var(--md-surface-variant);
    padding: 2px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    border-radius: var(--fop-radius-full);
    min-height: 52px;
    border: none;
}


.fop-search-container:focus-within {
    background: var(--md-surface);
    box-shadow: var(--md-elevation-3);
    outline: 2px solid var(--md-primary);
}

@media (max-width: 600px) {
    .fop-search-container {
        margin: 0 16px 16px 16px;
    }
}

/* --- Order Type Toggle --- */
.fop-order-type-toggle {
    display: flex;
    background: var(--md-surface-variant);
    border-radius: var(--fop-radius-full);
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.fop-toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: var(--fop-radius-full);
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.fop-toggle-btn .material-icons {
    font-size: 20px;
}

.fop-toggle-btn.active {
    background: var(--md-surface);
    color: var(--md-primary);
    box-shadow: var(--md-elevation-1);
}

@media (max-width: 600px) {
    .fop-order-type-toggle {
        margin: 0 16px 16px 16px;
    }
}

.fop-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 16px;
    color: var(--md-on-surface);
    outline: none;
    font-family: "Bona Nova", Sans-serif;
    font-weight: 400;
}

.fop-search-input::placeholder {
    color: var(--md-on-surface-variant);
    opacity: 0.7;
}

.fop-search-icon {
    font-size: 24px;
    color: var(--md-on-surface-variant);
    margin-right: 16px;
    background: transparent;
    width: auto;
    height: auto;
}

.fop-search-clear {
    background: transparent;
    border: none;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.fop-search-clear:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* --- Navigation Chips (Horizontal Scroll) --- */
.fop-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    background: transparent;
    /* Background now handled by sticky-header */
    padding: 8px 0 16px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}


@media (max-width: 600px) {
    .fop-tabs {
        padding: 12px 16px;
        margin: 0 -16px;
        /* Bleed to edges on mobile */
    }
}

.fop-tabs::-webkit-scrollbar {
    display: none;
}

.fop-nav-item {
    padding: 0 20px;
    height: 44px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--md-on-surface-variant);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--fop-radius-full);
    border: 1px solid var(--md-outline-variant);
    background: transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    scroll-snap-align: start;
}

.fop-nav-item:hover {
    background: var(--md-surface-variant);
    border-color: var(--md-outline);
}

.fop-nav-item.active {
    background: var(--md-primary-container);
    color: var(--md-on-primary-container);
    border-color: transparent;
    font-weight: 600;
}

/* --- Main Layout Responsiveness --- */
.fop-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
}

@media (max-width: 1280px) {
    .fop-main-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 24px;
    }
}

/* Tablet: Hide sidebar, show FAB */
@media (max-width: 1024px) {
    .fop-main-layout {
        grid-template-columns: 1fr;
    }

    .fop-cart-column {
        display: none;
    }

    .fop-fab {
        display: flex;
    }
}

/* --- Category and Product Grid --- */
.fop-category-section {
    margin-bottom: 48px;
    scroll-margin-top: calc(var(--fop-theme-header-offset, 0px) + 160px);
    /* Adjusted for Theme Header + Search (88) + Nav (72) */
}

.fop-category-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: var(--md-on-surface);
}

@media (max-width: 1024px) {
    .fop-category-title {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .fop-category-title {
        font-size: 20px;
        margin-bottom: 16px;
        padding: 0 16px;
        /* Align with grid padding */
    }
}

.fop-products-list {
    display: grid;
    grid-template-columns: 1fr;
    /* Default: Single column for Desktop content area */
    gap: 24px;
}

/* Tablet Grid: 2 columns */
@media (min-width: 601px) and (max-width: 1024px) {
    .fop-products-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1-column grid (1 row 1 product) */
@media (max-width: 600px) {
    .fop-products-list {
        grid-template-columns: 1fr;
        padding: 0 16px;
        gap: 16px;
    }
}

/* --- Product Cards (Responsive) --- */
.fop-product-card {
    display: flex;
    background: var(--md-surface);
    border: none;
    border-radius: var(--fop-radius-l);
    overflow: hidden;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
    position: relative;
    box-shadow: var(--md-elevation-1);
}

.fop-product-card:hover {
    box-shadow: var(--md-elevation-2);
    transform: translateY(-2px);
    background: #ffffff;
}

@media (max-width: 600px) {
    .fop-product-card {
        flex-direction: row;
        /* Horizontal row for 1-column grid */
        min-height: auto;
        align-items: stretch;
    }
}

.fop-product-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.fop-product-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--md-on-surface);
}

@media (max-width: 600px) {
    .fop-product-info {
        padding: 12px;
        min-height: 120px;
    }

    .fop-product-title {
        font-size: 14px;
        /* Slightly smaller for 2rd grid */
        line-height: 1.3;
    }

    .fop-product-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12px;
    }
}

.fop-product-desc {
    margin: 0;
    font-size: 14px;
    color: var(--md-on-surface-variant);
    line-height: 1.5;
    opacity: 0.8;
}

.fop-product-price {
    margin-top: auto;
    padding-top: 16px;
    font-weight: 700;
    color: var(--md-primary);
    font-size: 16px;
}

.fop-product-image-container {
    width: 140px;
    height: 140px;
    padding: 12px;
}

@media (max-width: 600px) {
    .fop-product-image-container {
        width: 100px;
        /* Fixed width for side image */
        height: 100px;
        padding: 8px;
        flex-shrink: 0;
    }

    .fop-product-image {
        border-radius: var(--fop-radius-m);
        /* Keep it all-around rounded */
    }
}

.fop-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--fop-radius-m);
}

/* Add Button (Mini FAB style) */
.fop-add-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 48px;
    /* Slightly larger */
    height: 48px;
    border-radius: 16px;
    /* MD3 Large container shape */
    background: var(--md-primary);
    /* High contrast Black */
    border: none;
    color: var(--md-on-primary);
    /* White icon */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: var(--md-elevation-2);
    z-index: 10;
}

.fop-add-btn:hover {
    box-shadow: var(--md-elevation-4);
    background: #333333;
    transform: scale(1.05);
}

/* Ensure absolute positioning is maintained during loading */
.fop-add-btn.fop-btn-loading {
    position: absolute !important;
}

.fop-add-btn:hover {
    box-shadow: var(--md-elevation-2);
    background: #f0ccab;
    /* Slightly darker peach */
}

/* --- Cart Sidebar (MD3 Elevated Card) --- */
.fop-cart-card {
    position: sticky;
    top: calc(var(--fop-theme-header-offset, 0px) + var(--fop-sticky-header-height, 224px) + 24px);
    background: var(--md-surface);
    border-radius: var(--fop-radius-xl);
    box-shadow: var(--md-elevation-3);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--fop-theme-header-offset, 0px) - var(--fop-sticky-header-height, 224px) - 48px);
    overflow: hidden;
}

.fop-cart-header {
    padding: 24px;
    background: var(--md-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.fop-cart-header h3,
.fop-cart-header .material-icons {
    color: #ffffff !important;
}

.fop-cart-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.fop-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.fop-cart-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--md-surface-variant);
    border-radius: var(--fop-radius-m);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.fop-cart-item:hover {
    background: #f2f2f2;
    border-color: var(--md-outline-variant);
}

.fop-cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.fop-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fop-item-name {
    font-weight: 500;
    font-size: 15px;
    color: var(--md-on-surface);
}

.fop-cart-item-meta {
    font-size: 12px;
    color: var(--md-on-surface-variant);
    line-height: 1.4;
}

.fop-cart-item-meta dl {
    margin: 0;
    padding: 0;
}

.fop-cart-item-meta dt {
    display: inline;
    font-weight: 500;
    margin-right: 4px;
}

.fop-cart-item-meta dd {
    display: inline;
    margin: 0;
    opacity: 0.9;
}

.fop-cart-item-meta dt::after {
    content: ':';
}

.fop-item-price {
    font-weight: 600;
    color: var(--md-primary);
    white-space: nowrap;
}

.fop-qty-control {
    display: flex;
    align-items: center;
    background: var(--md-surface);
    border-radius: var(--fop-radius-full);
    padding: 2px 4px;
    gap: 8px;
    width: fit-content;
    align-self: flex-start;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fop-qty-btn {
    background: var(--md-primary-container);
    border: none;
    color: var(--md-on-primary-container);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Base for loading spinner */
}

.fop-qty-val {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.fop-cart-footer {
    padding: 24px;
    background: var(--md-surface);
    border-top: 1px solid var(--md-outline-variant);
}

.fop-total-row {
    padding: 0px 15px 0px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
}

.fop-checkout-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--md-primary);
    color: var(--md-on-primary);
    text-align: center;
    border-radius: var(--fop-radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    box-shadow: var(--md-elevation-2);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.fop-checkout-btn:hover {
    box-shadow: var(--md-elevation-4);
    background: #222222;
}

.fop-min-amount-warning {
    background: #fff8e1;
    color: #856404;
    padding: 12px;
    border-radius: var(--fop-radius-s);
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #ffeeba;
}

/* --- Cart & FAB --- */
/* --- Floating Cart Bar (Mobile/Tablet) --- */
.fop-floating-cart-bar {
    display: none;
    /* Controlled by visible class */
    position: fixed;
    bottom: 24px;
    left: 16px;
    right: 16px;
    height: 60px;
    background: var(--fop-accent-orange);
    color: white;
    border-radius: var(--fop-radius-full);
    z-index: 2000;
    padding: 0 24px;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), opacity 0.3s;
    transform: translateY(150%);
    opacity: 0;
}

@media (max-width: 1024px) {
    .fop-floating-cart-bar.visible {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
}

.fop-floating-cart-bar:active {
    transform: scale(0.96);
}

.fop-floating-cart-left {
    position: relative;
    display: flex;
    align-items: center;
}

.fop-floating-cart-left .material-icons {
    font-size: 28px;
}

.fop-floating-cart-center {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 14px;
    flex: 1;
    text-align: center;
}

.fop-floating-cart-right {
    font-weight: 800;
    font-size: 18px;
}

.fop-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--md-error);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    border: 2px solid var(--fop-accent-orange);
    /* Match bar background */
}

/* --- Empty State --- */
.fop-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--md-on-surface-variant);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.fop-empty-state .material-icons {
    font-size: 48px;
    color: var(--md-outline-variant);
    opacity: 0.5;
}

.fop-empty-state p {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.fop-empty-sub {
    font-size: 13px !important;
    font-weight: 400 !important;
    opacity: 0.7;
}

/* Ensure spinner color for improved contrast */
.fop-add-btn.fop-btn-loading::after {
    color: var(--md-on-primary) !important;
}

.fop-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}

.fop-modal-overlay.open {
    display: flex;
    opacity: 1;
}

.fop-modal-dialog {
    background: var(--md-surface);
    border-radius: var(--fop-radius-xl);
    padding: 32px;
    width: 95%;
    max-width: 560px;
    margin: auto;
    position: relative;
    box-shadow: var(--md-elevation-3);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    border: none;
}

/* --- Order Type Modal Styles --- */
.fop-modal-order-type {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.fop-modal-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: var(--md-surface-variant);
    border: 2px solid transparent;
    border-radius: var(--fop-radius-m);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.fop-modal-type-btn:hover {
    background: var(--md-primary-container) !important;
    border-color: var(--md-primary) !important;
}

.fop-modal-type-btn .material-icons {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--md-primary);
}

.fop-modal-type-btn strong {
    font-size: 18px;
    display: block;
    margin-bottom: 4px;
}

.fop-modal-type-btn span {
    font-size: 13px;
    opacity: 0.7;
}

.fop-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--md-on-surface-variant);
    cursor: pointer;
    margin-top: 24px;
    font-weight: 500;
}

.fop-min-qty-warning {
    background: #e3f2fd !important;
    border-color: #bbdefb !important;
    color: #1976d2 !important;
}

@media (max-width: 600px) {
    .fop-modal-dialog {
        padding: 24px 16px;
        width: 95%;
    }

    .fop-modal-close {
        top: 12px;
        right: 12px;
    }
}

.fop-modal-overlay.open .fop-modal-dialog {
    transform: translateY(0);
}

.fop-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--md-surface-variant);
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--md-on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fop-radio {
    width: 20px;
    height: 20px;
    accent-color: var(--md-primary);
}

/* Modal Content Styling (MD3) */
.fop-modal-hero {
    margin-bottom: 24px;
}

.fop-modal-hero h2 {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
}

.fop-modal-hero p {
    margin: 0;
    color: var(--md-on-surface-variant);
    font-size: 14px;
}

@media (max-width: 600px) {
    .fop-modal-hero h2 {
        font-size: 20px;
    }

    .fop-group-section h3 {
        margin: 16px 0 8px 0;
    }
}

.fop-group-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 32px 0 16px 0;
    color: var(--md-on-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.fop-group-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--md-outline-variant);
    margin-left: 16px;
    opacity: 0.6;
}

.fop-var-option,
.fop-addon-option {
    margin-bottom: 4px;
}

.fop-option-label {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    gap: 16px;
    margin-bottom: 10px;
}

.fop-option-label:hover {
    background: #ffffff;
    border-color: #37813333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Material Selected state */
.fop-option-label.active {
    background: #e7f3e6;
    border-color: #378133;
    box-shadow: 0 4px 12px rgba(55, 129, 51, 0.1), inset 0 0 0 1px #378133;
}

/* Bold text for active selection */
.fop-option-label.active .fop-option-text {
    font-weight: 700;
    color: #111111; 
}

.fop-option-label.active .fop-option-price {
    color: #378133;
    font-weight: 700;
}

/* Custom Checkbox/Radio Indicators */
.fop-var-input, .fop-addon-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--md-outline);
    border-radius: 50%; /* Radios */
    margin: 0;
    position: relative;
    cursor: pointer;
    background: white;
    flex-shrink: 0;
}

.fop-addon-input[type="checkbox"] {
    border-radius: 4px; /* Checkboxes */
}

.fop-var-input:checked, .fop-addon-input:checked {
    border-color: #378133;
    background: #378133;
}

.fop-var-input:checked::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fop-addon-input[type="checkbox"]:checked::after {
    content: 'check';
    font-family: 'Material Icons';
    font-size: 14px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fop-option-text {
    flex: 1;
    font-size: 15px;
    transition: all 0.2s;
}

.fop-option-price {
    font-weight: 600;
    color: var(--fop-accent-orange);
    font-size: 14px;
    transition: all 0.2s;
}

/* Addon Quantity Controller */
.fop-addon-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--md-surface);
    padding: 4px;
    border-radius: 20px;
    border: 1px solid var(--md-outline-variant);
}

.fop-addon-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--md-surface-variant);
    color: var(--md-on-surface-variant);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fop-addon-qty-btn:hover {
    background: var(--fop-accent-orange);
    color: white;
}

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

.fop-group-section h3 small {
    font-weight: 400;
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 8px;
}

.fop-modal-actions {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    align-items: center;
}

@media (max-width: 600px) {
    .fop-modal-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
    }

    .fop-qty-selector {
        width: 100%;
        justify-content: center;
        padding: 8px;
    }

    .fop-add-to-order-btn {
        width: 100%;
    }
}

.fop-qty-selector {
    display: flex;
    align-items: center;
    background: var(--md-surface-variant);
    border-radius: var(--fop-radius-full);
    padding: 4px;
}

.fop-modal-qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-on-surface);
}

.fop-modal-qty-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

#fop-modal-qty-val {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
}

.fop-add-to-order-btn {
    flex: 1;
    height: 56px;
    border-radius: 28px;
    background: #378133;
    color: white;
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 4px 16px rgba(55, 129, 51, 0.25);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.fop-add-to-order-btn:hover {
    background: #2e6d2b;
    box-shadow: 0 8px 24px rgba(55, 129, 51, 0.3);
    transform: translateY(-2px);
}

.fop-add-to-order-btn:active {
    transform: translateY(0);
}

.fop-add-to-order-btn.fop-btn-loading {
    justify-content: center;
}

.fop-add-to-order-btn:disabled,
.fop-add-to-order-btn.disabled {
    background: var(--md-outline-variant);
    color: var(--md-on-surface-variant);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

/* --- Mobile Bottom Sheet (Cart) --- */
.fop-bottom-sheet .fop-modal-dialog {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 28px 28px 0 0;
    transform: translateY(100%);
}

.fop-bottom-sheet.open .fop-modal-dialog {
    transform: translateY(0);
}

/* --- Delivery Check Modal (PLZ) --- */
.fop-delivery-check-modal .fop-modal-dialog {
    max-width: 400px;
    padding: 32px;
    text-align: center;
}

.fop-delivery-header {
    margin-bottom: 24px;
}

.fop-delivery-header .material-icons {
    font-size: 48px;
    color: var(--fop-accent-orange);
    margin-bottom: 16px;
}

.fop-delivery-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.fop-delivery-header p {
    margin: 0;
    color: var(--md-on-surface-variant);
    font-size: 14px;
    line-height: 1.6;
}

.fop-delivery-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fop-input-group input {
    width: 100%;
    color: #000;
    padding: 16px 24px;
    border-radius: var(--fop-radius-full);
    border: 2px solid var(--md-outline-variant);
    font-size: 18px;
    text-align: center;
    font-family: inherit;
    transition: all 0.2s;
}

.fop-input-group input:focus {
    border-color: var(--fop-accent-orange);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

.fop-delivery-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--fop-accent-orange);
    color: white;
    padding: 16px;
    border-radius: var(--fop-radius-full);
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.fop-delivery-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.3);
}

.fop-error-msg {
    color: var(--md-error);
    background: #fdeaea;
    padding: 12px;
    border-radius: var(--fop-radius-s);
    font-size: 13px;
    font-weight: 500;
}

/* --- Mobile Cart Modal Override --- */
.fop-bottom-sheet .fop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--md-outline-variant);
}

.fop-bottom-sheet .fop-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

/* --- Mobile Bottom Sheet (Cart) Height Restriction --- */
#fop-mobile-cart-items {
    max-height: 280px;
    /* Show approx 2 items */
    overflow-y: auto;
}

/* --- Utilities --- */
.material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.rotation {
    animation: rotate 1s linear infinite;
}

/* --- Loading States --- */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fop-spinner {
    font-size: 20px !important;
    animation: rotate 1s linear infinite;
    display: inline-block;
    color: var(--md-primary);
}

.fop-btn-loading {
    position: relative;
    /* Removed !important to allow absolute overrides */
    color: transparent !important;
    pointer-events: none;
}

.fop-btn-loading::after {
    content: 'refresh';
    font-family: 'Material Icons';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    animation: rotate 1s linear infinite;
    color: var(--md-on-primary);
    /* Default for primary buttons */
}

/* Specialized spinner colors for better visibility */
.fop-add-btn.fop-btn-loading::after,
.fop-qty-btn.fop-btn-loading::after,
.fop-nav-item.fop-btn-loading::after {
    color: var(--md-on-primary-container);
    /* Dark spinner for light peach buttons */
}

.fop-checkout-btn.fop-btn-loading::after {
    color: var(--md-on-primary);
    /* White spinner for black buttons */
}

.fop-cart-updating {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.fop-item-updating {
    position: relative;
    overflow: hidden;
}

.fop-item-updating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 5;
}

.fop-item-updating .fop-qty-control {
    opacity: 0.3;
}

.fop-min-amount-warning {
    background: #fff0f0;
    color: var(--md-error);
    padding: 12px;
    border-radius: var(--fop-radius-s);
    font-size: 13px;
    font-weight: 500;
    margin: 12px 0;
    text-align: center;
    border: 1px solid #ffccce;
}

.fop-checkout-btn.disabled {
    background: var(--md-outline-variant);
    color: var(--md-on-surface-variant);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
    margin-top: 8px;
}

.fop-checkout-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* --- Attribute Badges (Dietary Labels) --- */
.fop-product-badges,
.fop-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.fop-attribute-badge {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f0;
    color: #444;
    border: 1px solid #ddd;
}

/* Vegan & Vegetarian - Green/Leaf Theme (Premium Look) */
.fop-attribute-badge.badge-vegan,
.fop-attribute-badge.badge-vegetarian {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.fop-attribute-badge.badge-vegan::before,
.fop-attribute-badge.badge-vegetarian::before {
    content: 'eco';
    font-family: 'Material Icons';
    font-size: 14px;
    text-transform: none;
    /* Prevent 'eco' from becoming 'ECO' */
}
/* Order Type Info in Cart */
.fop-cart-order-type-needed, .fop-cart-order-type-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--md-surface-variant);
    border-radius: var(--fop-radius-m);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    margin-left: 15px;
    margin-right: 15px;
}

.fop-cart-order-type-needed {
    color: var(--md-primary);
    border: 1px dashed var(--md-outline);
    cursor: pointer;
    background: var(--md-primary-container);
}

.fop-cart-order-type-selected {
    color: var(--md-on-surface);
}

.fop-cart-order-type-selected .material-icons {
    color: var(--md-primary);
    font-size: 20px;
}

.fop-change-order-type:hover {
    text-decoration: underline;
}
