/* =====================================================
   Catering Order Component — Modern Stylesheet
   ===================================================== */

:root {
    --co-primary:       #81898D;
    --co-primary-dark:  #5a6164;
    --co-primary-light: #f0f1f2;
    --co-accent:        #e8a045;
    --co-accent-light:  #fdf6ec;
    --co-dark:          #1c1917;
    --co-mid:           #57534e;
    --co-muted:         #a8a29e;
    --co-border:        #e7e5e4;
    --co-white:         #ffffff;
    --co-success:       #16a34a;
    --co-radius:        12px;
    --co-radius-sm:     8px;
    --co-shadow:        0 4px 24px rgba(28,25,23,.09);
    --co-shadow-lg:     0 12px 40px rgba(28,25,23,.15);
    --co-transition:    all .22s cubic-bezier(.4,0,.2,1);
}

/* =====================================================
   HERO INTRO BANNER
   ===================================================== */
.co-hero {
    background: #5a6164;
    color: white;
    padding: 48px 24px 40px;
    text-align: center;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}
.co-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.co-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: .7;
    margin-bottom: 10px;
}
.co-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.15;
}
.co-hero-sub {
    font-size: 1rem;
    opacity: .85;
    margin: 0;
}

/* =====================================================
   STEPS BAR
   ===================================================== */
.co-steps-wrap {
    background: var(--co-white);
    border-bottom: 1px solid var(--co-border);
    padding: 24px 20px 20px;
    margin-bottom: 32px;
}
/* Outer row — circles + connectors all on one horizontal line */
.co-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}
/* Each step = circle + label stacked vertically */
.co-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    position: relative;
    min-width: 80px;
}
/* Horizontal connector line between steps */
.co-step-connector {
    flex: 1;
    height: 2px;
    background: var(--co-border);
    margin-top: 22px; /* vertically aligns with centre of 44px circle */
    min-width: 30px;
    max-width: 80px;
    transition: background .4s ease;
}
.co-step-connector.is-done {
    background: var(--co-success);
}
/* The circle */
.co-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    background: #f5f5f4;
    border: 2px solid var(--co-border);
    color: var(--co-muted);
    transition: var(--co-transition);
    flex-shrink: 0;
    line-height: 1;
}
/* The label below the circle */
.co-step-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .7px;
    text-align: center;
    color: var(--co-muted);
    line-height: 1.2;
    white-space: nowrap;
    transition: color .3s ease;
}
/* Active step */
.co-step.is-active .co-step-num {
    background: var(--co-primary);
    border-color: var(--co-primary);
    color: white;
    box-shadow: 0 0 0 5px var(--co-primary-light);
}
.co-step.is-active .co-step-label {
    color: var(--co-primary);
    font-weight: 700;
}
/* Completed step */
.co-step.is-done .co-step-num {
    background: var(--co-success);
    border-color: var(--co-success);
    color: white;
    font-size: 18px; /* bigger checkmark */
}
.co-step.is-done .co-step-label {
    color: var(--co-success);
}

/* =====================================================
   CATEGORY FILTER DROPDOWN
   ===================================================== */
.co-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.co-filter-bar label {
    font-weight: 600;
    font-size: 13px;
    color: var(--co-mid);
    white-space: nowrap;
}
.co-cat-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--co-white)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2381898D' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
        no-repeat right 12px center;
    border: 2px solid var(--co-border);
    border-radius: var(--co-radius-sm);
    padding: 10px 38px 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--co-dark);
    cursor: pointer;
    transition: var(--co-transition);
    min-width: 180px;
}
.co-cat-select:focus {
    outline: none;
    border-color: var(--co-primary);
    box-shadow: 0 0 0 3px var(--co-primary-light);
}
.co-cat-select:hover { border-color: var(--co-primary); }

.co-results-count {
    font-size: 13px;
    color: var(--co-muted);
    margin-left: auto;
}

/* =====================================================
   MENU ITEM CARDS
   ===================================================== */
