/* =============================================
   FICOL ORDERS — FRONTEND STYLES
   ============================================= */

/* ---- FLOATING CART BUBBLE ---- */
#ficol-cart-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: #fff;
    border-radius: 50px;
    padding: 12px 18px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9000;
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}
#ficol-cart-bubble:hover { transform: scale(1.07); box-shadow: 0 6px 28px rgba(37,211,102,0.55); }
.cart-count {
    background: #e74c3c;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ---- PRODUCT GRID ---- */
.ficol-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 10px 0;
}
.ficol-p-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}
.ficol-p-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.13); }
.ficol-p-img {
    position: relative;
    overflow: hidden;
}
.ficol-p-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.ficol-p-card:hover .ficol-p-img img { transform: scale(1.04); }
.ficol-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-hot { background: #e74c3c; }
.badge-popular { background: #f39c12; }
.badge-export { background: #27ae60; }
.badge-new { background: #3498db; }
.badge-custom { background: #9b59b6; }

.ficol-p-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.ficol-p-origin { font-size: 12px; color: #e67e22; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; font-weight: 600; }
.ficol-p-name { font-size: 19px; font-weight: 700; color: #2c3e50; margin-bottom: 6px; }
.ficol-sku { font-size: 12px; font-weight: 400; color: #aaa; margin-left: 6px; }
.ficol-p-price { font-size: 20px; color: #25D366; font-weight: 700; margin-bottom: 8px; }
.ficol-p-desc { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 12px; flex: 1; }
.ficol-p-sizes { font-size: 12px; color: #888; margin-bottom: 14px; }
.ficol-p-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }

/* ---- BUTTONS ---- */
.ficol-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.ficol-btn:hover { transform: translateY(-1px); text-decoration: none; }
.ficol-btn-green { background: #25D366; color: #fff; }
.ficol-btn-green:hover { background: #1eb858; color: #fff; }
.ficol-btn-wa { background: #128C7E; color: #fff; }
.ficol-btn-wa:hover { background: #0e6b60; color: #fff; }
.ficol-btn-gray { background: #e0e0e0; color: #444; }
.ficol-btn-gray:hover { background: #ccc; }
.ficol-btn-full { width: 100%; margin-top: 10px; padding: 14px; font-size: 15px; }
.ficol-btn-outline { background: transparent; border: 2px solid #25D366; color: #25D366; }
.ficol-btn-outline:hover { background: #25D366; color: #fff; }

/* ---- SEARCH BAR ---- */
.ficol-search-wrap { margin-bottom: 24px; }
.ficol-search-wrap form { display: flex; gap: 10px; flex-wrap: wrap; }
.ficol-search-wrap input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.ficol-search-wrap input:focus { border-color: #25D366; }

/* ---- OVERLAY ---- */
.ficol-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9100;
    backdrop-filter: blur(2px);
}
.ficol-overlay.open { display: block; }

/* ---- CART DRAWER ---- */
.ficol-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9200;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 30px rgba(0,0,0,0.2);
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
}
.ficol-drawer.open { right: 0; }
.ficol-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}
.ficol-drawer-header h2 { margin: 0; font-size: 20px; color: #2c3e50; }
.ficol-drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.ficol-drawer-footer { padding: 16px; border-top: 1px solid #eee; background: #f9f9f9; }

/* ---- CART ITEMS ---- */
.ficol-cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}
.ficol-cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.cart-item-info { min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 15px; color: #2c3e50; margin-bottom: 4px; }
.cart-item-price { font-size: 13px; color: #666; }
.cart-item-controls { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.cart-qty-btn {
    width: 28px; height: 28px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.cart-qty-btn:hover { background: #e0e0e0; }
.cart-qty-input {
    width: 55px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 14px;
}
.cart-unit-select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 13px;
    color: #555;
}
.cart-item-total { font-weight: 700; color: #25D366; font-size: 15px; white-space: nowrap; }
.cart-remove-btn { background: none; border: none; cursor: pointer; color: #e74c3c; font-size: 18px; padding: 0; margin-top: 4px; }

/* ---- TOTALS ---- */
.ficol-totals { margin-bottom: 10px; }
.ficol-total-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: #555; border-bottom: 1px solid #f0f0f0; }
.ficol-total-shipping { color: #e67e22; }
.ficol-total-grand { font-size: 18px; font-weight: 700; color: #2c3e50; border-bottom: none; padding-top: 10px; }

/* ---- MODAL ---- */
.ficol-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 640px;
    max-width: 96vw;
    max-height: 92vh;
    background: #fff;
    border-radius: 16px;
    z-index: 9300;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
}
.ficol-modal.open {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.ficol-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
}
.ficol-modal-header h2 { margin: 0; font-size: 20px; }
.ficol-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.ficol-close-btn:hover { background: rgba(255,255,255,0.35); }
.ficol-modal-body { flex: 1; overflow-y: auto; padding: 24px; }

/* ---- FORMS ---- */
.ficol-form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.ficol-form-group label { font-weight: 600; font-size: 14px; color: #2c3e50; }
.ficol-form-group input,
.ficol-form-group select,
.ficol-form-group textarea {
    padding: 10px 13px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.ficol-form-group input:focus,
.ficol-form-group select:focus,
.ficol-form-group textarea:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37,211,102,0.12);
}
.ficol-form-group small { font-size: 12px; color: #888; }
.ficol-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- STEP TITLES ---- */
.ficol-step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 17px; color: #2c3e50; }
.step-num { background: #25D366; color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }

/* ---- SHIPPING INFO BADGE ---- */
.ficol-shipping-info {
    background: #f0faf4;
    border: 1px solid #25D366;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
}
.shipping-cost { font-weight: 700; color: #25D366; font-size: 16px; }

/* ---- ORDER SUMMARY MINI ---- */
.ficol-order-summary-mini {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
}
.ficol-order-summary-mini h4 { margin: 0 0 12px; font-size: 15px; }
.summary-item { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #555; }

/* ---- SUCCESS HEADER ---- */
.ficol-success-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0faf4, #e8f8f0);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #b2dfdb;
}
.ficol-success-icon { font-size: 48px; margin-bottom: 8px; }
.ficol-success-header h3 { margin: 0 0 6px; color: #1e8449; font-size: 22px; }
.ficol-success-header p { margin: 4px 0; color: #444; }
.ficol-order-total-confirm { font-size: 18px; margin-top: 8px !important; }
.ficol-order-total-confirm strong { color: #25D366; }

/* ---- BANK CARDS ---- */
.ficol-bank-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.ficol-bank-card:hover { border-color: #25D366; }
.bank-name { font-weight: 700; font-size: 16px; color: #2c3e50; margin-bottom: 4px; }
.bank-acct-name { font-size: 13px; color: #666; margin-bottom: 6px; }
.bank-acct-num {
    font-size: 22px;
    font-weight: 700;
    color: #25D366;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.copy-hint { font-size: 12px; color: #aaa; font-weight: normal; letter-spacing: 0; }
.bank-acct-num.copied { color: #e74c3c; }
.bank-currency { font-size: 12px; background: #f0f0f0; color: #666; display: inline-block; padding: 2px 8px; border-radius: 4px; margin-top: 4px; }

/* ---- FILE UPLOAD ---- */
.ficol-file-drop {
    border: 2px dashed #c0e0d0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: #777;
    background: #fafffe;
}
.ficol-file-drop:hover { border-color: #25D366; background: #f0faf4; }
.file-drop-icon { font-size: 36px; margin-bottom: 8px; }
.file-drop-hint { font-size: 12px; color: #aaa; margin-top: 4px; }

/* ---- ALERTS ---- */
.ficol-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 12px 0;
    line-height: 1.5;
}
.ficol-alert-warning { background: #fff8e6; border: 1px solid #f39c12; color: #856404; }
.ficol-alert-info { background: #e8f4fd; border: 1px solid #3498db; color: #1a5276; }
.ficol-alert-success { background: #f0faf4; border: 1px solid #27ae60; color: #1e8449; }

/* ---- ERROR ---- */
.ficol-error {
    background: #fdf2f2;
    border: 1px solid #e74c3c;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 10px;
}

/* ---- EMPTY STATE ---- */
.ficol-empty-state { text-align: center; padding: 40px 20px; color: #888; }
.ficol-no-results { text-align: center; padding: 60px 20px; grid-column: 1 / -1; }
.ficol-no-results h3 { color: #666; margin-bottom: 8px; }

/* ---- ORDER TRACKER ---- */
.ficol-tracker-wrap { max-width: 780px; margin: 0 auto; }
.ficol-tracker-header { text-align: center; margin-bottom: 24px; }
.ficol-tracker-header h2 { color: #2c3e50; }
.ficol-tracker-form {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.ficol-track-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.ficol-track-meta { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; margin-bottom: 18px; }
.ficol-status-section { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.ficol-status-row { display: flex; flex-direction: column; gap: 6px; }
.ficol-status-label { font-size: 12px; color: #888; font-weight: 600; text-transform: uppercase; }
.ficol-status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
}
.status-pending { background: #f39c12; }
.status-processing { background: #3498db; }
.status-approved { background: #27ae60; }
.status-rejected { background: #e74c3c; }
.status-cancelled { background: #95a5a6; }
.status-delivered { background: #1abc9c; }

/* ---- PROGRESS STEPS ---- */
.ficol-progress-wrap { overflow-x: auto; padding-bottom: 4px; }
.ficol-progress-steps { display: flex; align-items: flex-start; min-width: 400px; }
.ficol-prog-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
    text-align: center;
    opacity: 0.35;
    transition: opacity 0.3s;
}
.ficol-prog-step.active, .ficol-prog-step.done { opacity: 1; }
.prog-icon { font-size: 24px; width: 48px; height: 48px; background: #f0f0f0; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 3px solid #e0e0e0; transition: border-color 0.3s, background 0.3s; }
.ficol-prog-step.active .prog-icon { border-color: #25D366; background: #f0faf4; }
.ficol-prog-step.done .prog-icon { border-color: #27ae60; background: #e8f8f0; }
.prog-label { font-size: 12px; font-weight: 600; color: #555; }
.prog-line { position: absolute; top: 24px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 3px; background: #e0e0e0; z-index: -1; transition: background 0.3s; }
.ficol-prog-step.done .prog-line { background: #27ae60; }

/* ---- ORDER ITEMS TABLE ---- */
.ficol-items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ficol-items-table th { background: #f5f5f5; padding: 10px; text-align: left; border-bottom: 2px solid #eee; }
.ficol-items-table td { padding: 10px; border-bottom: 1px solid #f0f0f0; }
.tr-total-row td { background: #f0faf4; font-size: 16px; }

/* ---- UPLOAD SECTION ---- */
.ficol-upload-section { margin: 20px 0; }
.ficol-upload-section h4 { margin: 0 0 8px; }
#ficol-upload-status, #tr-upload-status { padding: 10px 14px; border-radius: 8px; font-size: 14px; }

/* ---- PAYMENT INSTRUCTIONS ---- */
.ficol-payment-instructions { margin: 16px 0; }
.ficol-payment-instructions h4 { margin: 0 0 10px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
    .ficol-drawer { width: 100%; right: -100%; }
    .ficol-form-row { grid-template-columns: 1fr; }
    .ficol-products-grid { grid-template-columns: 1fr; }
    #ficol-cart-bubble { bottom: 16px; right: 16px; }
    .ficol-track-meta { flex-direction: column; gap: 8px; }
    .ficol-status-section { flex-direction: column; }
}
