/*--------------------------- 
  Global Styles
---------------------------*/
body {
    font-family: 'Prompt', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

a {
    color: #d63384;
    text-decoration: none;
    transition: 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
    color: #bd2c73;
}

/*---------------------------
  Navbar
---------------------------*/
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 1000;
}

.navbar-brand {
    font-weight: bold;
    color: #d63384;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: #555;
    font-weight: 500;
    margin-right: 15px;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #d63384;
}

/*---------------------------
  Buttons
---------------------------*/
.btn {
    border-radius: 6px;
    transition: 0.2s all;
    font-weight: 500;
}

.btn-primary,
.btn-pink {
    background-color: #d63384;
    border: none;
    color: #fff;
}

.btn-primary:hover,
.btn-pink:hover {
    background-color: #bd2c73;
    color: #fff;
}

.btn-outline-primary,
.btn-outline-pink {
    color: #d63384;
    border: 1px solid #d63384;
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-pink:hover {
    background-color: #d63384;
    color: #fff;
}

/*---------------------------
  Forms
---------------------------*/
.form-control {
    border-radius: 6px;
    box-shadow: none;
    border: 1px solid #ccc;
    transition: border-color 0.2s ease-in-out;
}

.form-control:focus {
    border-color: #d63384;
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.25);
}

/*---------------------------
  Product Cards
---------------------------*/
.product-card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    transition: box-shadow 0.3s, transform 0.2s;
    margin-bottom: 20px;
}

.product-card:hover {
    box-shadow: 0 0 12px rgba(214, 51, 132, 0.2);
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    height: auto;
}

.product-info {
    padding: 14px 18px;
    text-align: center;
}

.product-info h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.product-info .price {
    color: #d63384;
    font-weight: bold;
    font-size: 1.05rem;
}

/*---------------------------
  Dashboard Boxes
---------------------------*/
.dashboard-box {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dashboard-box h4 {
    margin-bottom: 10px;
    color: #d63384;
    font-size: 1.2rem;
}

/*---------------------------
  Alerts (Flash Messages)
---------------------------*/
.alert {
    border-radius: 0.375rem;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

/*---------------------------
  Footer
---------------------------*/
.footer {
    background-color: #f8f9fa;
    padding: 24px 0;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/*---------------------------
  Utilities
---------------------------*/
.text-pink {
    color: #d63384 !important;
}
.bg-pink {
    background-color: #d63384 !important;
    color: #fff;
}
.border-pink {
    border: 1px solid #d63384 !important;
}

.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-muted { color: #888 !important; }

/*---------------------------
  Chart.js Wrapper
---------------------------*/
canvas {
    max-width: 100%;
    height: auto;
}

/*---------------------------
  Custom Order Status Badges
---------------------------*/
.badge-status {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45em 0.9em;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
    text-transform: capitalize;
}

.bg-success {
    background-color: #28a745 !important;
    color: #fff !important;
}
.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}
.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}
.bg-info {
    background-color: #17a2b8 !important;
    color: #fff !important;
}
.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}
.bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.bg-pending { background-color: #6c757d !important; color: #fff; }
.bg-paid    { background-color: #17a2b8 !important; color: #fff; }
.bg-shipped { background-color: #ffc107 !important; color: #212529; }
.bg-completed { background-color: #28a745 !important; color: #fff; }
.bg-cancelled { background-color: #dc3545 !important; color: #fff; }

/*---------------------------
  Tables
---------------------------*/
.table thead th {
    vertical-align: middle;
    border-bottom: 2px solid #dee2e6;
}

.table td, .table th {
    vertical-align: middle;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.table-light {
    background-color: #fce4ec;
    color: #d63384;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: #fff0f5;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered td, .table-bordered th {
    border: 1px solid #dee2e6;
}

/*---------------------------
  Section Titles
---------------------------*/
.section-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #d63384;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f8d7e2;
    padding-bottom: 0.5rem;
}

/*---------------------------
  Card Styling
---------------------------*/
.card-style {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 3px 10px rgba(214, 51, 132, 0.08);
    transition: 0.3s ease-in-out;
}

.card-style:hover {
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.15);
    transform: translateY(-2px);
}

/*---------------------------
  Responsive Padding
---------------------------*/
@media (max-width: 768px) {
    .card-style {
        padding: 16px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

/*---------------------------
  Fancy Input Focus
---------------------------*/
input.form-control, textarea.form-control, select.form-select {
    border-radius: 10px;
    border: 1px solid #ccc;
    padding: 0.55rem 0.9rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

input.form-control:focus,
textarea.form-control:focus,
select.form-select:focus {
    border-color: #d63384;
    box-shadow: 0 0 0 0.2rem rgba(214, 51, 132, 0.25);
}

/*---------------------------
  Soft Shadow
---------------------------*/
.shadow-soft {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.05);
    border-radius: 12px;
}

/*---------------------------
  Animation on Load (Optional)
---------------------------*/
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn ease-in 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*---------------------------
  Rounded Utilities
---------------------------*/
.rounded-xl {
    border-radius: 1rem !important;
}
.rounded-xxl {
    border-radius: 2rem !important;
}

/*---------------------------
  Color Shades (MC Pink)
---------------------------*/
.bg-pink-light {
    background-color: #fce4ec !important;
}
.text-pink-dark {
    color: #bd2c73 !important;
}

/*---------------------------
  Form Group Label Style
---------------------------*/
label.form-label {
    font-weight: 500;
    color: #d63384;
    margin-bottom: 0.4rem;
}

.text-dealer {
    color: #e83e8c;
    font-weight: bold;
}


/*---------------------------  
  ป้ายสถานะสั่งซื้อ (อ่านง่าย)  
---------------------------*/  
.badge-paid {  
  background-color: #28a745 !important; /* เขียว */  
  color: white !important;  
}  

.badge-pending {  
  background-color: #ffc107 !important; /* เหลือง */  
  color: black !important;  
}  

.badge-failed {  
  background-color: #dc3545 !important; /* แดง */  
  color: white !important;  
}  

.badge-mcshop {  
  background-color: #d63384 !important; /* ชมพูสด */  
  color: white !important;  
}

.btn-pink {
  background-color: #d63384;
  color: white;
  border: none;
}
.btn-pink:hover {
  background-color: #bd2c73;
  color: white;
}

/* ---------------------------
  Mobile Topbar (icon-only)
--------------------------- */
.topbar-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.topbar-icons .icon-btn {
    background: none;
    border: none;
    color: #d63384;
    font-size: 1.4rem;
    position: relative;
}
.topbar-icons .icon-btn:focus {
    outline: none;
}
#cart-count {
    position: absolute;
    top: -4px;
    right: -6px;
    font-size: 0.65rem;
    background-color: red;
    color: white;
    border-radius: 999px;
    padding: 2px 6px;
}

/* ---------------------------
  Responsive: 2 Products/Row on Mobile
--------------------------- */
@media (max-width: 576px) {
    .product-grid .col-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}


.product-img, .product-img-mobile, .product-img-tablet, .product-card-image {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background-color: #f8f9fa;
}

/* Mobile-specific */
@media (max-width: 767.98px) {
  .product-img-mobile {
    width: 45px !important;
    height: 45px !important;
  }
}

/* Tablet-specific */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .product-img-tablet {
    width: 50px !important;
    height: 50px !important;
  }
}

/* Card View Image (Mobile) */
.product-card-image {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-right: 0.75rem;
  border: 1px solid #dee2e6;
  background-color: #f8f9fa;
}
