/* Icomoon font for placeholder icons */
@font-face {
    font-family: 'dofamin-icomoon';
    src: url('../fonts/icomoon.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}
.icomoon {
    font-family: 'dofamin-icomoon' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.icomoon--dish-placeholder::before {
    content: "\e92d";
}

/* Disable sticky header on delivery page — our categories take over */
body.page-id-6446 .main-header,
body.page-id-6446 .main-header.is-stuck,
body.page-id-6446 header.site-header {
    position: relative !important;
}
body.page-id-6446 .lqd-sticky-placeholder {
    display: none !important;
}

/* When modal/checkout is open — hide site header so it doesn't overlap modal */
body.dofamin-modal-open .main-header,
body.dofamin-modal-open header.site-header,
body.dofamin-modal-open .lqd-sticky-placeholder {
    display: none !important;
}

/* Fix sticky issue on mobile — overflow on parents breaks position:sticky */
body.page-id-6446,
body.page-id-6446 #lqd-site-content,
body.page-id-6446 .content,
body.page-id-6446 #lqd-contents-wrap,
body.page-id-6446 .container {
    overflow: visible !important;
    overflow-x: clip !important;
}
body.page-id-6446 #dofamin-app {
    overflow: visible !important;
}

/* Dofamin Delivery — Menu & Cart Styles */
#dofamin-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 120px;
    color: #1a1a1a;
}

/* Header */
.dofamin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}
.dofamin-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

/* Service Toggle */
.dofamin-service-toggle {
    display: flex;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}
.dofamin-toggle-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    color: #666;
}
.dofamin-toggle-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
}

/* Categories nav — sticky */
.dofamin-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    margin-bottom: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 0;
    z-index: 99;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.dofamin-categories::-webkit-scrollbar { display: none; }
.dofamin-cat-btn {
    white-space: nowrap;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}
.dofamin-cat-btn.active,
.dofamin-cat-btn:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* Menu grid */
.dofamin-menu-section {
    margin-bottom: 32px;
}
.dofamin-menu-section h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-top: 8px;
}
.dofamin-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Menu card */
.dofamin-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: box-shadow .2s, transform .15s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.dofamin-card:hover {
    transform: translateY(-2px);
}
.dofamin-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.dofamin-card.stopped {
    opacity: .5;
    pointer-events: none;
}
.dofamin-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #f5f5f5;
    display: block;
}
.dofamin-card-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0ece4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8b3a8;
    font-size: 64px;
}
.dofamin-card-body {
    padding: 12px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.dofamin-card-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
}
.dofamin-card-desc {
    font-size: 13px;
    color: #777;
    margin: 0 0 12px;
    line-height: 1.4;
    flex: 1;
}
.dofamin-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dofamin-card-price {
    font-size: 18px;
    font-weight: 700;
}
.dofamin-card-weight {
    font-size: 13px;
    color: #999;
    margin-left: 6px;
}
.dofamin-add-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s;
    line-height: 1;
}
.dofamin-add-btn:hover {
    transform: scale(1.1);
}

/* Loading */
.dofamin-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #999;
}

/* Floating Cart */
.dofamin-cart {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}
.dofamin-cart-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    color: #fff;
    padding: 14px 28px;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    font-size: 16px;
    font-weight: 500;
    transition: transform .2s;
}
.dofamin-cart-toggle:hover {
    transform: translateX(-50%) scale(1.03);
    transform: scale(1.03);
}
.dofamin-cart-icon { font-size: 22px; }
.dofamin-cart-count {
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

/* Modal */
.dofamin-modal-overlay,
.dofamin-checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999998;
}
.dofamin-modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 0;
    z-index: 999999;
    overflow-y: auto;
    animation: slideUp .3s ease;
}
@media (min-width: 768px) {
    .dofamin-modal-content {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 720px;
        max-height: 85vh;
        border-radius: 16px;
        animation: fadeIn .25s ease;
    }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.dofamin-modal-close,
.dofamin-checkout-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

/* Modifier groups */
.dofamin-mod-group {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.dofamin-mod-group:last-child {
    border-bottom: none;
}
.dofamin-mod-group-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #1a1a1a;
}
.dofamin-mod-group-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
.dofamin-mod-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 12px;
}
.dofamin-mod-item + .dofamin-mod-item {
    border-top: 1px solid #f5f5f5;
}
.dofamin-mod-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
    min-width: 0;
    color: #1a1a1a;
}
.dofamin-mod-item input[type="radio"],
.dofamin-mod-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a1a1a;
    cursor: pointer;
    flex-shrink: 0;
}
.dofamin-mod-price {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}
/* Counter modifier */
.dofamin-mod-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.dofamin-mod-counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    transition: background .15s, opacity .15s;
}
.dofamin-mod-counter-btn:hover:not(:disabled) {
    background: #f5f5f5;
}
.dofamin-mod-counter-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}
.dofamin-mod-counter-value {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}
.dofamin-modal-body {
    padding: 0 0 24px 0;
}
.dofamin-modal-hero {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0ece4;
    border-radius: 16px 16px 0 0;
    display: block;
}
@media (min-width: 768px) {
    .dofamin-modal-hero {
        aspect-ratio: 21/9;
    }
}
.dofamin-modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dofamin-modal-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8b3a8;
    font-size: 96px;
}
.dofamin-modal-section {
    padding: 0 24px;
}
.dofamin-modal-title {
    margin: 20px 0 6px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}
