/* ═══════════════════════════════════════════
   DewGas Product Filter — CSS v3
   Sparking18
═══════════════════════════════════════════ */

:root {
    --dgpf-red:       #E81F25;
    --dgpf-navy:      #1B2D4F;
    --dgpf-badge-bd:  #243A5E;
    --dgpf-badge-bg:  #F0F4FA;
    --dgpf-g100:      #F7F8FA;
    --dgpf-g200:      #EAECF0;
    --dgpf-g400:      #9AA3B0;
    --dgpf-g600:      #555F6D;
    --dgpf-g800:      #222B38;
    --dgpf-white:     #ffffff;
    --dgpf-ease:      0.2s ease;
    --dgpf-radius:    10px;
    --dgpf-max:       1280px;
}

.dg-pf-section {
    width: 100%;
    font-family: inherit;
}

.dg-pf-section * { box-sizing: border-box; }

/* ── Header ── */
.dg-pf-header {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 80px 40px;
}

.dg-pf-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--dgpf-navy);
    margin: 0;
}

/* ── Category Tabs ──
   font: 600 / 16px / 24px line-height / center  ── */
.dg-pf-tabs {
    max-width: var(--dgpf-max);
    margin: 0 auto;
    padding: 0 0px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
	overflow: scroll;
	scrollbar-width: thin;
    border-bottom: 1px solid var(--dgpf-g200);
}

.dg-pf-tab {
    padding: 8px 24px;
    border-radius: 6px;
    border: 1.5px solid var(--dgpf-g200);
    background: var(--dgpf-white);
    color: var(--dgpf-navy);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--dgpf-ease);
    white-space: nowrap;
}

.dg-pf-tab:hover {
    border-color: var(--dgpf-navy);
	background: var(--dgpf-navy);
}

.dg-pf-tab.active {
    background: var(--dgpf-navy);
    border-color: var(--dgpf-navy);
    color: var(--dgpf-white);
}

/* ── Mobile search row (search box + filter toggle) ──
   Hidden on desktop, shown only on mobile breakpoint ── */
.dg-pf-mobile-search-row {
    display: none;
}

.dg-pf-filter-toggle {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    border: none !important;
    background: var(--dgpf-white);
    color: var(--dgpf-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--dgpf-ease);
    padding: 0 !important;
}
.dg-pf-filter-toggle:hover { background: unset !important }
.dg-pf-filter-toggle svg { width: 40px; height: 40px; }

/* ── Body Wrapper ── */
.dg-pf-body {
    background: var(--dgpf-g100);
    padding: 72px 0 72px;
}

/* ── Banner — desktop height 230px ── */
.dg-pf-banner {
    margin-bottom: 24px;
}

.dg-pf-banner img {
    width: 100%;
    height: 230px !important;
    object-fit: cover;
    border-radius: var(--dgpf-radius) !important;
    display: block;
}

/* ── Layout: sidebar + grid ── */
.dg-pf-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
    position: relative;
}

/* ── Sidebar (desktop = static column) ── */
.dg-pf-sidebar {
    background: var(--dgpf-white);
    border-radius: var(--dgpf-radius);
    padding: 24px;
    border: 1px solid var(--dgpf-g200);
	position: sticky;
    top: 80px;
}

.dg-pf-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dg-pf-filters-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dgpf-navy);
    margin: 0 0 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--dgpf-g200);
    flex: 1;
}

/* Close (X) button — hidden on desktop, shown in mobile drawer */
.dg-pf-sidebar-close {
    display: none !important;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--dgpf-navy);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
}
.dg-pf-sidebar-close svg { width: 18px; height: 18px; }

.dg-pf-sidebar-scroll {
    /* on desktop this just flows normally; on mobile it becomes scrollable */
}

.dg-pf-search-wrap {
    position: relative;
    margin-bottom: 24px;
}

.dg-pf-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dgpf-g400);
    display: flex;
}

.dg-pf-search-icon svg { width: 16px; height: 16px; }

