/* ============================================================
   PINECONEBOX — Modern Dark Cart 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; }

/* ── CONTAINER ───────────────────────────────────────────── */
.container { max-width: 1140px; }
main { padding: 32px 0; }

/* ── HEADINGS ────────────────────────────────────────────── */
h1, h2, h3 { color: #f0f6fc; }
h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 24px; }
.text-muted { color: #8b949e !important; }

/* ── TABLES ──────────────────────────────────────────────── */
.table {
    color: #e6edf3 !important; background-color: #0d1117 !important;
    border-color: #30363d !important; margin-bottom: 0;
}
.table th, .table td {
    border-color: #30363d !important; padding: 12px 16px;
    font-size: 0.95rem; text-align: center; vertical-align: middle;
}
.table th { background-color: #161b22 !important; color: #f0f6fc !important; font-weight: 600; }
.table td { background-color: #0d1117 !important; color: #c9d1d9 !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; }

/* Cart item image */
.cart-item-image { border-radius: 8px; object-fit: contain; width: 80px; height: 80px; }
.cart-product-name { color: #58a6ff; font-size: 0.9rem; }
.cart-product-name:hover { color: #79c0ff; }

/* ── SUMMARY TABLE ───────────────────────────────────────── */
.summary-table {
    width: 100%; border-collapse: collapse; margin-top: 20px;
    border: 1px solid #30363d; border-radius: 10px; overflow: hidden;
}
.summary-table th, .summary-table td {
    padding: 12px 16px; border-bottom: 1px solid #21262d;
    font-size: 1rem; text-align: left; color: #c9d1d9;
}
.summary-table th { background: #161b22; color: #f0f6fc; font-weight: 600; width: 40%; }
.summary-table td { background: #0d1117; }
.summary-table .total-row th { background: #1a1f2b; color: #f7931a; font-size: 1.1rem; }
.summary-table .total-row td { background: #1a1f2b; color: #f7931a; font-weight: 700; font-size: 1.3rem; }

/* ── BUTTONS ─────────────────────────────────────────────── */
/* Update cart spacing */
form[method="post"] .btn-primary,
.btn-update-cart { margin-top: 16px; }
.btn-primary {
    background: #f7931a !important; border: none !important; color: #0d1117 !important;
    font-weight: 700 !important; padding: 8px 18px !important; font-size: 0.85rem !important;
}
.btn-primary:hover { background: #e08810 !important; }
.btn-secondary {
    background: #21262d !important; border: 1px solid #30363d !important; color: #c9d1d9 !important;
    font-size: 0.85rem !important; padding: 8px 18px !important;
}
.btn-secondary:hover { background: #30363d !important; }
.btn-danger {
    background: #21262d !important; border: 1px solid #30363d !important; color: #f85149 !important;
    padding: 6px 14px; font-size: 0.85rem;
}
.btn-danger:hover { background: #f85149 !important; color: #fff !important; }
.btn-sm { padding: 4px 8px !important; font-size: 0.8rem !important; }

/* ── QUANTITY INPUT ──────────────────────────────────────── */
.quantity-input {
    display: inline-flex; align-items: center; gap: 4px;
}
.quantity-input input {
    width: 50px; text-align: center; background: #0d1117; border: 1px solid #30363d;
    color: #c9d1d9; padding: 6px; border-radius: 4px; font-size: 0.9rem;
}
.quantity-input .btn-sm { min-width: 28px; }

/* ── COUPON SECTION ──────────────────────────────────────── */
.coupon-section {
    background: #161b22; border: 1px solid #30363d;
    padding: 16px; border-radius: 10px; margin-bottom: 20px;
}
.coupon-section h4 { color: #f0f6fc; font-size: 1rem; margin-bottom: 10px; }
#coupon_form { background: #0d1117; padding: 12px; border-radius: 8px; border: 1px solid #30363d; }
#coupon_form input[type="text"] {
    background: #0d1117; border: 1px solid #30363d; color: #c9d1d9;
    padding: 8px 12px; border-radius: 6px; font-size: 0.9rem;
}
#coupon_form input[type="text"]::placeholder { color: #8b949e; }
.form-control { background: #0d1117 !important; border-color: #30363d !important; color: #c9d1d9 !important; }
.form-control::placeholder { color: #8b949e !important; }
#coupon_form .btn { font-size: 0.85rem; padding: 8px 16px; }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert-info { background: #0d1a2d; border-color: #1f6feb; color: #58a6ff; }
.alert-success { background: #0a1a0a; border-color: #3fb950; color: #3fb950; }
.alert-warning { background: #1a1a0a; border-color: #f7931a; color: #f7931a; }
.alert-danger { background: #1a0a0a; border-color: #f85149; color: #f85149; }

/* ── EMPTY CART ──────────────────────────────────────────── */
.empty-cart {
    text-align: center; padding: 60px 20px;
    background: #161b22; border: 1px solid #30363d; border-radius: 12px;
}
.empty-cart i { font-size: 3rem; color: #8b949e; margin-bottom: 16px; }
.empty-cart h3 { color: #f0f6fc; margin-bottom: 8px; }
.empty-cart p { color: #8b949e; }

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

/* ── 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; }
    h1 { font-size: 1.4rem; }
    .table td { font-size: 0.8rem; }
    .table td .d-flex { font-size: 0.8rem; }
    .cart-item-image { width: 50px !important; height: 50px !important; }
    .table th, .table td { padding: 5px 6px; font-size: 0.65rem; }
    .cart-product-name { font-size: 0.62rem; }
    .summary-table th, .summary-table td { font-size: 0.9rem; padding: 8px 12px; }
    .summary-table .total-row td { font-size: 1.1rem; }
    .btn-primary { width: 100%; font-size: 0.85rem; padding: 10px 20px !important; }
}