.dofamin-modal-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #999;
}
.dofamin-modal-price-badge {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
.dofamin-modal-description {
    font-size: 14px;
    color: #555;
    line-height: 1.55;
    margin: 0 0 16px;
    white-space: pre-line;
}
.dofamin-modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 16px 24px 24px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}
.dofamin-modal-error {
    color: #d32f2f;
    text-align: center;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
}
.dofamin-mod-group--invalid .dofamin-mod-group-hint,
.dofamin-mod-group--invalid .dofamin-mod-group-title {
    color: #d32f2f;
}
.dofamin-modal-add-btn {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.dofamin-modal-add-btn:hover {
    background: #333;
}
.dofamin-modal-add-btn-price {
    font-weight: 700;
}

/* Qty control in modal */
.dofamin-qty-control {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    padding: 16px 0 4px;
}
.dofamin-qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.dofamin-qty-btn:hover {
    background: #f5f5f5;
}
.dofamin-qty-value {
    font-size: 20px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

/* Checkout */
.dofamin-checkout-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: #fff;
    z-index: 999999;
    overflow-y: auto;
    padding: 24px;
    animation: slideRight .3s ease;
}
@keyframes slideRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.dofamin-checkout-content h3 {
    font-size: 22px;
    margin: 0 0 20px;
}

/* Checkout items */
.dofamin-checkout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.dofamin-checkout-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}
.dofamin-checkout-item-info {
    flex: 1;
}
.dofamin-checkout-item-name {
    font-weight: 600;
    font-size: 14px;
}
.dofamin-checkout-item-mods {
    font-size: 12px;
    color: #999;
}
.dofamin-checkout-item-price {
    font-weight: 600;
    white-space: nowrap;
}
.dofamin-checkout-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dofamin-checkout-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dofamin-checkout-item-remove {
    color: #ff4444;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border: none;
    background: none;
}

/* Form */
.dofamin-form-group {
    margin-bottom: 14px;
}
.dofamin-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}
.dofamin-form-group input,
.dofamin-form-group textarea,
.dofamin-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color .2s;
    box-sizing: border-box;
}
.dofamin-form-group input:focus,
.dofamin-form-group textarea:focus {
    border-color: #1a1a1a;
    outline: none;
}
.dofamin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
}
.dofamin-order-total {
    text-align: right;
    font-size: 20px;
    padding: 16px 0;
    border-top: 2px solid #1a1a1a;
    margin-top: 16px;
}
.dofamin-submit-btn {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background .2s;
}
.dofamin-submit-btn:hover {
    background: #333;
}
.dofamin-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Payment toggle */
.dofamin-payment-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.dofamin-payment-btn {
    padding: 14px 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all .2s;
    text-align: center;
    color: #555;
}
.dofamin-payment-btn.active {
    border-color: #1a1a1a;
    background: #f8f8f8;
    color: #1a1a1a;
    font-weight: 600;
}
.dofamin-payment-btn:hover {
    border-color: #999;
}
.dofamin-submit-online {
    background: #1a73e8;
}
.dofamin-submit-online:hover {
    background: #1557b0;
}
.dofamin-submit-cash {
    background: #1a1a1a;
}

/* Order result */
#dofamin-order-result {
    text-align: center;
    padding: 40px 20px;
}
#dofamin-order-result.success {
    color: #2d7d2d;
}
#dofamin-order-result.error {
    color: #d32f2f;
}
#dofamin-order-result h3 {
    font-size: 24px;
}

/* Responsive */
@media (max-width: 600px) {
    .dofamin-menu-grid {
        grid-template-columns: 1fr;
    }
    .dofamin-form-row {
        grid-template-columns: 1fr 1fr;
    }
    .dofamin-checkout-content {
        max-width: 100%;
    }
    .dofamin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .dofamin-modal-product {
        flex-direction: column;
    }
    .dofamin-modal-product img {
        width: 100%;
        height: 180px;
    }
}
