/* ============================================================
   Bless-Palm Soft - Earth Tones Theme
   Green / Brown / Yellow / Orange / Warm Gray
   ============================================================ */

:root {
    --bp-primary: #4a7c59;        /* Forest Green */
    --bp-primary-dark: #3a6147;
    --bp-primary-light: #6a9b78;
    --bp-secondary: #8b6f47;      /* Warm Brown */
    --bp-accent: #e8a838;         /* Golden Yellow */
    --bp-warm: #d87c3d;           /* Warm Orange */
    --bp-bg: #f5f1e8;             /* Warm Cream */
    --bp-gray: #e8e4da;           /* Light Taupe */
    --bp-gray-dark: #b8b0a0;
    --bp-text: #3d3832;
    --bp-text-muted: #7a7065;
}

body {
    font-family: 'Sarabun', 'Segoe UI', sans-serif;
    background: var(--bp-bg);
    color: var(--bp-text);
}

/* ===== Navbar ===== */
.bg-gradient-primary {
    background: var(--bp-primary) !important;
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.15);
}

.navbar-brand {
    color: #fff !important;
    font-weight: 700;
}
.navbar-brand .text-warning {
    color: var(--bp-accent) !important;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color .2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--bp-accent) !important;
}

.navbar .badge.bg-warning {
    background: var(--bp-warm) !important;
    color: #fff !important;
}

/* ===== Buttons ===== */
.btn-primary {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--bp-primary-dark);
    border-color: var(--bp-primary-dark);
    color: #fff;
}

.btn-warning {
    background: var(--bp-accent);
    border-color: var(--bp-accent);
    color: #fff;
    font-weight: 600;
}
.btn-warning:hover, .btn-warning:focus {
    background: var(--bp-warm);
    border-color: var(--bp-warm);
    color: #fff;
}

.btn-outline-primary {
    color: var(--bp-primary);
    border-color: var(--bp-primary);
}
.btn-outline-primary:hover {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}

/* ===== Hero Section ===== */
.hero-section {
    background: var(--bp-primary);
    color: #fff;
    padding: 80px 0;
    border-radius: 1rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: "";
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: var(--bp-accent);
    opacity: 0.15;
    border-radius: 50%;
}
.hero-section::after {
    content: "";
    position: absolute;
    bottom: -80px; left: -80px;
    width: 250px; height: 250px;
    background: var(--bp-secondary);
    opacity: 0.2;
    border-radius: 50%;
}
.hero-section .container {
    position: relative;
    z-index: 2;
}
.hero-section h1 {
    font-weight: 800;
    font-size: 2.8rem;
    color: #fff;
}
.hero-section .lead {
    color: rgba(255,255,255,0.95);
}

/* ===== Cards ===== */
.card {
    border: 1px solid var(--bp-gray);
    background: #fff;
}

.product-card {
    border: 1px solid var(--bp-gray);
    border-radius: 1rem;
    transition: all .3s;
    overflow: hidden;
    height: 100%;
    background: #fff;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 111, 71, 0.15);
    border-color: var(--bp-primary-light);
}

.product-card .card-img-top {
    height: 180px;
    object-fit: cover;
    background: var(--bp-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bp-accent);
    font-size: 4rem;
}

.product-card .card-footer {
    background: #fff;
    border-top: 1px solid var(--bp-gray);
}

/* ===== Price & Badges ===== */
.price-tag {
    color: var(--bp-warm);
    font-weight: 700;
    font-size: 1.3rem;
}

.badge-platform {
    background: rgba(74, 124, 89, 0.12);
    color: var(--bp-primary);
}

.badge.bg-primary { background: var(--bp-primary) !important; }
.badge.bg-success { background: var(--bp-secondary) !important; }
.badge.bg-warning { background: var(--bp-accent) !important; color: #fff !important; }
.badge.bg-danger  { background: var(--bp-warm) !important; }
.badge.bg-secondary { background: var(--bp-gray-dark) !important; }

/* ===== Stat Cards ===== */
.stat-card {
    border: 1px solid var(--bp-gray);
    border-radius: 1rem;
    background: #fff;
}
.stat-card .icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    color: #fff;
}
.stat-card .icon.bg-primary { background: var(--bp-primary) !important; }
.stat-card .icon.bg-success { background: var(--bp-secondary) !important; }
.stat-card .icon.bg-warning { background: var(--bp-accent) !important; }
.stat-card .icon.bg-danger  { background: var(--bp-warm) !important; }

