/* ==========================================================================
   EAZYFAST PRICE CATALOG STYLES
   ========================================================================== */

.ef-price-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    margin: 20px auto;
    max-width: 1280px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ==========================================
   HEADER & STATS DASHBOARD
   ========================================== */
.ef-price-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ef-price-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.ef-price-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin: 0 0 14px 0;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ef-price-subtitle strong {
    color: #166534;
}

.ef-sync-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 16px;
    font-size: 11.5px;
    color: #475569;
    font-weight: 500;
}

.ef-btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 2px 8px;
    border-radius: 16px;
    font-size: 11.5px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.ef-btn-refresh:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.ef-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ef-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ef-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.ef-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.ef-card-total .ef-stat-icon {
    background: #eff6ff;
    color: #2563eb;
}

.ef-card-ready .ef-stat-icon {
    background: #f0fdf4;
    color: #16a34a;
}

.ef-card-discount .ef-stat-icon {
    background: #fef2f2;
    color: #dc2626;
}

.ef-stat-info {
    display: flex;
    flex-direction: column;
}

.ef-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.ef-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-top: 2px;
}

/* ==========================================
   CONTROLS PANEL (SEARCH & FILTERS)
   ========================================== */
.ef-controls-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.ef-search-box {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.ef-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
}

.ef-search-input {
    width: 100% !important;
    padding: 9px 36px 9px 38px !important;
    font-size: 14px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.ef-search-input:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.ef-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
}

.ef-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.ef-filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ef-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ef-tab-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.ef-tab-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ef-tab-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.ef-tab-btn[data-filter="best-discount"].active {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.ef-sort-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.ef-sort-select {
    padding: 6px 12px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    font-size: 13px !important;
    color: #1e293b !important;
    cursor: pointer !important;
}

/* ==========================================
   RESULT INFO BAR
   ========================================== */
.ef-result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    padding: 0 4px;
}

.ef-result-info strong {
    color: #0f172a;
}

/* ==========================================
   DESKTOP TABLE (COMPACT)
   ========================================== */
.ef-table-responsive {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.ef-price-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin: 0;
}

.ef-price-table thead th {
    background: #f8fafc;
    padding: 9px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid #e2e8f0;
}

.ef-price-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.ef-price-table tbody tr:hover {
    background-color: #f8fafc;
}

.ef-price-table td {
    padding: 8px 12px;
    vertical-align: middle;
    font-size: 13px;
}

/* Kolom Foto */
.col-img {
    width: 56px;
    text-align: center;
}

