/* ============================================================
   PINECONEBOX — Modern Dark Product 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 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;
    text-decoration: none;
}
.navbar-brand img.logo-img {
    height: 36px;
    width: auto;
}
.navbar-brand span {
    color: #f0f6fc;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.nav-link {
    color: #c9d1d9 !important;
    font-size: 0.9rem;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: background 0.2s;
}
.nav-link:hover {
    background: #21262d;
    color: #f0f6fc !important;
}
.cart-icon {
    font-size: 1.4rem;
    color: #c9d1d9;
    position: relative;
    text-decoration: none;
}
.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;
}

/* ── CONTAINER & LAYOUT ──────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
main { padding: 32px 0 0 0; }

/* ── GALLERY ─────────────────────────────────────────────── */
.gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}
.thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}
.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #30363d;
    border-radius: 8px;
    cursor: pointer;
    background: #161b22;
    transition: border-color 0.2s, transform 0.2s;
    opacity: 0.7;
}
.thumbnail:hover,
.thumbnail.active {
    border-color: #f7931a;
    opacity: 1;
    transform: scale(1.05);
}
.main-image {
    flex: 1;
    text-align: center;
    border: 1px solid #30363d;
    border-radius: 12px;
    background: #161b22;
    overflow: hidden;
    aspect-ratio: 600 / 420;
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ── PRODUCT TITLE ───────────────────────────────────────── */
.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 6px;
    line-height: 1.3;
}