/* ===== Sidebar Admin ===== */
.sidebar-admin {
    background: #fff;
    border: 1px solid var(--bp-gray);
    border-radius: 1rem;
    padding: 1rem;
    min-height: 500px;
}
.sidebar-admin .nav-link {
    color: var(--bp-text);
    border-radius: .5rem;
    margin-bottom: .25rem;
}
.sidebar-admin .nav-link:hover {
    background: var(--bp-gray);
    color: var(--bp-primary);
}
.sidebar-admin .nav-link.active {
    background: var(--bp-primary);
    color: #fff;
}

/* ===== Tables ===== */
.table-admin { background: #fff; border-radius: .5rem; overflow: hidden; }
.table thead.table-light {
    background: var(--bp-gray);
    color: var(--bp-text);
}

/* ===== Forms ===== */
.form-control:focus, .form-select:focus {
    border-color: var(--bp-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(74, 124, 89, 0.2);
}

.list-group-item.active {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}

/* ===== Footer ===== */
footer.bg-dark {
    background: var(--bp-secondary) !important;
    color: #fff !important;
}
footer h5, footer h6 {
    color: var(--bp-accent);
}
footer a.text-light:hover {
    color: var(--bp-accent) !important;
}
footer .border-secondary {
    border-color: rgba(255,255,255,0.2) !important;
}

/* ===== Alerts ===== */
.alert-success {
    background: rgba(74, 124, 89, 0.1);
    border-color: var(--bp-primary);
    color: var(--bp-primary-dark);
}
.alert-warning {
    background: rgba(232, 168, 56, 0.15);
    border-color: var(--bp-accent);
    color: #8a6415;
}
.alert-danger {
    background: rgba(216, 124, 61, 0.12);
    border-color: var(--bp-warm);
    color: #9a4a1a;
}

/* ===== Misc ===== */
a { color: var(--bp-primary); }
a:hover { color: var(--bp-primary-dark); }

.text-primary { color: var(--bp-primary) !important; }
.text-success { color: var(--bp-secondary) !important; }
.text-warning { color: var(--bp-accent) !important; }
.text-danger  { color: var(--bp-warm) !important; }

.bg-primary { background: var(--bp-primary) !important; }
.bg-success { background: var(--bp-secondary) !important; }
.bg-warning { background: var(--bp-accent) !important; }
.bg-danger  { background: var(--bp-warm) !important; }

/* ===== Product Detail Image ===== */
.product-detail-image {
    background: var(--bp-secondary);
    color: var(--bp-accent);
}

/* ===== Category Card Hover ===== */
a.stat-card:hover {
    background: var(--bp-gray);
    border-color: var(--bp-primary-light);
}

/* ===== Dropdown ===== */
.dropdown-menu {
    border: 1px solid var(--bp-gray);
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.1);
}
.dropdown-item:hover, .dropdown-item:focus {
    background: var(--bp-gray);
    color: var(--bp-primary);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bp-gray); }
::-webkit-scrollbar-thumb {
    background: var(--bp-primary-light);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--bp-primary); }

/* ===== BP Logo ===== */
.bp-logo {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, #ab7d50 0%, var(--bp-secondary) 55%, #6f5835 100%);
    border: 2px solid var(--bp-accent);
    box-shadow: 0 3px 8px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    flex-shrink: 0;
    position: relative;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
    user-select: none;
}
.bp-logo::before {
    content: "";
    position: absolute;
    top: 6px;
    right: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
}
.bp-logo .bp-logo-letters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    line-height: 1;
}
.bp-logo .bp-logo-letter {
    font-family: 'Sarabun', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 21px;
    line-height: 1;
    letter-spacing: -1px;
}
.bp-logo .bp-logo-letter-b { color: #fff; }
.bp-logo .bp-logo-letter-p { color: var(--bp-accent); }
.bp-logo-lg {
    width: 124px;
    height: 124px;
    border-radius: 30px;
    border-width: 3px;
    flex-direction: column;
    box-shadow: 0 12px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.3), 0 0 0 8px rgba(232,168,56,.18);
    gap: 2px;
}
.bp-logo-lg::before {
    top: 14px;
    right: 18px;
    width: 9px;
    height: 9px;
}
.bp-logo-lg .bp-logo-palm {
    font-size: 32px;
    line-height: 1;
    color: var(--bp-accent);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
    margin-bottom: 2px;
}
.bp-logo-lg .bp-logo-letter {
    font-size: 46px;
    letter-spacing: -2px;
}