/* ============================================================
   PINECONEBOX — Modern Dark Shop Page Theme
   ============================================================ */

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #58a6ff; text-decoration: none; }
a:hover { color: #79c0ff; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
    background: #161b22 !important;
    border-bottom: 1px solid #30363d;
    padding: 0; margin-bottom: 0; height: 60px;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-brand img.logo-img { height: 36px; width: auto; }
.navbar-brand span { color: #f0f6fc; font-size: 14px; font-weight: 700; }
.nav-link { color: #c9d1d9 !important; font-size: 0.9rem; padding: 8px 14px !important; border-radius: 6px; }
.nav-link:hover { background: #21262d; color: #f0f6fc !important; }
.cart-icon { font-size: 1.4rem; color: #c9d1d9; position: relative; }
.cart-icon:hover { color: #f7931a; }
.cart-badge {
    background: #f7931a; color: #0d1117; font-size: 0.7rem; font-weight: 700;
    border-radius: 50%; min-width: 20px; min-height: 20px;
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: -8px; right: -12px; padding: 2px;
}
.navbar-toggler { border: none; color: #c9d1d9; font-size: 1.5rem; }

/* ── BREADCRUMB ──────────────────────────────────────────── */
.breadcrumb { background: transparent; padding: 12px 0; }
.breadcrumb-item a { color: #8b949e; }
.breadcrumb-item.active { color: #f7931a; }

/* ── FILTER SIDEBAR ──────────────────────────────────────── */
.filter-sidebar {
    background: #161b22; border: 1px solid #30363d; border-radius: 12px; overflow: hidden;
}
.filter-sidebar .card-header {
    background: #161b22; border-bottom: 1px solid #30363d; padding: 14px 16px;
}
.filter-sidebar .card-header h5 { color: #f0f6fc; font-size: 1rem; }
.filter-sidebar .card-body { background: #0d1117; }
.filter-section { border-bottom: 1px solid #21262d; padding: 14px 16px; }
.filter-section:last-child { border-bottom: none; }
.filter-label {
    color: #f0f6fc; font-size: 0.85rem; font-weight: 700; margin: 0 0 10px 0;
    text-transform: uppercase; letter-spacing: 1px;
    padding: 8px 12px; background: #1a1f2b;
    border-left: 3px solid #f7931a; border-radius: 0 6px 6px 0;
    display: block;
}
.filter-options { padding: 0; }
.filter-checkbox {
    display: flex; align-items: center; gap: 8px; width: fit-content;
    padding: 4px 0; cursor: pointer; color: #c9d1d9; font-size: 0.85rem;
}
.filter-checkbox input[type="checkbox"] { accent-color: #f7931a; width: 16px; height: 16px; }
.filter-checkbox:hover { color: #f0f6fc; }
.filter-count { color: #888; font-size: 0.75rem; font-weight: 400; }
.filter-range { padding: 4px 0; }
.filter-price-input {
    background: #0d1117; border: 1px solid #30363d; color: #c9d1d9;
    padding: 6px 10px; border-radius: 6px; font-size: 0.85rem; width: 100%;
}
.filter-price-input:focus { border-color: #f7931a; outline: none; }
.filter-input {
    background: #0d1117; border: 1px solid #30363d; color: #c9d1d9;
    padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; width: 100%;
}
.filter-input:focus { border-color: #f7931a; outline: none; }
.btn-reset {
    background: transparent; border: 1px solid #f7931a; color: #f7931a;
    padding: 8px 16px; border-radius: 6px; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; width: 100%; transition: background 0.2s, color 0.2s;
}
.btn-reset:hover { background: #f7931a; color: #0d1117; }
.filter-section--reset { padding: 12px 16px; border-bottom: none; }

/* ── ALGO / COIN BADGES ──────────────────────────────────── */
.algo-coin-line {
    position: absolute; top: 8px; left: 8px;
    display: flex; flex-wrap: wrap; gap: 4px; z-index: 3;
}
.algo-badge, .coin-badge {
    display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 0.65rem; font-weight: 600;
}
.algo-badge { background: #1a2332; color: #58a6ff; border: 1px solid #1f6feb33; }
.coin-badge  { background: #1a231a; color: #3fb950; border: 1px solid #3fb95033; }

/* ── PRODUCT CARDS ───────────────────────────────────────── */
.product-card {
    background: #161b22; border: 1px solid #30363d; border-radius: 12px;
    overflow: hidden; transition: border-color 0.2s, transform 0.2s;
    height: 100%; position: relative;
    display: flex; flex-direction: column;
    padding-top: 40px !important;
}
.product-card:hover { border-color: #f7931a; transform: translateY(-4px); }
.product-card > a { margin: auto 0; display: block; width: 100%; }
.product-card .carousel-item.active { display: flex; align-items: center; justify-content: center; height: 200px; }
.product-card .product-title {
    font-size: 1rem; font-weight: 700; color: #f0f6fc; margin: 8px 0 4px; text-align: center;
}
.product-card .efficiency {
    text-align: center; font-size: 0.8rem; color: #8b949e; margin-bottom: 6px;
}
.product-card .cooling-badge {
    position: absolute; top: 8px; right: 8px;
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(22, 27, 34, 0.95); border: 1px solid #30363d;
    padding: 3px 8px; border-radius: 6px; font-size: 0.7rem;
    color: #e6edf3 !important; font-weight: 600; z-index: 2; white-space: nowrap;
}
.product-card .cooling-badge img { width: 14px; height: 14px; filter: brightness(0) invert(1) !important; }
.product-card .cooling-badge span { color: #e6edf3 !important; }

.product-card-bottom { margin-top: auto; }
.price { text-align: center; margin: 0 0 8px 0; }
.price-value { color: #f7931a; font-size: 1.2rem; font-weight: 800; display: block; }
.price-per-unit { display: block; color: #8b949e; font-size: 0.75rem; margin-top: 2px; }
.price-per-unit .unit-text { color: #8b949e; }
.price-per-unit .unit-value { color: #c9d1d9; font-weight: 600; }

/* ── GLOBAL DISCOUNT / SALE PRICE ────────────────────────── */
.sale-price { color: #ff6b6b; display: inline !important; }
.old-price {
    font-size: 1rem;
    color: #b0b8c0;
    text-decoration: line-through;
    margin-left: 8px;
}
.discount-badge {
    display: inline-block;
    background: #d32f2f;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.shop-img-badge {
    position: absolute;
    z-index: 4;
    /* Mobile */
    top: -55px;
    left: -2px;
    font-size: 1.1rem;
    padding: 2px 8px;
}
@media (min-width: 768px) {
    .shop-img-badge {
        /* Desktop */
        top: -35px;
        left: 2px;
        font-size: 0.9rem;
        padding: 5px 12px;
    }
}

.btn-add-to-cart {
    display: block; width: calc(100% - 32px); margin: 8px 16px 16px;
    padding: 12px; background: #f7931a; color: #0d1117;
    border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 700;
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px;
    transition: background 0.2s;
}
.btn-add-to-cart:hover { background: #e08810; }

/* Pagination */
.btn-primary { background: #f7931a !important; border: none !important; color: #0d1117 !important; font-weight: 700 !important; }
.btn-primary:hover { background: #e08810 !important; }
.btn-outline-secondary { background: #21262d !important; border-color: #30363d !important; color: #c9d1d9 !important; }
.btn-outline-secondary:hover { background: #30363d !important; }
.pagination .page-link { background: #161b22; border-color: #30363d; color: #c9d1d9; }
.pagination .page-link:hover { background: #21262d; color: #f7931a; }
.pagination .active .page-link { background: #f7931a; border-color: #f7931a; color: #0d1117; font-weight: 700; }

/* ── FLY TO CART ─────────────────────────────────────────── */
.fly-to-cart {
    position: fixed; z-index: 10000; pointer-events: none; opacity: 1;
    object-fit: contain; border-radius: 8px; box-shadow: 0 4px 20px rgba(247,147,26,0.5);
    transition: left 1s ease-in-out,
                top 1s ease-in-out,
                width 1s ease-in-out,
                height 1s ease-in-out,
                opacity 1s ease-in-out,
                border-radius 1s ease-in-out;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
    background: #161b22; border-top: 1px solid #30363d;
    padding: 24px 0; margin-top: 40px; text-align: center;
}
footer p { margin: 4px 0; color: #8b949e; font-size: 0.85rem; }
footer a { color: #8b949e; }
footer a:hover { color: #f7931a; }

/* ── BOOTSTRAP TABLE OVERRIDE ────────────────────────────── */
.table, .table-striped, .table-bordered {
    color: #e6edf3 !important; background-color: #0d1117 !important; border-color: #30363d !important;
}
.table th, .table td { border-color: #30363d !important; padding: 10px 14px; font-size: 0.88rem; }
.table th { background-color: #161b22 !important; color: #58a6ff !important; font-weight: 600; }
.table td { background-color: #0d1117 !important; color: #e6edf3 !important; }
.table-striped tbody tr:nth-of-type(odd) td { background-color: #161b22 !important; }
.table-striped tbody tr:nth-of-type(even) td { background-color: #0d1117 !important; }
.table tbody tr:hover td { background-color: #1c2333 !important; }

/* ── OFFCAVAS (MOBILE FILTERS) ───────────────────────────── */
.offcanvas { background: #0d1117 !important; color: #c9d1d9 !important; }
.offcanvas-header { background: #161b22; border-bottom: 1px solid #30363d; }
.offcanvas-title { color: #f0f6fc !important; }
.offcanvas-body { background: #0d1117; }
.offcanvas .btn-close { filter: invert(1); }

/* ── SHOP TOOLBAR (Sort + Per‑page) ─────────────────────── */
.shop-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
    padding: 12px 16px; background: #161b22;
    border: 1px solid #30363d; border-radius: 10px;
}
.shop-toolbar-left { display: flex; align-items: center; }
.shop-count { color: #8b949e; font-size: 0.85rem; }
.shop-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-toolbar-label {
    color: #8b949e; font-size: 0.82rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.shop-toolbar-select {
    background: #0d1117; border: 1px solid #30363d; color: #c9d1d9;
    padding: 6px 28px 6px 10px; border-radius: 6px; font-size: 0.85rem;
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
}
.shop-toolbar-select:focus { border-color: #f7931a; outline: none; }

/* ── PAGINATION ─────────────────────────────────────────── */
.shop-pagination {
    display: flex; justify-content: center; gap: 6px;
    margin-top: 24px; padding: 12px 0;
}
.shop-page-btn {
    background: #161b22; border: 1px solid #30363d; color: #c9d1d9;
    padding: 8px 14px; border-radius: 6px; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; min-width: 40px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.shop-page-btn:hover { background: #21262d; border-color: #f7931a; color: #f7931a; }
.shop-page-btn.active {
    background: #f7931a; border-color: #f7931a; color: #0d1117; font-weight: 700;
}

.hidden-by-page { display: none !important; }

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 992px) {
    .navbar .container { flex-wrap: wrap; }
    .navbar-brand { order: 0; margin-right: auto; }
    .navbar-toggler { order: 1; margin-left: 10px; }
    .cart-icon { order: 2; margin-left: auto; }
    .navbar-collapse { order: 3; width: 100%; text-align: center; background: #161b22; }
    .navbar-nav { flex-direction: column; gap: 4px; padding: 10px 0; }
}
@media (max-width: 768px) {
    .navbar-brand img.logo-img { height: 28px; }
    .product-title { font-size: 0.9rem; }
    .filter-sidebar { margin-bottom: 16px; }
}
/* ── COMPARE ───────────────────────────────────────────── */
.compare-float {
    position: fixed; bottom: 20px; right: 20px; z-index: 1050;
    background: #f7931a; color: #0d1117; padding: 12px 20px;
    border-radius: 50px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 20px rgba(247,147,26,0.4);
    display: flex; align-items: center; gap: 8px; transition: transform 0.2s;
}
.compare-float:hover { transform: scale(1.05); }
.btn-compare {
    display: inline-block; padding: 4px 12px; font-size: 0.7rem;
    border: 1px solid #f7931a; color: #f7931a; background: transparent;
    border-radius: 4px; cursor: pointer; transition: all 0.2s;
    margin-left: 4px;
}
.btn-compare:hover { background: #f7931a; color: #0d1117; }
#compareTable th, #compareTable td { vertical-align: middle; text-align: center; font-size: 0.85rem; }
#compareTable thead th {
    vertical-align: top;
    position: relative;
    padding-bottom: 38px;
}
#compareTable thead th .btn {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}
#compareTable .best { color: #3fb950 !important; font-weight: 700; }
#compareTable th .text-info { font-size: 0.7rem; word-break: break-word; }
#compareTable th img { height: 55px; object-fit: contain; }
@media (max-width: 768px) {
    #compareTable th, #compareTable td { font-size: 0.65rem; padding: 3px 4px; }
    #compareTable th:first-child, #compareTable td:first-child { min-width: 50px; max-width: 60px; }
    #compareTable th { min-width: 80px; max-width: 120px; }
    #compareTable th img { height: 28px !important; }
    #compareTable .text-info { font-size: 0.55rem; }
    #compareTable { table-layout: fixed; width: 100%; }
}
#compareTable th:first-child, #compareTable td:first-child { text-align: left; background: #161b22; }