.dg-pf-search-wrap input {
    width: 100%;
    padding: 10px 14px 10px 38px !important;
    border: 1.5px solid var(--dgpf-g200) !important;
    border-radius: 6px !important;
    font-size: 14px;
    background: var(--dgpf-g100);
    outline: none;
    transition: border-color var(--dgpf-ease) !important;
}

.dg-pf-search-wrap input:focus {
    border-color: var(--dgpf-navy);
    background: var(--dgpf-white);
}

/* Mobile-only search (in the row above grid) hidden on desktop by default */
.dg-pf-search-wrap-mobile { margin-bottom: 0; flex: 1; }

.dg-pf-filter-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--dgpf-g200);
}

.dg-pf-filter-group:last-of-type {
    border-bottom: none;
}

.dg-pf-group-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dgpf-g800);
    margin: 0 0 12px;
}

.dg-pf-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
	font-weight: 500;
    color: var(--dgpf-g600);
    margin-bottom: 8px;
    cursor: pointer;
}

.dg-pf-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--dgpf-navy);
    cursor: pointer;
}

.dg-pf-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.dg-pf-btn {
    flex: 1;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--dgpf-ease);
    border: 1.5px solid transparent;
}

/* Red color usage — Clear button outline/text */
.dg-pf-btn-clear {
    background: var(--dgpf-white);
    border-color: var(--dgpf-red);
    color: var(--dgpf-red);
}
.dg-pf-btn-clear:hover { background: #fff;color: var(--dgpf-red); }
.dg-pf-btn-clear:active { background: #fff;color: var(--dgpf-red); }
.dg-pf-btn-clear:focus { background: #fff;color: var(--dgpf-red); }

/* Red color usage — Apply button fill */
.dg-pf-btn-apply {background: var(--dgpf-red);color: var(--dgpf-white);}
.dg-pf-btn-apply:hover {background: var(--dgpf-red);color: var(--dgpf-white);}
.dg-pf-btn-apply:active {background: var(--dgpf-red);color: var(--dgpf-white);}
.dg-pf-btn-apply:focus {background: var(--dgpf-red);color: var(--dgpf-white);}


/* ── Overlay behind mobile drawer — hidden by default ──
   Uses visibility (not display) so opacity transition
   can actually animate over its full duration. ── */
.dg-pf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.dg-pf-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ── Product Grid ── */
.dg-pf-grid-wrap { min-width: 0; }

.dg-pf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    min-height: 200px;
    transition: opacity var(--dgpf-ease);
}

.dg-pf-grid.is-loading { opacity: 0.4; pointer-events: none; }

.dg-pf-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

/* Red color usage — loading spinner accent */
.dg-pf-spinner {
    width: 38px; height: 38px;
    border: 3px solid var(--dgpf-g200);
    border-top-color: var(--dgpf-red);
    border-radius: 50%;
    animation: dgpf-spin 0.7s linear infinite;
}
@keyframes dgpf-spin { to { transform: rotate(360deg); } }

.dg-pf-card {
    background: var(--dgpf-white);
    border-radius: var(--dgpf-radius);
    overflow: hidden;
    border: 1px solid var(--dgpf-g200);
    transition: transform var(--dgpf-ease), box-shadow var(--dgpf-ease);
	min-height: 446px;
}
.dg-pf-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ── Product image — square shape ── */
.dg-pf-card-img {
    /*aspect-ratio: 1 / 1;*/
    width: 100%;
    background: var(--dgpf-g100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
}

.dg-pf-card-img a { display: block; width: 100%; height: 100%; }
.dg-pf-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 255px; }

.dg-pf-no-thumb {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--dgpf-navy), #152340);
}

.dg-pf-card-body { padding: 24px; }

/* ── Product title — 700 / 28px / 120% line-height ── */
.dg-pf-card-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2; /* 120% */
    letter-spacing: 0px;
    color: var(--dgpf-navy);
    margin: 0 0 8px;
}
.dg-pf-card-title a { color: inherit; text-decoration: none; }
.dg-pf-card-title a:hover { color: var(--dgpf-red); }

/* ── Product subtitle — 500 / 14px / 21px line-height ── */
.dg-pf-card-subtitle {
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    letter-spacing: 0px;
    color: var(--dgpf-g600);
    margin: 0;
}

