/* ═══════════════════════════════════════════════════════════
   GFG Listings — Frontend CSS  v1.0.5
   ═══════════════════════════════════════════════════════════ */

.gfg-listings-wrap *, .gfg-listings-wrap *::before, .gfg-listings-wrap *::after {
    box-sizing: border-box;
}

.gfg-listings-wrap {
    --gfg-accent:    #7F3AC6;
    --gfg-accent-dk: #6a2faa;
    --gfg-accent-lt: #f3eafd;
    --gfg-text:      #1a1a2e;
    --gfg-muted:     #6b7280;
    --gfg-border:    #e5e7eb;
    --gfg-bg:        #ffffff;
    --gfg-bg-alt:    #f9fafb;
    --gfg-radius:    8px;
    font-family: inherit;
    color: var(--gfg-text);
    font-size: 14px;
}

/* ════════════════════════════════
   FILTERS BAR
   ════════════════════════════════ */
.gfg-filters-bar {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px solid #e9d8fc;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(127,58,198,.07);
}
.gfg-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
}
.gfg-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.gfg-search-icon {
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    color: #7F3AC6;
    pointer-events: none;
    display: flex;
}
.gfg-search-input {
    padding-left: 34px !important;
    width: 160px;
}
.gfg-search-input, .gfg-select {
    height: 36px;
    padding: 0 8px;
    border: 1.5px solid var(--gfg-border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--gfg-bg);
    color: var(--gfg-text);
    transition: border-color .15s, box-shadow .15s;
    flex-shrink: 0;
}
.gfg-select { cursor: pointer; }
.gfg-search-input:focus, .gfg-select:focus {
    border-color: #7F3AC6;
    box-shadow: 0 0 0 3px rgba(127,58,198,.12);
    outline: none;
}

