/* A Natural Difference - Quick Order v2.0 */
/* Streamlined: Search + Quick Add + Order List */

.anqo-wrapper {
    font-family: 'Open Sans', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    color: #4a4a4a;
}
.anqo-wrapper * { box-sizing: border-box; }

/* Sections */
.anqo-section {
    background: #fff;
    border: 1px solid #e8e4df;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 25px;
}
.anqo-section h3 {
    margin: 0 0 15px;
    font-size: 1.2em;
    color: #3a3a3a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Count badge */
.anqo-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #9d9065;
    color: #fff;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
}

/* Buttons */
.anqo-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
}
.anqo-btn-primary { background-color: #9d9065; color: #fff; }
.anqo-btn-primary:hover { background-color: #7a7050; color: #fff; }
.anqo-btn-secondary { background-color: #f5f3f0; color: #666; border: 1px solid #d8d4cf; }
.anqo-btn-secondary:hover { background-color: #e8e4df; color: #444; }
.anqo-btn-link { background: transparent; color: #9d9065; padding: 10px; }
.anqo-btn-link:hover { color: #7a7050; text-decoration: underline; }
.anqo-btn-large { padding: 15px 40px; font-size: 1.1em; }
.anqo-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.anqo-btn-added { background-color: #22c55e; color: #fff; }
.anqo-btn-in-order { background-color: #e8e4df; color: #777; cursor: default; }
.anqo-btn-in-order:hover { background-color: #e8e4df; color: #777; }

/* Search Box */
.anqo-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.anqo-search-box input {
    flex: 1;
    padding: 14px 18px;
    font-size: 1.05em;
    border: 2px solid #d8d4cf;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}
.anqo-search-box input:focus { border-color: #9d9065; }
.anqo-search-box .anqo-btn { padding: 14px 30px; }

/* Product Grid */
.anqo-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
}
.anqo-product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e4df;
    border-radius: 8px;
    overflow: hidden;
    background: #fdfcfb;
    transition: all 0.2s;
}
.anqo-product-card:hover {
    border-color: #9d9065;
    box-shadow: 0 2px 12px rgba(157,144,101,0.15);
}
.anqo-card-oos { opacity: 0.6; }
.anqo-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f3f0;
}
.anqo-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.anqo-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
}
.anqo-oos { background: #fee2e2; color: #c53030; }
.anqo-card-info {
    padding: 12px 15px 8px;
    flex: 1;
}
.anqo-card-name {
    font-weight: 600;
    color: #3a3a3a;
    font-size: 0.95em;
    margin-bottom: 4px;
    line-height: 1.3;
}
.anqo-card-sku {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 6px;
}
.anqo-card-price {
    font-weight: 700;
    color: #9d9065;
    font-size: 1.05em;
}
.anqo-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px 15px;
    gap: 10px;
}
.anqo-card-qty-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: #777;
}
.anqo-card-qty {
    width: 55px;
    padding: 6px;
    text-align: center;
    border: 1px solid #d8d4cf;
    border-radius: 4px;
}
.anqo-card-actions .anqo-btn {
    padding: 8px 18px;
    font-size: 0.9em;
}

/* Loading & Hints */
.anqo-loading-msg, .anqo-loading-initial {
    text-align: center;
    padding: 30px;
    color: #999;
}
.anqo-initial-hint, .anqo-empty-results {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}
.anqo-hint { font-size: 0.9em; margin-top: 5px; }

/* Errors */
.anqo-errors {
    background: #fff3f3;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}
.anqo-errors ul { margin: 0; padding-left: 20px; }
.anqo-errors li { color: #c53030; margin-bottom: 5px; }

/* Empty Message */
.anqo-empty-message {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}

/* Order Table */
.anqo-order-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.anqo-order-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #e8e4df;
    font-weight: 600;
    color: #666;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.anqo-order-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0ebe6;
    vertical-align: middle;
}
.anqo-col-image { width: 60px; }
.anqo-col-qty { width: 90px; }
.anqo-col-price, .anqo-col-total { width: 100px; text-align: right; }
.anqo-col-actions { width: 40px; text-align: center; }
.anqo-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    background: #f5f3f0;
}
.anqo-item-name { font-weight: 600; color: #3a3a3a; font-size: 0.95em; }
.anqo-item-sku { font-size: 0.85em; color: #999; }
.anqo-qty-input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border: 1px solid #d8d4cf;
    border-radius: 4px;
}
.anqo-item-total { font-weight: 600; color: #9d9065; }
.anqo-remove-btn {
    background: transparent;
    border: none;
    color: #c53030;
    cursor: pointer;
    font-size: 1.3em;
    padding: 5px;
    line-height: 1;
}
.anqo-remove-btn:hover { color: #9b2c2c; }

/* Totals */
.anqo-totals-row td { padding-top: 15px; border-bottom: none; }
.anqo-totals-label { text-align: right; font-weight: 600; font-size: 1.1em; color: #3a3a3a; }
.anqo-grand-total { font-size: 1.3em; font-weight: 700; color: #9d9065; text-align: right; }

/* Actions */
.anqo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e8e4df;
}
#anqo-cart-total-preview { font-weight: 400; font-size: 0.85em; opacity: 0.9; }

/* Success */
.anqo-success {
    text-align: center;
    padding: 50px 30px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
}
.anqo-success-icon {
    width: 60px; height: 60px;
    background: #22c55e; color: #fff;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2em; margin-bottom: 20px;
}
.anqo-success h3 { margin: 0 0 10px; color: #166534; }
.anqo-success p { color: #15803d; margin-bottom: 25px; }
.anqo-success-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* Spinner */
.anqo-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #9d9065;
    border-radius: 50%;
    animation: anqo-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes anqo-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
    .anqo-search-box { flex-direction: column; }
    .anqo-results-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; max-height: 450px; }
    .anqo-col-image, .anqo-col-sku { display: none; }
    .anqo-actions { flex-direction: column; gap: 10px; }
    .anqo-actions .anqo-btn { width: 100%; }
    .anqo-success-actions { flex-direction: column; }
}
@media (max-width: 480px) {
    .anqo-results-grid { grid-template-columns: 1fr; }
}