.dg-pf-card-divider {
    border: none;
    border-top: 1px solid var(--dgpf-g200);
    margin: 16px 0 !important;
}

/* ── Badges row: ODP (first) + custom label (second) ──
   Same look/colors for both: border #243A5E, bg #F0F4FA ── */
.dg-pf-badges {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.dg-pf-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #243A5E;
    background: var(--dgpf-badge-bg);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--dgpf-badge-bd);
}
.dg-pf-badge strong { color: var(--dgpf-navy);font-size: 14px; font-weight: 600; }

.dg-pf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--dgpf-g600);
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .dg-pf-layout { grid-template-columns: 240px 1fr; gap: 20px; }
    .dg-pf-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE
   Sidebar becomes a bottom-sheet drawer
══════════════════════════════════════════ */
@media (max-width: 767px) {

    .dg-pf-header { padding: 24px 16px 16px; }

    .dg-pf-tabs {
        padding: 0 20px 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .dg-pf-tabs::-webkit-scrollbar { display: none; }

    /* Tabs font on mobile — 600 / 12px */
    .dg-pf-tab {
        flex-shrink: 0;
        font-size: 12px;
        font-weight: 600;
        line-height: normal;
        padding: 8px 16px;
    }

    /* Show mobile search row, hide desktop search wrap that's normally inside sidebar */
    .dg-pf-mobile-search-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px 20px;
        max-width: var(--dgpf-max);
        margin: 0 auto;
    }

    .dg-pf-search-wrap-desktop { display: none; }

    .dg-pf-body { padding: 0 0 40px; }
    .dg-pf-banner { margin-bottom: 16px; }

    /* Banner height on mobile — 120px */
    .dg-pf-banner img { height: 120px; }

    .dg-pf-layout {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .dg-pf-grid { grid-template-columns: 1fr; }

    /* Card title on mobile — 700 / 16px */
    .dg-pf-card-title {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
    }

    /* Card subtitle on mobile — 500 / 12px */
    .dg-pf-card-subtitle {
        font-size: 12px;
        font-weight: 500;
        line-height: 1.5;
    }

    /* ── Sidebar → Bottom Sheet Drawer ──
       Animation slowed to 1s open/close ── */
    .dg-pf-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 85vh;
        width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        border: none;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.25);
        z-index: 9999;
        transform: translateY(100%);
        transition: transform 1s cubic-bezier(0.32, 0.72, 0, 1);
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .dg-pf-sidebar.is-open {
        transform: translateY(0);
    }

    /* Drag handle bar at top of sheet */
    .dg-pf-sidebar::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: var(--dgpf-g200);
        border-radius: 4px;
        margin: 12px auto 4px;
        flex-shrink: 0;
    }

    .dg-pf-sidebar-head {
        padding: 8px 24px 0;
        flex-shrink: 0;
    }

    .dg-pf-filters-title {
        font-size: 20px;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .dg-pf-sidebar-close {
        display: flex !important;
		border: none !important;
		padding: 0 !important;
    }

    .dg-pf-sidebar-scroll {
        flex: 1;
        overflow-y: auto;
        padding: 20px 24px 0;
        -webkit-overflow-scrolling: touch;
    }

    .dg-pf-filter-actions {
        flex-shrink: 0;
        padding: 16px 24px;
        margin: 0;
        border-top: 1px solid var(--dgpf-g200);
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    /* Overlay timing matches the 1s drawer animation on mobile */
    .dg-pf-overlay {
        transition: opacity 1s ease, visibility 1s ease;
    }

    /* Lock body scroll while sheet open */
    body.dg-pf-drawer-open {
        overflow: hidden;
    }
	.dg-pf-card-body{padding: 12px 24px 24px}
	.dg-pf-card{min-height: 485px;}
	.dg-pf-card-img img{    min-height: 310px;}
	.dg-pf-badge{    font-size: 10px;}
	.dg-pf-badge strong{font-size: 10px;}
	.dg-pf-sidebar-close svg { width: 24px; height: 24px; }
}