.gfg-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 0 14px; height: 36px;
    border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.gfg-btn-filter { background: #7F3AC6; color: #fff; }
.gfg-btn-filter:hover { background: #6a2faa; color: #fff; }
.gfg-btn-clear {
    background: var(--gfg-accent-lt); color: #7F3AC6;
    border: 1.5px solid #d4aeee;
}
.gfg-btn-clear:hover { background: #e8d4f8; }

.gfg-cart-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: #7F3AC6; color: #fff;
    border: none; border-radius: 20px;
    font-size: 12px; font-weight: 700;
    cursor: pointer; flex-shrink: 0;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(127,58,198,.30);
    transition: background .15s;
}
.gfg-cart-toggle:hover { background: #6a2faa; }
.gfg-cart-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: #fff; color: #7F3AC6;
    border-radius: 9px; font-size: 10px; font-weight: 800;
}

.gfg-icon-btn {
    background: none; border: none; cursor: pointer;
    color: var(--gfg-muted); padding: 2px;
    display: inline-flex; align-items: center;
    border-radius: 3px; transition: color .15s;
}
.gfg-icon-btn:hover { color: var(--gfg-text); }

.gfg-results-info {
    font-size: 13px; color: var(--gfg-muted);
    margin-bottom: 10px;
}
.gfg-results-info strong { color: var(--gfg-text); }

/* ════════════════════════════════
   TABLE — desktop/tablet
   ════════════════════════════════ */
.gfg-table-wrap {
    background: var(--gfg-bg);
    border: 1.5px solid var(--gfg-border);
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    width: 100%;
}

.gfg-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.gfg-table col.col-domain   { width: auto; }
.gfg-table col.col-category { width: 110px; }
.gfg-table col.col-dr       { width: 50px; }
.gfg-table col.col-traffic  { width: 80px; }
.gfg-table col.col-normal   { width: 105px; }
.gfg-table col.col-grey     { width: 105px; }
.gfg-table col.col-action   { width: 135px; }

.gfg-table thead tr {
    background: var(--gfg-bg-alt);
    border-bottom: 1.5px solid var(--gfg-border);
}
.gfg-table thead th {
    padding: 10px 12px;
    font-size: 11px; font-weight: 700;
    color: var(--gfg-muted);
    text-transform: uppercase; letter-spacing: .4px;
    white-space: nowrap; text-align: left;
}

.gfg-table tbody .gfg-row {
    border-bottom: 1px solid var(--gfg-border);
    transition: background .12s;
}
.gfg-table tbody .gfg-row:last-child { border-bottom: none; }
.gfg-table tbody .gfg-row:hover { background: #faf5ff; }

.gfg-table td {
    padding: 11px 12px;
    vertical-align: middle;
    font-size: 14px;
    color: var(--gfg-text);
    overflow: hidden;
}

.gfg-domain-name {
    display: flex; align-items: center; gap: 6px;
    font-weight: 700; word-break: break-word; line-height: 1.3;
}
.gfg-domain-icon { color: var(--gfg-muted); flex-shrink: 0; }

.gfg-cat-badge {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 4px;
    white-space: nowrap; line-height: 1.6;
}
.gfg-cat-technology { background: #dbeafe; color: #1e40af; }
.gfg-cat-crypto     { background: #fef3c7; color: #92400e; }
.gfg-cat-finance    { background: #d1fae5; color: #065f46; }
.gfg-cat-education  { background: #ede9fe; color: #5b21b6; }
.gfg-cat-general    { background: #f0f0f1; color: #374151; }

.gfg-row-stat          { font-weight: 700; white-space: nowrap; }
.gfg-row-na            { color: var(--gfg-muted); }
.gfg-row-price-normal  { font-weight: 700; white-space: nowrap; }
.gfg-row-price-grey    { font-weight: 700; color: #7F3AC6; white-space: nowrap; }
.gfg-row-action        { text-align: right; white-space: nowrap; padding-right: 16px !important; }

.gfg-btn-cart {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 0 12px; height: 32px;
    background: #7F3AC6; color: #fff;
    font-size: 12px; font-weight: 700;
    border: none; border-radius: 6px;
    cursor: pointer; white-space: nowrap;
    transition: background .15s;
}
.gfg-btn-cart:hover { background: #6a2faa; }
.gfg-btn-cart.gfg-in-cart { background: #16a34a; cursor: default; }
.gfg-btn-cart.gfg-in-cart:hover { background: #16a34a; }

.gfg-empty {
    text-align: center; padding: 40px 16px;
    color: var(--gfg-muted); font-size: 14px;
    border: 2px dashed var(--gfg-border);
    border-radius: var(--gfg-radius);
}

/* ── Pagination ── */
.gfg-pagination {
    display: flex; gap: 4px; justify-content: center;
    flex-wrap: wrap; margin: 16px 0;
}
.gfg-page-num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 8px;
    border: 1.5px solid var(--gfg-border); border-radius: var(--gfg-radius);
    font-size: 13px; color: var(--gfg-text); text-decoration: none;
    transition: background .12s;
}
.gfg-page-num:hover { background: var(--gfg-accent-lt); border-color: #d4aeee; }
.gfg-page-current   { background: #7F3AC6; color: #fff !important; border-color: #7F3AC6; }

/* ── Overlay ── */
.gfg-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9998; }
.gfg-overlay.gfg-active { display: block; }

/* ════════════════════════════════
   CART DRAWER
   ════════════════════════════════ */
.gfg-cart-drawer {
    position: fixed; top: 0; right: -360px;
    width: 340px; max-width: 95vw; height: 100vh;
    background: var(--gfg-bg); z-index: 9999;
    box-shadow: -2px 0 14px rgba(0,0,0,.12);
    transition: right .25s ease; display: flex; flex-direction: column;
}
.gfg-cart-drawer.gfg-open { right: 0; }
.gfg-cart-inner { display: flex; flex-direction: column; height: 100%; padding: 14px; }
.gfg-cart-head  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.gfg-cart-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.gfg-cart-items { flex: 1; overflow-y: auto; }
.gfg-cart-item  { display: flex; align-items: center; gap: 5px; padding: 6px 0; border-bottom: 1px solid var(--gfg-border); }
.gfg-cart-domain { flex: 1; font-size: 11px; font-weight: 600; word-break: break-all; }
.gfg-cart-price  { font-size: 11px; font-weight: 700; color: #16a34a; white-space: nowrap; }
.gfg-cart-remove:hover { color: #b32d2e !important; }
.gfg-cart-empty { color: var(--gfg-muted); text-align: center; padding: 16px 0; font-size: 12px; }
.gfg-cart-total { padding: 8px 0; border-top: 2px solid var(--gfg-text); font-size: 13px; }
.gfg-btn-request {
    width: 100%; margin-top: 8px; background: #7F3AC6; color: #fff;
    height: 38px; font-size: 13px; font-weight: 700;
    border: none; border-radius: var(--gfg-radius); cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: background .15s;
}
.gfg-btn-request:hover:not([disabled]) { background: #6a2faa; }
.gfg-btn-request[disabled] { background: #c3c4c7; cursor: not-allowed; }

/* ════════════════════════════════
   MODAL
   ════════════════════════════════ */
.gfg-modal { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; padding: 16px; }
.gfg-modal.gfg-open { display: flex; }
.gfg-modal-inner {
    background: var(--gfg-bg); border-radius: 10px;
    padding: 24px 28px; max-width: 520px; width: 100%;
    max-height: 90vh; overflow-y: auto; position: relative;
    box-shadow: 0 16px 48px rgba(0,0,0,.18);
    animation: gfgFadeIn .15s ease;
}
@keyframes gfgFadeIn { from { transform: translateY(-10px); opacity:0; } to { transform: none; opacity:1; } }
.gfg-modal-close {
    position: absolute; top: 12px; right: 12px;
    background: var(--gfg-bg-alt); border: none; border-radius: 50%;
    width: 28px; height: 28px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--gfg-text);
}
.gfg-modal-inner h2 { margin: 0 0 4px; font-size: 18px; }
.gfg-modal-inner > p { color: var(--gfg-muted); font-size: 12px; margin-bottom: 14px; }
.gfg-review-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 12px; }
.gfg-review-table th, .gfg-review-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--gfg-border); }
.gfg-review-table thead th { background: var(--gfg-bg-alt); font-weight: 600; }
.gfg-review-table tfoot th { border-top: 2px solid var(--gfg-text); font-weight: 700; }
.gfg-request-form { margin-top: 8px; }
.gfg-form-row { margin-bottom: 12px; }
.gfg-form-row label { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.gfg-required { color: #c0392b; }
.gfg-form-row input[type=email], .gfg-form-row textarea {
    width: 100%; padding: 8px 10px;
    border: 1.5px solid var(--gfg-border); border-radius: var(--gfg-radius);
    font-size: 13px; color: var(--gfg-text); background: var(--gfg-bg);
}
.gfg-form-row input[type=email]:focus, .gfg-form-row textarea:focus { border-color: #7F3AC6; outline: none; }
.gfg-privacy-note { font-size: 11px; color: var(--gfg-muted); margin-top: 6px; text-align: center; }
.gfg-btn-submit {
    width: 100%; background: #7F3AC6; color: #fff;
    height: 42px; font-size: 14px; font-weight: 700;
    border: none; border-radius: var(--gfg-radius); cursor: pointer; margin-top: 4px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: background .15s;
}
.gfg-btn-submit:hover { background: #6a2faa; }
#gfg-request-result { margin-bottom: 10px; }
.gfg-msg-success { background: #d1fae5; color: #065f46; border-radius: var(--gfg-radius); padding: 10px 14px; font-size: 13px; }
.gfg-msg-error   { background: #fee2e2; color: #991b1b; border-radius: var(--gfg-radius); padding: 10px 14px; font-size: 13px; }

/* ════════════════════════════════
   MOBILE  ≤ 640px — card layout
   ════════════════════════════════ */
@media (max-width: 640px) {

    /* Filter bar */
    .gfg-filter-form   { flex-wrap: wrap; }
    .gfg-search-wrap   { flex: 0 0 100%; }
    .gfg-search-input  { width: 100% !important; }
    .gfg-select        { flex: 1 1 calc(50% - 4px); min-width: 100px; }
    .gfg-btn-filter    { flex: 1 1 100%; justify-content: center; }
    .gfg-btn-clear     { flex: 1 1 100%; justify-content: center; }
    .gfg-cart-toggle   { margin-left: 0; flex: 0 0 100%; justify-content: center; }

    /* Kill the table structure */
    .gfg-table-wrap { overflow-x: visible; border-radius: 8px; background: transparent; border: none; box-shadow: none; }
    .gfg-table, .gfg-table tbody { display: block; width: 100%; }
    .gfg-table thead { display: none; }

    /* Each row = card */
    .gfg-table tbody tr.gfg-row {
        display: block !important;
        border: 1.5px solid var(--gfg-border);
        border-radius: 10px;
        margin-bottom: 10px;
        padding: 14px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,.05);
    }
    .gfg-table tbody tr.gfg-row:hover { background: #faf5ff; }

    /* All cells block by default */
    .gfg-table tbody tr.gfg-row td {
        display: block !important;
        width: 100% !important;
        padding: 0;
        overflow: visible;
        white-space: normal;
        border: none !important;
    }

    /* ── Row 1: Domain ── */
    .gfg-table tbody tr.gfg-row td.gfg-row-domain {
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--gfg-border) !important;
    }
    .gfg-domain-name { font-size: 14px; word-break: break-word; }

    /* ── Row 2: Stats grid (DR | Traffic | Category | Normal | Grey) ── */
    .gfg-table tbody tr.gfg-row td.gfg-row-stat,
    .gfg-table tbody tr.gfg-row td.gfg-row-category,
    .gfg-table tbody tr.gfg-row td.gfg-row-price-normal,
    .gfg-table tbody tr.gfg-row td.gfg-row-price-grey {
        display: inline-flex !important;
        flex-direction: column;
        width: auto !important;
        margin: 0 14px 8px 0;
        vertical-align: top;
    }

    /* Labels */
    .gfg-row-stat:nth-child(3)::before  { content: "DR";       font-size: 10px; font-weight: 700; color: var(--gfg-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
    .gfg-row-stat:nth-child(4)::before  { content: "Traffic";  font-size: 10px; font-weight: 700; color: var(--gfg-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
    .gfg-row-category::before           { content: "Category"; font-size: 10px; font-weight: 700; color: var(--gfg-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
    .gfg-row-price-normal::before       { content: "Normal";   font-size: 10px; font-weight: 700; color: var(--gfg-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
    .gfg-row-price-grey::before         { content: "Grey";     font-size: 10px; font-weight: 700; color: var(--gfg-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }

    /* ── Row 3: Add to Cart ── */
    .gfg-table tbody tr.gfg-row td.gfg-row-action {
        display: block !important;
        width: 100% !important;
        margin-top: 4px;
        padding-right: 0 !important;
    }
    .gfg-btn-cart {
        width: 100%;
        justify-content: center;
        height: 42px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* Cart drawer & modal */
    .gfg-cart-drawer { width: 100%; right: -100%; }
    .gfg-modal-inner { padding: 16px 14px; }
    .gfg-page-num    { min-width: 28px; height: 28px; font-size: 12px; }
}