/* ── ALGO / COIN BADGES ──────────────────────────────────── */
.algo-coin-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.algo-badge, .coin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.algo-badge { background: #1a2332; color: #58a6ff; border: 1px solid #1f6feb33; }
.coin-badge  { background: #1a231a; color: #3fb950; border: 1px solid #3fb95033; }

/* ── RATING ──────────────────────────────────────────────── */
.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.product-rating .stars { color: #f7931a; font-size: 1.1rem; letter-spacing: 2px; }
.product-rating .rating-num { font-weight: 600; color: #f0f6fc; font-size: 0.95rem; }
.product-rating .review-count { color: #8b949e; font-size: 0.85rem; }

/* ── STAT BADGES ─────────────────────────────────────────── */
.stat-badge {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #c9d1d9;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
}
.stat-badge-green {
    border-color: rgba(63, 185, 80, 0.3);
    color: #3fb950;
}

/* ── PRICE ───────────────────────────────────────────────── */
.price-block {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.price-main {
    font-size: 36px;
    font-weight: 800;
    color: #f7931a;
    line-height: 1;
}
.price-per-unit {
    color: #8b949e;
    font-size: 0.85rem;
    margin-top: 4px;
}
.price-btc {
    color: #8b949e;
    font-size: 0.85rem;
    margin-top: 6px;
}
.price-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #30363d;
    font-size: 0.9rem;
    color: #e6edf3;
}
.price-shipping { margin-left: auto; }

/* ── GLOBAL DISCOUNT / SALE PRICE ────────────────────────── */
.sale-price { color: #ff6b6b; display: inline !important; }
.old-price {
    display: inline;
    font-size: 1.4rem;
    color: #b0b8c0;
    text-decoration: line-through;
    margin-left: 12px;
}
.discount-badge {
    display: inline-block;
    background: #d32f2f;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.detail-gallery-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    font-size: 1.2rem;
    padding: 6px 16px;
    margin-bottom: 0;
}

/* ── QUANTITY & ADD TO CART ──────────────────────────────── */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.quantity-section label {
    font-weight: 600;
    color: #c9d1d9;
    font-size: 0.9rem;
}
.quantity-input {
    display: flex;
    align-items: center;
}
.quantity-input button {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.quantity-input button:hover { background: #30363d; }
.quantity-input button:first-child { border-radius: 6px 0 0 6px; }
.quantity-input button:last-child  { border-radius: 0 6px 6px 0; }
.quantity-input input {
    width: 56px;
    text-align: center;
    border: 1px solid #30363d;
    border-left: none;
    border-right: none;
    background: #0d1117;
    color: #f0f6fc;
    font-size: 1rem;
    padding: 8px 0;
}

.btn-add-to-cart {
    display: block;
    width: 100%;
    padding: 14px;
    background: #f7931a;
    color: #0d1117;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-add-to-cart:hover { background: #e08810; transform: translateY(-1px); }
.btn-add-to-cart:active { transform: translateY(0); }

/* ── DESCRIPTION ─────────────────────────────────────────── */
.description-box {
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 20px;
    background: #161b22;
    margin: 24px 0;
}
.description-box h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 12px;
}
.product-details-text {
    font-size: 0.95rem;
    color: #8b949e;
    line-height: 1.7;
}

/* ── SPECIFICATIONS TABLE ────────────────────────────────── */
.specs-section { margin: 24px 0; }
.specs-section h3 { font-size: 1.1rem; font-weight: 700; color: #f0f6fc; margin-bottom: 12px; }
.specs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #30363d;
    border-radius: 10px;
    overflow: hidden;
}
.specs-table th, .specs-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #21262d;
    font-size: 0.9rem;
}
.specs-table th {
    background: #161b22;
    color: #f0f6fc;
    font-weight: 600;
    width: 140px;
}
.specs-table td { color: #8b949e; }
.specs-table tr:last-child td, .specs-table tr:last-child th { border-bottom: none; }
.specs-table tr:hover td { background: #161b22; }

/* ── REVIEWS ─────────────────────────────────────────────── */
.reviews-section { margin: 32px 0; }
.reviews-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 16px;
}
.rating-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 20px;
    background: #161b22;
    border-radius: 12px;
    border: 1px solid #30363d;
    max-width: 440px;
}
.rating-summary .big-rating {
    font-size: 2.8rem;
    font-weight: 800;
    color: #f7931a;
    line-height: 1;
}
.rating-summary .rating-stars {
    color: #f7931a;
    font-size: 1.2rem;
    margin: 6px 0;
}
.rating-summary .rating-total {
    color: #8b949e;
    font-size: 0.85rem;
}
.rating-bars { flex: 1; min-width: 200px; }
.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.rating-bar-row .bar-label {
    width: 55px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #c9d1d9;
}
.rating-bar-row .bar-track {
    flex: 1;
    height: 12px;
    background: #21262d;
    border-radius: 6px;
    overflow: hidden;
}
.rating-bar-row .bar-fill {
    height: 12px;
    background: #f7931a;
    border-radius: 6px;
}
.rating-bar-row .bar-pct {
    width: 32px;
    font-size: 0.78rem;
    color: #8b949e;
    text-align: right;
}

/* Review Cards Grid */
.review-card-inner {
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 16px;
    background: #161b22;
    height: 100%;
}
.review-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.review-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.review-name {
    font-weight: 600;
    color: #f0f6fc;
    font-size: 0.9rem;
}
.review-date {
    margin-left: auto;
    color: #8b949e;
    font-size: 0.78rem;
}
.review-stars {
    color: #f7931a;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.review-text {
    color: #8b949e;
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
}

.btn-show-reviews {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    color: #f7931a;
    border: 1px solid #f7931a;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
}
.btn-show-reviews:hover {
    background: #f7931a;
    color: #0d1117;
}

/* ── INFO BOXES (NOTE, GUIDELINES) ──────────────────────── */
.info-box {
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-left: 4px solid;
}
.info-box.note   { background: #1a1a0a; border-color: #f7931a; }
.info-box.guide  { background: #0a1a1a; border-color: #58a6ff; }
.info-box h4 { margin: 0 0 8px 0; font-size: 0.95rem; font-weight: 700; color: #f0f6fc; }
.info-box ul { margin: 0; padding-left: 20px; color: #8b949e; font-size: 0.85rem; }
.info-box li { margin-bottom: 4px; }

/* ── 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; }

/* ── FLY TO CART ─────────────────────────────────────────── */
.fly-to-cart {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    opacity: 1;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
    border-radius: 8px;
}

/* ── 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;
    }
    .gallery { flex-direction: column; }
    .thumbnails { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .thumbnail { width: 56px; height: 56px; }
    .detail-gallery-badge {
        font-size: 1.1rem;
        padding: 4px 10px;
        top: 8px;
        left: 8px;
    }
}
/* ── RELATED PRODUCTS ──────────────────────────────────── */
.related-product-card .card {
    transition: border-color 0.2s, transform 0.2s;
}
.related-product-card:hover .card {
    border-color: #f7931a;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .product-title { font-size: 22px; }
    .main-image { height: 300px; min-height: 300px; max-height: 300px; }
    .price-meta { font-size: 0.75rem; }
    .price-main { font-size: 28px; }
    .rating-summary { max-width: 100%; }
    .gallery { flex-direction: column; }
    .thumbnails {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .thumbnail { width: 50px; height: 50px; flex-shrink: 0; }
    .navbar-brand img.logo-img { height: 28px; }
}

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

/* ═══════════════════════════════════════════════════════════
   PROFITABILITY SECTION
   ═══════════════════════════════════════════════════════════ */
.profitability-section {
    margin: 32px 0; padding: 24px;
    background: #161b22; border: 1px solid #30363d; border-radius: 12px;
}
.profitability-section .section-title {
    font-size: 1.3rem; font-weight: 700; color: #f0f6fc;
    margin: 0 0 20px 0; padding-bottom: 12px;
    border-bottom: 1px solid #30363d;
}

/* ── Profit / Electricity bar ──────────────────────────── */
.profit-bar-wrap { margin-bottom: 24px; }
.profit-bar {
    width: 100%; height: 14px; background: #21262d;
    border-radius: 7px; display: flex; overflow: hidden;
}
.profit-bar-fill { height: 100%; transition: width 0.5s ease; }
.profit-fill { background: #4CAF50; }
.elec-fill  { background: #ff6f61; }
.profit-bar-labels {
    display: flex; justify-content: space-between;
    font-size: 0.85rem; margin-top: 6px;
}
.profit-label { color: #4CAF50; font-weight: 600; }
.elec-label  { color: #ff6f61; font-weight: 600; }

/* ── Chart ──────────────────────────────────────────────── */
.chart-container {
    background: #0d1117; border: 1px solid #30363d;
    border-radius: 10px; padding: 16px; margin-bottom: 24px;
    position: relative;
}
.chart-container canvas { max-height: 350px; }
.chart-range-btns {
    display: flex; gap: 6px; margin-bottom: 12px;
}
.chart-range-btn {
    background: #21262d; border: 1px solid #30363d; color: #8b949e;
    padding: 5px 14px; border-radius: 6px; font-size: 0.8rem;
    font-weight: 600; cursor: pointer;
}
.chart-range-btn:hover { border-color: #f7931a; color: #f7931a; }
.chart-range-btn.active { background: #f7931a; border-color: #f7931a; color: #0d1117; }

/* ── Profitability table ────────────────────────────────── */
.profit-table-wrap { overflow-x: auto; margin-bottom: 12px; }
.profit-table {
    width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.profit-table th,
.profit-table td {
    padding: 10px 14px; text-align: center;
    border: 1px solid #30363d;
}
.profit-table thead th {
    background: #21262d; color: #f0f6fc; font-weight: 700;
}
.profit-table td { color: #c9d1d9; }
.profit-table td.green { color: #3fb950; font-weight: 600; }
.profit-table td.red   { color: #ff6f61; font-weight: 600; }
.profit-table td small { display: block; color: #8b949e; font-weight: 400; font-size: 0.75rem; }
.profit-table .profit-row td {
    font-size: 1rem; font-weight: 700; color: #0d1117;
}
.profit-table .profit-row td:first-child { border-radius: 0; }

.profit-note { text-align: center; color: #8b949e; margin: 0; }

/* ── ROI Line ──────────────────────────────────────── */
.roi-line {
    display: flex; gap: 24px; justify-content: center;
    margin: 12px 0 16px; flex-wrap: wrap;
}
.roi-item-wrap {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; background: #21262d;
    border: 1px solid #30363d; border-radius: 8px;
}
.roi-badge {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px;
}
.roi-gross { color: #fff; background: #1a7a2e; }
.roi-net   { color: #fff; background: #c0392b; }
.roi-value { font-size: 1.1rem; font-weight: 700; color: #f0f6fc; }
.roi-desc  { font-size: 0.72rem; color: #8b949e; }

@media (max-width: 576px) {
    .profitability-section { padding: 16px; }
    .profit-table { font-size: 0.78rem; }
    .profit-table th, .profit-table td { padding: 6px 8px; }
}

/* ═══════════════════════════════════════════════════════════
   FAQ SECTION
   ═══════════════════════════════════════════════════════════ */
.faq-section .section-title {
    font-size: 1.3rem; font-weight: 700; color: #f0f6fc;
    margin: 0 0 16px 0; padding-bottom: 12px;
    border-bottom: 1px solid #30363d;
}
.faq-section .accordion-item {
    background: #161b22; border: 1px solid #30363d;
    margin-bottom: 8px; border-radius: 8px !important;
    overflow: hidden;
}
.faq-section .accordion-button {
    background: #161b22; color: #c9d1d9;
    font-weight: 600; font-size: 0.95rem;
    padding: 14px 18px; box-shadow: none !important;
}
.faq-section .accordion-button:not(.collapsed) {
    background: #21262d; color: #f7931a;
}
.faq-section .accordion-button::after {
    filter: invert(0.6);
}
.faq-section .accordion-body {
    background: #0d1117; color: #c9d1d9;
    padding: 14px 18px; font-size: 0.9rem; line-height: 1.7;
    border-top: 1px solid #30363d;
}
.faq-section .accordion-body strong { color: #f7931a; }

/* ── Cooling badge (product page) ───────────────────── */
.cooling-badge {
    display: inline-flex !important; align-items: center; gap: 6px;
    background: rgba(22,27,34,0.95); border: 1px solid #30363d;
    padding: 4px 10px; border-radius: 6px; font-size: 0.8rem;
    color: #e6edf3 !important; font-weight: 600; white-space: nowrap;
}
.cooling-badge img { width: 16px; height: 16px; filter: brightness(0) invert(1) !important; }
.faq-section .accordion-collapse { border: none; }
