.custom-box > .custom-item {
    /* padding: 5px; */
    /* visibility: hidden; */
    padding:7.5px;
    max-width: 100%;
    height: auto;
}
.service-category-list{
    padding: 2rem;
}
.ratio-16-9 {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

/* ปรับแต่งหน้าตาของรูปใน Magnific Popup */
.mfp-img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    line-height: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 40px 0 40px; /* ตามที่คุณต้องการ */
    margin: 0 auto;
}

/* ปรับสีพื้นหลังให้ดำสนิท (Optional) */
.mfp-bg {
    background: #000;
    opacity: 0.9;
}

.parallax-mirror {
    filter: brightness(40%); /* ปรับค่า % ยิ่งน้อยยิ่งมืด */
}

body {
            background-color: #f0f2f5;
            font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
        }

        .admin-topbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 58px;
            background: linear-gradient(135deg, #1a1f36 0%, #2d3561 100%);
            display: flex;
            align-items: center;
            padding: 0 24px;
            z-index: 1001;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
        }

        .admin-topbar .brand {
            color: #fff;
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-decoration: none !important;
        }

        .admin-topbar .brand i {
            color: #7289f5;
            margin-right: 8px;
        }

        .admin-sidebar {
            width: 220px;
            position: fixed;
            top: 58px;
            left: 0;
            bottom: 0;
            background: #1e2340;
            z-index: 1000;
            padding: 20px 0;
        }

        .admin-content-wrapper {
            margin-left: 220px;
            padding: 80px 28px 40px;
            min-height: 100vh;
        }

        .form-card {
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            padding: 30px;
            max-width: 900px;
            margin: 0 auto;
        }

        .form-header {
            border-bottom: 1px solid #f0f0f0;
            margin-bottom: 25px;
            padding-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .form-header i {
            background: #eef0fe;
            color: #7289f5;
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }

        .form-header h2 {
            margin: 0;
            font-size: 20px;
            font-weight: 700;
            color: #1e2340;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            font-weight: 600;
            color: #4b5563;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .form-control {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.2s;
            color: #1f2937;
            height: auto; /* override bootstrap default height */
        }
        
        select.form-control {
            -webkit-appearance: auto;
            -moz-appearance: auto;
            appearance: auto;
        }

        .form-control:focus {
            border-color: #7289f5;
            outline: none;
            box-shadow: 0 0 0 3px rgba(114, 137, 245, 0.15);
        }

        .btn-submit {
            background: linear-gradient(135deg, #7289f5, #a78bfa);
            color: #fff !important;
            border: none;
            border-radius: 8px;
            padding: 12px 24px;
            font-weight: 600;
            font-size: 15px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .btn-submit:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(114, 137, 245, 0.4);
        }

        .image-preview-box {
            border: 2px dashed #e5e7eb;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            background: #fdfdfd;
            position: relative;
            cursor: pointer;
            transition: border-color 0.2s;
        }

        .image-preview-box:hover {
            border-color: #7289f5;
        }

        .image-preview-box img {
            max-width: 100%;
            max-height: 200px;
            border-radius: 6px;
            display: none;
        }

        .image-preview-box .upload-placeholder {
            color: #9ca3af;
        }

        .image-preview-box .upload-placeholder i {
            font-size: 40px;
            margin-bottom: 10px;
            display: block;
        }

 /* ====================================
       ADMIN PANEL - MODERN REDESIGN
       Uses Bootstrap 3's grid, but heavily
       styled to look fresh & professional
    ======================================= */
    body {
        background-color: #f0f2f5;
        font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    }

    /* ---- TOP NAV BAR ---- */
    .admin-topbar {
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 58px;
        background: linear-gradient(135deg, #1a1f36 0%, #2d3561 100%);
        display: flex;
        align-items: center;
        padding: 0 24px;
        z-index: 1001;
        box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    }
    .admin-topbar .brand {
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-decoration: none !important;
    }
    .admin-topbar .brand i {
        color: #7289f5;
        margin-right: 8px;
    }
    .admin-topbar .topbar-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .admin-topbar .topbar-right .admin-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: linear-gradient(135deg, #7289f5, #a78bfa);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: bold;
        font-size: 14px;
    }
    .admin-topbar .topbar-right .topbar-text {
        color: rgba(255,255,255,0.8);
        font-size: 13px;
    }

    /* ---- SIDEBAR ---- */
    .admin-sidebar {
        width: 220px;
        position: fixed;
        top: 58px;
        left: 0;
        bottom: 0;
        background: #1e2340;
        overflow-y: auto;
        z-index: 1000;
        padding: 20px 0 40px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    }
    .admin-sidebar .sidebar-section-label {
        color: rgba(255,255,255,0.35);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        padding: 16px 20px 6px;
    }
    .admin-sidebar .nav-pills > li > a {
        border-radius: 0;
        color: rgba(255,255,255,0.65);
        padding: 10px 20px;
        font-size: 13.5px;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 10px;
        border-left: 3px solid transparent;
    }
    .admin-sidebar .nav-pills > li > a:hover {
        background: rgba(114, 137, 245, 0.12);
        color: #fff;
        border-left-color: #7289f5;
    }
    .admin-sidebar .nav-pills > li.active > a {
        background: rgba(114, 137, 245, 0.2);
        color: #fff;
        border-left-color: #7289f5;
        font-weight: 600;
    }
    .admin-sidebar .nav-pills > li > a i {
        width: 18px;
        text-align: center;
        font-size: 14px;
        opacity: 0.8;
    }
    .admin-sidebar .nav-pills > li.active > a i {
        opacity: 1;
        color: #7289f5;
    }

    /* ---- MAIN CONTENT ---- */
    .admin-content-wrapper {
        margin-left: 220px;
        padding: 80px 28px 40px;
        min-height: 100vh;
    }

    /* ---- PAGE HEADER ---- */
    .admin-page-header {
        background: #fff;
        border-radius: 12px;
        padding: 18px 24px;
        margin-bottom: 22px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    .admin-page-header .page-title {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        color: #1e2340;
    }
    .admin-page-header .page-title i {
        color: #7289f5;
        margin-right: 10px;
    }
    .admin-page-header .page-subtitle {
        color: #888;
        font-size: 12.5px;
        margin: 3px 0 0;
    }
    .btn-add-new {
        background: linear-gradient(135deg, #7289f5, #a78bfa);
        color: #fff !important;
        border: none;
        border-radius: 8px;
        padding: 9px 18px;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none !important;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: opacity 0.2s;
        box-shadow: 0 3px 10px rgba(114,137,245,0.4);
    }
    .btn-add-new:hover { opacity: 0.88; }

    /* ---- DATA CARD ---- */
    .admin-card {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.07);
        overflow: hidden;
    }

    /* ---- TABLE STYLES (override) ---- */
    .admin-card .table {
        margin-bottom: 0;
    }
    .admin-card .table thead tr {
        background: #f7f8fc;
    }
    .admin-card .table thead th {
        border-top: none;
        border-bottom: 2px solid #eef0f8;
        color: #555;
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        padding: 14px 16px;
    }
    .admin-card .table tbody td {
        vertical-align: middle !important;
        padding: 13px 16px !important;
        border-color: #f2f3f8;
        font-size: 13.5px;
        color: #333;
    }
    .admin-card .table tbody tr:hover td {
        background: #fafaff;
    }
    .admin-card .table tbody tr:last-child td {
        border-bottom: none;
    }

    /* ---- BADGE STYLES ---- */
    .badge-status-active {
        background: #ecfdf5;
        color: #059669;
        border: 1px solid #6ee7b7;
        border-radius: 20px;
        padding: 4px 12px;
        font-size: 12px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    .badge-status-inactive {
        background: #fff7ed;
        color: #d97706;
        border: 1px solid #fcd34d;
        border-radius: 20px;
        padding: 4px 12px;
        font-size: 12px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    .badge-order {
        background: #eef0fe;
        color: #7289f5;
        border-radius: 6px;
        padding: 3px 10px;
        font-size: 12px;
        font-weight: 700;
    }

    /* ---- ACTION BUTTONS ---- */
    .btn-edit-icon {
        background: #eef0fe;
        color: #7289f5;
        border: none;
        border-radius: 7px;
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        text-decoration: none !important;
    }
    .btn-edit-icon:hover { background: #d9dcfd; color: #4c65e4; }
    .btn-delete-icon {
        background: #fff1f1;
        color: #e04444;
        border: none;
        border-radius: 7px;
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    .btn-delete-icon:hover { background: #fdd; color: #c02020; }

    /* ---- EMPTY STATE ---- */
    .empty-state td {
        padding: 50px 20px !important;
        text-align: center;
        color: #aaa;
    }
    .empty-state td i {
        font-size: 36px;
        display: block;
        margin-bottom: 10px;
        color: #ccc;
    }

    /* กล่องสี่เหลี่ยม (การ์ด) */
.service-card-custom {
    position: relative;
    margin-top: 50px;      /* เว้นที่ด้านบนให้รูปที่ลอยขึ้นไป */
    padding: 60px 20px 20px; /* padding ด้านบนต้องเยอะหน่อยเพื่อไม่ให้ข้อความทับรูป */
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* วงกลมที่ลอยอยู่ด้านบน */
.circle-icon-top {
    position: absolute;
    top: 0;                /* ชิดขอบบน */
    left: 50%;             /* ไปกึ่งกลางแนวนอน */
    transform: translate(-50%, -50%); /* ดึงกลับมาให้กึ่งกลางเป๊ะทั้งบนและซ้าย */
    
    /* ขนาดและรูปทรง */
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    
    /* ตกแต่งเพิ่มเติม */
    border: 5px solid #ffffff; /* ขอบขาวตัดกับเส้นกล่อง */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    z-index: 10;
}

/* เอฟเฟกต์เวลาเอาเมาส์ชี้ (Optional) */
.service-card-custom:hover {
    border-color: #ff6b00; /* เปลี่ยนสีเส้นขอบตามสีแบรนด์ */
    transform: translateY(5px);
}