.co-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 20px;
}
.co-item-card {
    background: var(--co-white);
    border-radius: var(--co-radius);
    overflow: hidden;
    box-shadow: var(--co-shadow);
    border: 1px solid var(--co-border);
    transition: var(--co-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}
.co-item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--co-shadow-lg);
    border-color: #d6ccc8;
}
.co-item-card.is-featured {
    border-color: var(--co-accent);
}
.co-featured-ribbon {
    position: absolute;
    top: 14px; right: -1px;
    background: var(--co-accent);
    color: var(--co-dark);
    font-size: 10px; font-weight: 800;
    padding: 4px 10px 4px 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 3px 0 0 3px;
    box-shadow: -2px 2px 6px rgba(0,0,0,.12);
}
.co-item-img {
    width: 100%; height: 190px;
    object-fit: cover;
    display: block;
}
.co-item-img-placeholder {
    width: 100%; height: 130px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
}
.co-item-body {
    padding: 16px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.co-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.co-item-title {
    font-size: 1rem; font-weight: 700;
    color: var(--co-dark);
    line-height: 1.3;
    margin: 0;
}
.co-item-price {
    font-size: 1.05rem; font-weight: 800;
    color: var(--co-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.co-item-meta {
    font-size: 12px;
    color: var(--co-muted);
    display: flex; gap: 10px; align-items: center;
}
.co-item-desc {
    font-size: 13px;
    color: var(--co-mid);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}
.co-tags {
    display: flex; flex-wrap: wrap; gap: 5px;
}
.co-tag {
    font-size: 10px; font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background: #dcfce7; color: #15803d;
    letter-spacing: .3px; text-transform: uppercase;
}

/* ---- Qty Control inside card ---- */
.co-item-footer {
    padding: 12px 16px 14px;
    border-top: 1px solid var(--co-border);
    background: #fafaf9;
    display: flex; flex-direction: column; gap: 8px;
}
.co-qty-row {
    display: flex; align-items: center; gap: 8px;
}
.co-qty-btn {
    width: 34px; height: 34px;
    border: 2px solid var(--co-border);
    border-radius: 50%;
    background: white;
    font-size: 18px; font-weight: 700;
    color: var(--co-primary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--co-transition);
    line-height: 1;
    padding: 0;
}
.co-qty-btn:hover {
    background: var(--co-primary);
    border-color: var(--co-primary);
    color: white;
}
.co-qty-input {
    width: 52px; height: 34px;
    text-align: center;
    border: 2px solid var(--co-border);
    border-radius: var(--co-radius-sm);
    font-size: 15px; font-weight: 700;
    color: var(--co-dark);
    -moz-appearance: textfield;
}
.co-qty-input::-webkit-inner-spin-button,
.co-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.co-qty-input:focus {
    outline: none;
    border-color: var(--co-primary);
    box-shadow: 0 0 0 3px var(--co-primary-light);
}
.co-qty-input.has-qty {
    border-color: var(--co-primary);
    background: var(--co-primary-light);
    color: var(--co-primary);
}
.co-notes-input {
    font-size: 12px;
    border: 1.5px solid var(--co-border);
    border-radius: var(--co-radius-sm);
    padding: 6px 10px;
    width: 100%;
    color: var(--co-mid);
    background: white;
    transition: var(--co-transition);
}
.co-notes-input:focus {
    outline: none;
    border-color: var(--co-accent);
    box-shadow: 0 0 0 3px var(--co-accent-light);
}

/* =====================================================
   ORDER SUMMARY SIDEBAR
   ===================================================== */
.co-summary-card {
    background: var(--co-white);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
    border: 1px solid var(--co-border);
    overflow: hidden;
    position: sticky;
    top: 20px;
}
.co-summary-header {
    background: linear-gradient(135deg, var(--co-primary-dark), var(--co-primary));
    color: white;
    padding: 16px 20px;
}
.co-summary-header h5 {
    margin: 0; font-weight: 700; font-size: 15px; letter-spacing: .3px;
}
.co-summary-body { padding: 16px; }
.co-summary-line {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 5px 0;
    color: var(--co-mid);
    border-bottom: 1px dashed #f0efee;
}
.co-summary-line:last-child { border-bottom: none; }
.co-summary-line .name { flex: 1; margin-right: 8px; }
.co-summary-empty {
    text-align: center; padding: 20px 0;
    color: var(--co-muted); font-size: 13px;
}
.co-summary-totals {
    padding: 12px 16px 0;
    border-top: 1px solid var(--co-border);
}
.co-summary-total-row {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 4px 0; color: var(--co-mid);
}
.co-summary-total-row.grand {
    font-size: 17px; font-weight: 800;
    color: var(--co-dark); padding-top: 10px;
    border-top: 2px solid var(--co-border);
    margin-top: 6px;
}
.co-summary-footer {
    padding: 14px 16px 16px;
}
.co-proceed-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--co-primary), var(--co-primary-dark));
    color: white;
    border: none;
    border-radius: var(--co-radius-sm);
    padding: 14px 20px;
    font-size: 15px; font-weight: 700;
    cursor: pointer;
    transition: var(--co-transition);
    letter-spacing: .3px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.co-proceed-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(129,137,141,.35);
}
.co-proceed-btn:disabled {
    opacity: .45; cursor: not-allowed; transform: none; box-shadow: none;
}
.co-min-notice {
    font-size: 12px; text-align: center;
    color: var(--co-accent); margin-top: 8px;
    background: var(--co-accent-light);
    padding: 6px 10px; border-radius: 6px;
    display: none;
}