.ef-thumb-wrap {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    cursor: pointer;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ef-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.ef-thumb-wrap:hover img {
    transform: scale(1.08);
}

/* Kolom Nama & Rak */
.col-name {
    min-width: 280px;
}

.ef-product-name {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ef-product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.ef-rak-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.ef-variant-badge {
    color: #64748b;
}

/* Kolom Stok */
.col-stock {
    width: 100px;
    white-space: nowrap;
}

.ef-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.ef-stock-pill.in-stock {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.ef-stock-pill.out-of-stock {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Kolom Marketplace & Web */
.col-shopee {
    width: 130px;
    white-space: nowrap;
}

.ef-shopee-price {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 13px;
    display: block;
}

.ef-shopee-label {
    font-size: 11px;
    color: #64748b;
}

.col-web {
    width: 170px;
    white-space: nowrap;
}

.ef-web-price {
    font-size: 15px;
    font-weight: 800;
    color: #166534;
    display: block;
    line-height: 1.2;
}

.ef-savings-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #dcfce7;
    color: #15803d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 3px;
}

/* Kolom Aksi */
.col-action {
    width: 120px;
    text-align: right;
}

.ef-btn-buy {
    background: #166534;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.ef-btn-buy:hover {
    background: #15803d;
    transform: translateY(-1px);
}

/* ==========================================
   MOBILE CARDS LIST VIEW (SUPER COMPACT)
   ========================================== */
.ef-cards-list {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.ef-product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ef-card-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8fafc;
}

.ef-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ef-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ef-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.ef-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.ef-card-meta .ef-stock-pill {
    padding: 1px 6px;
    font-size: 11px;
}

.ef-card-meta .ef-rak-badge {
    padding: 1px 5px;
    font-size: 11px;
}

.ef-card-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.ef-card-prices {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.ef-card-prices .ef-web-price {
    font-size: 14px;
    font-weight: 800;
    color: #166534;
}

.ef-card-prices .ef-shopee-price {
    font-size: 11.5px;
    color: #94a3b8;
    text-decoration: line-through;
}

.ef-card-prices .ef-savings-badge {
    font-size: 10px;
    padding: 1px 5px;
}

.ef-btn-buy-mini {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* ==========================================
   PAGINATION PANEL
   ========================================== */
.ef-pagination-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.ef-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.ef-per-page select {
    padding: 4px 8px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
}

.ef-page-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ef-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.ef-page-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.ef-page-btn.active {
    background: #166534;
    border-color: #166534;
    color: #ffffff;
}

.ef-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================
   LOADING & EMPTY STATE
   ========================================== */
.ef-loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.ef-spinner {
    width: 36px;
    height: 36px;
    border: 3.5px solid #e2e8f0;
    border-top-color: #166534;
    border-radius: 50%;
    margin: 0 auto 12px auto;
    animation: efSpin 0.8s linear infinite;
}

@keyframes efSpin {
    to { transform: rotate(360deg); }
}

.ef-empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ef-empty-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 12px;
    display: block;
}

.ef-empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.ef-empty-state p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px 0;
}

.ef-btn-reset {
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* ==========================================
   MODAL IMAGE PREVIEW
   ========================================== */
.ef-img-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ef-img-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.ef-img-modal-content {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.ef-img-modal-content img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 8px;
}

.ef-img-modal-content p {
    font-size: 13px;
    color: #334155;
    margin: 10px 0 0 0;
    font-weight: 600;
}

.ef-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */
/* ==========================================
   RESPONSIVE BREAKPOINTS (SUPER COMPACT MOBILE)
   ========================================== */
@media (max-width: 768px) {
    .ef-price-wrapper {
        padding: 0 8px !important;
        margin: 10px auto !important;
    }

    .ef-price-header {
        padding: 12px 14px !important;
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }

    .ef-price-title {
        font-size: 17px !important;
        margin-bottom: 4px !important;
    }

    .ef-price-subtitle {
        font-size: 12px !important;
        margin-bottom: 10px !important;
        gap: 6px !important;
    }

    .ef-sync-tag,
    .ef-btn-refresh {
        font-size: 10.5px !important;
        padding: 2px 7px !important;
    }

    /* Stats Grid: Horizontal Compact 3 Kolom */
    .ef-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    .ef-stat-card {
        padding: 8px 6px !important;
        border-radius: 8px !important;
        gap: 6px !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .ef-stat-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }

    .ef-stat-value {
        font-size: 14px !important;
        line-height: 1.1 !important;
    }

    .ef-stat-label {
        font-size: 9.5px !important;
        margin-top: 1px !important;
    }

    /* Controls Panel */
    .ef-controls-panel {
        padding: 10px 12px !important;
        margin-bottom: 10px !important;
        border-radius: 10px !important;
    }

    .ef-search-box {
        margin-bottom: 8px !important;
    }

    .ef-search-input {
        padding: 8px 32px 8px 36px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    .ef-search-icon {
        left: 12px !important;
        font-size: 14px !important;
    }

    .ef-clear-btn {
        right: 8px !important;
        width: 20px !important;
        height: 20px !important;
        font-size: 12px !important;
    }

    .ef-filters-row {
        gap: 8px !important;
    }

    .ef-filter-tabs {
        gap: 5px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 2px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .ef-tab-btn {
        padding: 5px 10px !important;
        font-size: 11.5px !important;
        border-radius: 14px !important;
    }

    .ef-sort-box {
        font-size: 11.5px !important;
        width: 100% !important;
        justify-content: space-between !important;
    }

    .ef-sort-select {
        padding: 4px 8px !important;
        font-size: 11.5px !important;
    }

    .ef-result-info {
        font-size: 11.5px !important;
        margin-bottom: 8px !important;
    }

    /* Switch dari Desktop Table ke Mobile Cards */
    .ef-table-responsive {
        display: none !important;
    }

    .ef-cards-list {
        display: flex !important;
        gap: 7px !important;
    }

    /* Pagination */
    .ef-pagination-panel {
        padding: 8px 12px !important;
        margin-top: 12px !important;
        gap: 8px !important;
    }

    .ef-per-page {
        font-size: 11.5px !important;
    }

    .ef-page-btn {
        min-width: 28px !important;
        height: 28px !important;
        font-size: 11.5px !important;
        padding: 0 6px !important;
    }
}
