/* ── WP Easy Order ── */

/* Nav button */
.weo-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #2271b1;
    color: #fff !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    transition: background 0.2s;
    white-space: nowrap;
}
.weo-nav-btn:hover {
    background: #135e96;
    color: #fff !important;
}
.weo-nav-icon {
    font-style: normal;
    font-size: 16px;
    line-height: 1;
}

/* ── Overlay ── */
#weo-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    background: #fff !important;
    overflow-y: auto !important;
    opacity: 0;
    transition: opacity 0.25s ease;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}
#weo-overlay.weo-visible {
    opacity: 1;
}

/* ── Modal ── */
#weo-modal {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: translateY(-16px);
    transition: transform 0.25s ease;
}
#weo-overlay.weo-visible #weo-modal {
    transform: translateY(0);
}

/* ── Modal Header ── */
.weo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
    gap: 12px;
    flex-wrap: wrap;
}
.weo-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}
.weo-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.weo-close-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 34px;
    height: 34px;
    font-size: 18px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    line-height: 1;
}
.weo-close-btn:hover {
    background: #f0f0f0;
    color: #000;
}

/* ── Buttons ── */
.weo-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.weo-btn-primary {
    background: #2271b1;
    color: #fff;
}
.weo-btn-primary:hover {
    background: #135e96;
    color: #fff;
}
.weo-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
}
.weo-btn-secondary:hover {
    background: #ddd;
    color: #1d2327;
}
.weo-btn-add {
    background: #2271b1;
    color: #fff;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, opacity 0.15s;
    font-weight: 600;
}
.weo-btn-add:hover:not(:disabled) {
    background: #135e96;
}
.weo-btn-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.weo-btn-remove {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.15s;
}
.weo-btn-remove:hover {
    background: #fce8e8;
}

/* ── Modal Body ── */
.weo-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}

/* ── Sections ── */
.weo-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 16px 24px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #1d2327;
    border-bottom: 2px solid #f0f0f1;
}

/* ── Badge ── */
.weo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2271b1;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    line-height: 1;
}

/* ── Search ── */
/* ── Category buttons ── */
#weo-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px 4px;
}
.weo-cat-btn {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}
.weo-cat-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}
.weo-cat-btn.weo-cat-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

#weo-search-wrap {
    padding: 8px 24px 12px;
}
#weo-search {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
#weo-search:focus {
    border-color: #2271b1;
}

/* ── Table ── */
.weo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.weo-table thead th {
    text-align: left;
    padding: 8px 12px;
    color: #646970;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}
.weo-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}
.weo-table tbody tr:last-child td {
    border-bottom: none;
}
.weo-table tbody tr:hover td {
    background: #fafafa;
}

/* Column widths */
.weo-col-img    { width: 100px; }
.weo-col-price  { width: 160px; }
.weo-col-qty    { width: 120px !important; min-width: 120px !important; }
.weo-col-total  { width: 100px; }
.weo-col-action { width: 120px; text-align: right; }

#weo-cart-table .weo-col-price { width: 220px; }

/* ── Product image ── */
.weo-product-img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    display: block;
}
.weo-product-name {
    font-weight: 600;
    color: #1d2327;
}
.weo-product-name a {
    color: inherit;
    text-decoration: none;
}
.weo-product-name a:hover {
    color: #2271b1;
}
.weo-product-price {
    color: #2271b1;
    font-weight: 600;
}
.weo-product-total {
    font-weight: 600;
    color: #1d2327;
}

/* ── Quantity input ── */
.weo-qty-input {
    width: 90px !important;
    min-width: 90px !important;
    box-sizing: border-box !important;
    padding: 5px 8px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: border-color 0.15s;
}
.weo-qty-input:focus {
    border-color: #2271b1;
}

/* ── Loading ── */
.weo-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 28px 24px;
    color: #646970;
    font-size: 14px;
}
.weo-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #ddd;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: weo-spin 0.7s linear infinite;
    flex-shrink: 0;
}
.weo-spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
    border-color: rgba(0,0,0,0.15);
    border-top-color: #c0392b;
    vertical-align: middle;
}
@keyframes weo-spin {
    to { transform: rotate(360deg); }
}

/* ── Empty messages ── */
.weo-empty-msg {
    padding: 20px 24px;
    color: #646970;
    font-size: 14px;
    font-style: italic;
}

/* ── Row animations ── */
.weo-row-enter {
    animation: weo-row-in 0.35s ease forwards;
}
.weo-row-exit {
    animation: weo-row-out 0.3s ease forwards;
    pointer-events: none;
}
@keyframes weo-row-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes weo-row-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ── Cart total row ── */
.weo-cart-total-row td {
    font-weight: 700;
    font-size: 14px;
    border-top: 2px solid #e5e5e5 !important;
    border-bottom: none !important;
    background: #f8f9fa;
    padding: 10px 12px;
}

/* ── Floating button (mobile) ── */
#weo-fab {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 28px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    white-space: nowrap;
    transition: background 0.15s, box-shadow 0.15s;
}
#weo-fab:hover {
    background: #135e96;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #weo-fab {
        display: block;
    }
    .weo-nav-item {
        display: none;
    }
}
@media (max-width: 600px) {
    .weo-col-price,
    .weo-col-total {
        display: none !important;
    }
    .weo-col-img {
        width: 56px !important;
        min-width: 56px !important;
    }
    .weo-product-img {
        width: 48px !important;
        height: 48px !important;
    }
    .weo-col-qty {
        width: 90px !important;
        min-width: 90px !important;
    }
    .weo-col-action {
        width: auto !important;
    }
    .weo-btn-add {
        padding: 6px 10px;
        font-size: 12px;
    }
}