/* =====================================================
   DETAILS & CONFIRM PAGE ELEMENTS
   ===================================================== */
.co-card {
    background: var(--co-white);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.co-card-header {
    background: #fafaf9;
    border-bottom: 1px solid var(--co-border);
    padding: 14px 20px;
    font-weight: 700; font-size: 14px;
    color: var(--co-dark);
    letter-spacing: .2px;
}
.co-card-body { padding: 20px; }

/* =====================================================
   ADMIN STATUS BADGES
   ===================================================== */
.badge.status-new       { background-color: #2563eb; }
.badge.status-confirmed { background-color: #0891b2; }
.badge.status-preparing { background-color: #d97706; color: #000; }
.badge.status-ready     { background-color: #16a34a; }
.badge.status-delivered { background-color: #6b7280; }
.badge.status-cancelled { background-color: #dc2626; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
    .co-menu-grid      { grid-template-columns: 1fr !important; gap: 16px; }
    .co-hero           { padding: 32px 16px 28px; }
    .co-filter-bar     { flex-direction: column; align-items: flex-start; gap: 8px; }
    .co-cat-select     { width: 100%; }
    .co-step-num       { width: 36px; height: 36px; font-size: 13px; }
    .co-step-label     { font-size: 9px; letter-spacing: .3px; }
    .co-step-connector { margin-top: 18px; min-width: 16px; }
    .co-summary-card   { position: static; }
}

/* =====================================================
   PRINT
   ===================================================== */
@media print {
    header, footer, nav, .navbar, .mod-menu, #sp-top, #sp-bottom,
    #sp-left, #sp-right, .co-steps-wrap, .co-hero, .btn, button,
    [class*="module"], .breadcrumb, #system-message-container { display: none !important; }
    body { background: white !important; }
    .com-cateringorder-thankyou { padding: 0 !important; }
}

/* ---- Override: hover states → black bg / white text ---- */
.co-proceed-btn:hover:not(:disabled) {
    background: #000000 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.co-qty-btn:hover {
    background: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}
.co-cat-select:hover,
.co-cat-select:focus {
    border-color: #81898D !important;
}

/* Force single column on phones and small tablets */
@media (max-width: 768px) {
    #co-menu-grid,
    .co-menu-grid {
        grid-template-columns: 1fr !important;
    }
}
